| Graphiti . EMF Validation [message #992326] |
Fri, 21 December 2012 06:08  |
Rui Domingues Messages: 162 Registered: October 2010 |
Senior Member |
|
|
Hi. I want to validate my diagram underlying model, create markers, and through those create decorations.
As far as I can see there is some ways of doing validation :ocl in plugin.xml and with JAVA.
I really need some help to understand what I need to do, because from what I've read we need also to install project natures.
Can anyone explain with minor samples what it is necessary to implement validation, then create markers and then use Graphiti to render decorators.
It's something confuse for me right now.
Thanks in advance.
Rui
|
|
|
|
| Re: Graphiti . EMF Validation [message #997062 is a reply to message #992390] |
Thu, 03 January 2013 09:12   |
Rui Domingues Messages: 162 Registered: October 2010 |
Senior Member |
|
|
Hi Michael. Thank you very much for answering, but I need some clarification, if you can.
I've already defined a IValidationListener implementation, an IClientSelector, and in plugin.xml, I defined the extension points below:
point="org.eclipse.core.resources.markers"
point="org.eclipse.emf.validation.constraintBindings">
point="org.eclipse.emf.validation.validationListeners">
<listener class="validation.ProblemsReporter">
</listener>
and some live constraints which implementation also takes care of batch validation.
I checked through ValidationListener that it is validating, and I'm writing the message in the status bar. At the same place I'm trying to create my marker. is here the proper place? How do I add extra attributes? I 'm using MarkerUtil.
Other thing: I also want that when I click in the marker, the editpart is selected, however, it opens the model file in text mode. I also extended my editor from IGotoMarker, but the method is not invoked. Can anyone help me?
Thanks in advance
|
|
|
|
| Re: Graphiti . EMF Validation [message #1003927 is a reply to message #997256] |
Tue, 22 January 2013 04:01  |
Felix Velasco Messages: 25 Registered: July 2009 |
Junior Member |
|
|
Besides implementing IGotoMoarker, you have to add a property to the marker, to identify the editor, something like:
marker.setAttribute(IDE.EDITOR_ID_ATTR, DiagramEditor.DIAGRAM_EDITOR_ID);
Make sure to use your own editor id if you've subclassed graphiti's.
|
|
|
Powered by
FUDForum. Page generated in 0.01775 seconds