Programmatically Validate Diagram [message #1494439] |
Mon, 01 December 2014 13:22 |
Koen Staal Messages: 70 Registered: October 2014 |
Member |
|
|
When the source files of the diagram contains errors they are not automaticly shown in the diagram. Only after selecting "validate diagram" in the context the menu the errors are shown. I want to call the validate more often.
How can i programmatically call the validate diagram function?
[Updated on: Mon, 01 December 2014 13:23] Report message to a moderator
|
|
|
Re: Programmatically Validate Diagram [message #1504534 is a reply to message #1494439] |
Tue, 09 December 2014 10:35 |
Koen Staal Messages: 70 Registered: October 2014 |
Member |
|
|
I came across this post, dont know how i didnt find it when searching earlier:
https://www.eclipse.org/forums/index.php/t/822391/
It suggests to use the ValidateAction class. When you have set the correct selected objects (which i did with a workaround) it wil show the errors in a new dialog. It wont show the icons in the diagram.
The solution:
DialectEditor.validateRepresentation()
I totally missed this easy solution with the dialectEditor, because i was working from IEditorPart which is returned when using DialectUIManager.INSTANCE.openEditor();
[Updated on: Tue, 09 December 2014 10:37] Report message to a moderator
|
|
|
Re: Programmatically Validate Diagram [message #1504817 is a reply to message #1504534] |
Tue, 09 December 2014 15:35 |
|
Hello,
I'm glad you found a solution. You can have a look on ValidationAction
use with the test
org.eclipse.sirius.tests.unit.api.validation.DiagramValidationTest.java
Regards,
Steve
Le 09/12/2014 11:35, Koen Staal a écrit :
> I came across this post, dont know how i missed it the first time:
> https://www.eclipse.org/forums/index.php/t/822391/
>
> It suggests to use the ValidateAction class. When you have set the
> correct selected objects (which i did with a workaround) it wil show the
> errors in a new dialog. It wont show the icons in the diagram.
>
> The solution:
> DialectEditor.validateRepresentation()
>
> I totally missed this easy solution with the dialectEditor, because i
> was working from IEditorPart which is returned when using
> DialectUIManager.INSTANCE.openEditor();
--
Steve Monnier - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.02537 seconds