Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 441642

Summary: No validation rule on root
Product: [Modeling] Sirius Reporter: Emmanuel Billaud <billaud.emmanuel>
Component: DiagramAssignee: Project Inbox <sirius.diagram-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: belqassim.djafer, esteban.dugueperoux, florian.barbin, laurent.redor, mickael.lanoe, pierre-charles.david
Version: 1.0.0Keywords: triaged
Target Milestone: 3.0.0M5   
Hardware: PC   
OS: Windows 7   
Whiteboard: trivial
Attachments:
Description Flags
Plug-ins and project showing the bug none

Description Emmanuel Billaud CLA 2014-08-12 16:54:20 EDT
Created attachment 245928 [details]
Plug-ins and project showing the bug

It is not possible to validate the root element of the diagram using a semantic rule if it has no graphical representation.

The attachment contains :
 - the four plugins from the GetStarted page sligthly modified (semantic rule added, and renaming diagram) ;
 - a project named RootValidation that shows the problem.

On the given project, two diagrams are available :
 - diagOK, where the root element is displayed -> an error is raised when validating ;
 - diagKO, where the root element is not displayed -> no error is raised.
Comment 1 Esteban DUGUEPEROUX CLA 2014-08-13 06:01:47 EDT
I confirm the bug.

Technical explain :

Already the org.eclipse.sirius.diagram.tools.internal.validation.constraints.Error/Info/WarningConstraint constraints are registred in plugin.xml only for DDiagramElement target and not for DDiagram.
And in the mother class AbstractDDiagramConstraint, we check only for DDiagramElements.

In addition SemanticValidationRule evalution create markers on .aird resource while these markers should be associated to the related semantic resources.
Comment 2 Mickael LANOE CLA 2014-12-03 09:04:04 EST
currently working on it
Comment 3 Mickael LANOE CLA 2014-12-04 05:28:58 EST
Gerrit https://git.eclipse.org/r/#/c/37542/
Comment 5 Belqassim Djafer CLA 2015-04-09 09:44:00 EDT
Verified on Sirius 3.0.0M6
Comment 6 Pierre-Charles David CLA 2015-06-24 11:14:28 EDT
Available in Sirius 3.0.0. See https://wiki.eclipse.org/Sirius/3.0.0.