Home » Modeling » EMF » [Validation]How to validate my diagrams without opening the diagram editor
| |
Re: [Validation]How to validate my diagrams without opening the diagram editor [message #512694 is a reply to message #508891] |
Sat, 06 February 2010 02:54   |
Eclipse User |
|
|
|
Originally posted by: santiagovelasco.mail.com
Hi Ed
sorry, i think, i should have explained in more detail.
I am already loading the resource as you said, and i am using the
method "runValidation(View view)" in my XXX.diagram.part.validationAction.
in which the createMarkers method is called.
when the markers are set, they are listed in the problems view and
attached to the element in the editor. now, since i may have large
amount of non opened editors, and the call of validation is done
programatically, all editors will be opened by setting the markers.
What i want is to avoid this situation. i only want the errors to get
listed in the problems view. but nevertheless when the user clicks on
the problems view to be redirected to the editor where the element
causing the problem is.
Thanks
Santiago
Ed Merks escribió:
> Santiago,
>
> It's not entirely clear what you mean by "these diagrams." You'll need
> to load the resource into a resource set much like the editor does and
> then invoke the same validation logic as the editor's validate action
> does. This article might help:
> http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .emf.doc/references/overview/EMF.Validation.html
>
>
> santiago wrote:
>> Is there a way to validate these diagrams without opening them in the
>> editor, I would like to do this programatically, possibly through a
>> builder... but any way without opening the editor would be a great start.
>>
>> Any advice would be greatly appreciated.
>>
>> Thanks
|
|
|
Re: [Validation]How to validate my diagrams without opening the diagram editor [message #512718 is a reply to message #512694] |
Sat, 06 February 2010 13:05   |
Eclipse User |
|
|
|
Santiago,
I'm not sure what's causing all the editors to be opened on all the
markers. Did you track down which code is doing that?
santiago wrote:
> Hi Ed
>
> sorry, i think, i should have explained in more detail.
>
> I am already loading the resource as you said, and i am using the
> method "runValidation(View view)" in my
> XXX.diagram.part.validationAction.
> in which the createMarkers method is called.
>
> when the markers are set, they are listed in the problems view and
> attached to the element in the editor. now, since i may have large
> amount of non opened editors, and the call of validation is done
> programatically, all editors will be opened by setting the markers.
>
> What i want is to avoid this situation. i only want the errors to get
> listed in the problems view. but nevertheless when the user clicks on
> the problems view to be redirected to the editor where the element
> causing the problem is.
>
> Thanks
> Santiago
>
>
>
>
>
>
>
> Ed Merks escribió:
>> Santiago,
>>
>> It's not entirely clear what you mean by "these diagrams." You'll
>> need to load the resource into a resource set much like the editor
>> does and then invoke the same validation logic as the editor's
>> validate action does. This article might help:
>> http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .emf.doc/references/overview/EMF.Validation.html
>>
>>
>> santiago wrote:
>>> Is there a way to validate these diagrams without opening them in
>>> the editor, I would like to do this programatically, possibly
>>> through a builder... but any way without opening the editor would be
>>> a great start.
>>>
>>> Any advice would be greatly appreciated.
>>>
>>> Thanks
|
|
|
Re: [Validation]How to validate my diagrams without opening the diagram editor [message #514283 is a reply to message #512718] |
Sat, 13 February 2010 06:02   |
Eclipse User |
|
|
|
Originally posted by: santiagovelasco.mail.com
Hi Ed
well, so far i could track it, i can tell the editor would be oppened
when the attributes of the markers are being set.
setting the attributes is done in the addMarker method "public static
IMarker addMarker(IFile file, String elementId, String location, String
message, int statusSeverity)" in the XXXMarkerNavigationProvider
i am not sure what is happening there.
for example when the marker severity is not set, the editor does not get
oppened, the problems get listed in the problems view, but ofcourse not
with the right severity, therefore when double clicking on them a null
pointer exception will be fired.
thanks
sanitago
Ed Merks escribió:
> Santiago,
>
> I'm not sure what's causing all the editors to be opened on all the
> markers. Did you track down which code is doing that?
>
>
> santiago wrote:
>> Hi Ed
>>
>> sorry, i think, i should have explained in more detail.
>>
>> I am already loading the resource as you said, and i am using the
>> method "runValidation(View view)" in my
>> XXX.diagram.part.validationAction.
>> in which the createMarkers method is called.
>>
>> when the markers are set, they are listed in the problems view and
>> attached to the element in the editor. now, since i may have large
>> amount of non opened editors, and the call of validation is done
>> programatically, all editors will be opened by setting the markers.
>>
>> What i want is to avoid this situation. i only want the errors to get
>> listed in the problems view. but nevertheless when the user clicks on
>> the problems view to be redirected to the editor where the element
>> causing the problem is.
>>
>> Thanks
>> Santiago
>>
>>
>>
>>
>>
>>
>>
>> Ed Merks escribió:
>>> Santiago,
>>>
>>> It's not entirely clear what you mean by "these diagrams." You'll
>>> need to load the resource into a resource set much like the editor
>>> does and then invoke the same validation logic as the editor's
>>> validate action does. This article might help:
>>> http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .emf.doc/references/overview/EMF.Validation.html
>>>
>>>
>>> santiago wrote:
>>>> Is there a way to validate these diagrams without opening them in
>>>> the editor, I would like to do this programatically, possibly
>>>> through a builder... but any way without opening the editor would be
>>>> a great start.
>>>>
>>>> Any advice would be greatly appreciated.
>>>>
>>>> Thanks
|
|
|
Re: [Validation]How to validate my diagrams without opening the diagram editor [message #517642 is a reply to message #514283] |
Mon, 01 March 2010 10:06   |
Eclipse User |
|
|
|
Originally posted by: santiagovelasco.mail.com
Hi Ed
well, so far i could track it, i can tell the editor would be oppened
when the attributes of the markers are being set.
setting the attributes is done in the addMarker method "public static
IMarker addMarker(IFile file, String elementId, String location, String
message, int statusSeverity)" in the XXXMarkerNavigationProvider
i am not sure what is happening there.
for example when the marker severity is not set, the editor does not get
oppened, the problems get listed in the problems view, but ofcourse not
with the right severity, therefore when double clicking on them a null
pointer exception will be fired.
thanks
sanitago
|
|
|
Re: [Validation]How to validate my diagrams without opening the diagram editor [message #517650 is a reply to message #517642] |
Mon, 01 March 2010 10:39  |
Eclipse User |
|
|
|
Santigo,
Comments below.
santiago wrote:
> Hi Ed
>
> well, so far i could track it, i can tell the editor would be oppened
> when the attributes of the markers are being set.
>
> setting the attributes is done in the addMarker method "public static
> IMarker addMarker(IFile file, String elementId, String location,
> String message, int statusSeverity)" in the XXXMarkerNavigationProvider
That's a GMF thing though, so unfortunately I'm not in a position to
help with that.
>
> i am not sure what is happening there.
> for example when the marker severity is not set, the editor does not
> get oppened, the problems get listed in the problems view, but
> ofcourse not with the right severity, therefore when double clicking
> on them a null pointer exception will be fired.
That sounds bad. It's best to ask about it on the GMF newsgroup.
>
> thanks
>
> sanitago
|
|
|
Goto Forum:
Current Time: Thu Jul 03 09:17:53 EDT 2025
Powered by FUDForum. Page generated in 0.29139 seconds
|