Community
Participate
Working Groups
Got the following NPE related to Marker in ModelExplorer while moving mouse over element in the model explorer. To reproduce: - Create a sequence diagram - Create 2 lifeline and a message between - Validate the model (Event should get marked invalid) - Delete invalid Event from model explorer - Create a new message - Drag the mouse over new event created with the new message java.lang.NullPointerException at org.eclipse.papyrus.modelexplorer.MoDiscoLabelProvider.getMarkerMessage(MoDiscoLabelProvider.java:72) at org.eclipse.papyrus.modelexplorer.MoDiscoLabelProviderWTooltips.getToolTipText(MoDiscoLabelProviderWTooltips.java:34) at org.eclipse.jface.viewers.ColumnViewerToolTipSupport.shouldCreateToolTip(ColumnViewerToolTipSupport.java:163) at org.eclipse.jface.window.ToolTip.toolTipCreate(ToolTip.java:343) at org.eclipse.jface.window.ToolTip.access$2(ToolTip.java:342) at org.eclipse.jface.window.ToolTip$ToolTipOwnerControlListener.handleEvent(ToolTip.java:631) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1407) at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
I fixed the bug by simply adding a check. In general, the error occurred, when a problem marker exist but the referenced model element does not. The underlying question is whether Papyrus should remove a problem marker immediately, if the referenced element is removed (a part of "life validation", could be done by a model listener). Therefore I leave the bug open for the moment. (In reply to comment #0) > Got the following NPE related to Marker in ModelExplorer while moving mouse > over element in the model explorer. > > To reproduce: > - Create a sequence diagram > - Create 2 lifeline and a message between > - Validate the model (Event should get marked invalid) > - Delete invalid Event from model explorer > - Create a new message > - Drag the mouse over new event created with the new message
This bug is no longer reproducible.