Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 447669 - In the VSM Editor, Table/TreeNavigationTool are created with an ElementSelectVariable without name
Summary: In the VSM Editor, Table/TreeNavigationTool are created with an ElementSelect...
Status: CLOSED INVALID
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 1.0.1   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 453052 453545
  Show dependency tree
 
Reported: 2014-10-17 05:42 EDT by Maxime Porhel CLA
Modified: 2014-12-09 03:52 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maxime Porhel CLA 2014-10-17 05:42:32 EDT
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 Maxime Porhel CLA 2014-10-17 05:44:43 EDT
I see several parts for the correction: 
 . look at the diagram navigation tool default names for variables
 . use the same for tree and table navigation tools
 . avoid the NPE in AcceleoMTLInterpreter (the correction might touch other interpreters or the CompoundInterpreter): do not try to use variable without name but log some warning/errors.
Comment 2 Belqassim Djafer CLA 2014-10-22 10:25:36 EDT
fixed on master (for sirius2.0) with the commit c6b7151a193e20ee63d48326a90f060c6d6edf87 but it still not fixed on 1.0.x
Comment 3 Maxime Porhel CLA 2014-11-06 10:22:36 EST
As indicated by Belqassim, this is already corrected on master
Comment 4 Pierre-Charles David CLA 2014-11-24 09:48:16 EST
Cloned as bug 453052 to backport for Sirius 1.0.2.