Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328979 - [Validation] Exception while dragging the mouse over ModelExplorer
Summary: [Validation] Exception while dragging the mouse over ModelExplorer
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 0.7.1   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ansgar Radermacher CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 313986
  Show dependency tree
 
Reported: 2010-10-28 16:25 EDT by Yann Tanguy CLA
Modified: 2013-04-02 11:12 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yann Tanguy CLA 2010-10-28 16:25:28 EDT
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)
Comment 1 Ansgar Radermacher CLA 2010-10-29 03:39:54 EDT
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
Comment 2 Ansgar Radermacher CLA 2013-04-02 11:12:15 EDT
This bug is no longer reproducible.