Community
Participate
Working Groups
I get the following NPE on contextual menu in the diagram editor on a node whose target is detached : java.lang.NullPointerException at org.eclipse.sirius.diagram.business.api.query.ToolSectionQuery.getOperationActions(ToolSectionQuery.java:81) at org.eclipse.sirius.diagram.ui.tools.internal.menu.PopupMenuContribution.contributeToPopupMenu(PopupMenuContribution.java:152) at org.eclipse.gmf.runtime.common.ui.services.action.internal.contributionitem.ContributeToPopupMenuOperation.execute(ContributeToPopupMenuOperation.java:75) at org.eclipse.gmf.runtime.common.core.service.ExecutionStrategy$4.execute(ExecutionStrategy.java:181) at org.eclipse.gmf.runtime.common.core.service.Service.execute(Service.java:651) at org.eclipse.gmf.runtime.common.ui.services.action.contributionitem.ContributionItemService.execute(ContributionItemService.java:293) at org.eclipse.gmf.runtime.common.ui.services.action.contributionitem.ContributionItemService.contributeToPopupMenu(ContributionItemService.java:254) at org.eclipse.sirius.diagram.ui.tools.internal.menu.DiagramEditorContextMenuProvider$1.run(DiagramEditorContextMenuProvider.java:107) at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328) at org.eclipse.sirius.diagram.ui.tools.internal.menu.DiagramEditorContextMenuProvider.buildContextMenu(DiagramEditorContextMenuProvider.java:104) at org.eclipse.gef.ContextMenuProvider.menuAboutToShow(ContextMenuProvider.java:63) at org.eclipse.jface.action.MenuManager.fireAboutToShow(MenuManager.java:342) at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:473) at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:469) at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:495) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:255) Scenario to reproduce : 1. Disable the auto refresh 2. Create a Modeling Project 3. Add My.ecore 4. Enable Design Viewpoint 5. Open the automatically created "package entities" diagram 6. Create a EPackage with the palette 7. Create a new "package entites" diagram from the created EPackage with the contextual menu and save 8. on the second diagram create a EPackage without saving 9. on the Ecore Editor, outside Sirius Session, delete the firstly created EPackage and save => a popup propose to reload the session, this popup is proposed only if the resource to reload is a semantic one is modified. 10. Go back to the second diagram, we see the second created EPackage with a red cross indicating that its target is detached, enable the contextual menu on it and you get the previous NPE.