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

Bug 453052

Summary: In the VSM Editor, Table/TreeNavigationTool are created with an ElementSelectVariable without name
Product: [Modeling] Sirius Reporter: Pierre-Charles David <pierre-charles.david>
Component: CoreAssignee: Maxime Porhel <maxime.porhel>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: belqassim.djafer, florian.barbin, maxime.porhel, mickael.lanoe, pierre-charles.david
Version: 1.0.1Keywords: triaged
Target Milestone: 1.0.2   
Hardware: PC   
OS: Mac OS X   
Whiteboard:
Bug Depends on: 447669    
Bug Blocks:    

Description Pierre-Charles David CLA 2014-11-24 09:47:03 EST
+++ This bug was initially created as a clone of Bug #447669 +++

Open or create a VSM with a diagram, a tree and a table descriptions. 
Add a TableNavigationTool
Add a TreeNavigationTool
Add a DiagramNavigationTool

Its ElementSelectVariable should have a name set during its creation: if the specifier does not see this, he will have the following NPE (during diagram opening for example):

java.lang.NullPointerException
 at org.eclipse.sirius.common.acceleo.mtl.business.internal.interpreter.AcceleoMTLInterpreter.createCompilationContext(AcceleoMTLInterpreter.java:521)
 at org.eclipse.sirius.common.acceleo.mtl.business.internal.interpreter.AcceleoMTLInterpreter.internalEvaluate(AcceleoMTLInterpreter.java:1175)
 at org.eclipse.sirius.common.acceleo.mtl.business.internal.interpreter.AcceleoMTLInterpreter.evaluateCollection(AcceleoMTLInterpreter.java:638)
 at org.eclipse.sirius.tools.internal.interpreter.ODesignGenericInterpreter.evaluateCollection(ODesignGenericInterpreter.java:175)
 at org.eclipse.sirius.business.internal.logger.RuntimeLoggerInterpreterImpl.evaluateCollection(RuntimeLoggerInterpreterImpl.java:161)
 at org.eclipse.sirius.diagram.ui.tools.internal.providers.decorators.SubDiagramDecorator.checkRepresentationNavigationDescription(SubDiagramDecorator.java:191)
 at org.eclipse.sirius.diagram.ui.tools.internal.providers.decorators.SubDiagramDecorator.checkRepresentationNavigationDescriptions(SubDiagramDecorator.java:176)
 at org.eclipse.sirius.diagram.ui.tools.internal.providers.decorators.SubDiagramDecorator.shouldHaveSubDiagDecoration(SubDiagramDecorator.java:139)
 at org.eclipse.sirius.diagram.ui.tools.internal.providers.decorators.SubDiagramDecorator.refresh(SubDiagramDecorator.java:108)
 at org.eclipse.gmf.runtime.diagram.ui.editpolicies.DecorationEditPolicy.refresh(DecorationEditPolicy.java:189)
 at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart$3.run(GraphicalEditPart.java:858)
 at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
 at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.refresh(GraphicalEditPart.java:851)
 at org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramElementContainerEditPart.refresh(AbstractDiagramElementContainerEditPart.java:203)
Comment 1 Pierre-Charles David CLA 2014-11-24 09:47:25 EST
Should be trivial to backport for 1.0.2.
Comment 2 Maxime Porhel CLA 2015-01-15 10:44:37 EST
The correction of this issue only deals with setting the name of the variable at creation. 

See Bug 453545 for a more general correction with validation and the detection/handle of the same issue when already existing or introduced by the specifier.
Comment 3 Maxime Porhel CLA 2015-01-15 10:49:16 EST
Fixed with commit c92d0a76cb72133c8f2f720b07cbadc0a4e3907a on branch v1.0.x
Comment 4 Mickael LANOE CLA 2015-01-27 09:37:46 EST
Validated
Comment 5 Pierre-Charles David CLA 2015-01-29 04:34:36 EST
Available in Sirius 1.0.2.