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

Bug 351670

Summary: NPE with PapyrusUncontrolAction
Product: [Modeling] Papyrus Reporter: Vincent Lorenzo <vincent.lorenzo>
Component: CoreAssignee: Emilien Perico <emilien.perico>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: 0.8.0   
Target Milestone: SR1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Vincent Lorenzo CLA 2011-07-11 03:19:55 EDT
Steps to reproduce : 
   1/ Open a Papyrus Model
   2/ Display the ModelExplorer View
   3/ Open an other editor (text editor for example)
   4/ Click in the root of the model in the modelexplorer -> you get the following exception : 

   !ENTRY org.eclipse.ui.navigator 4 0 2011-07-11 09:15:20.161
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
	at org.eclipse.papyrus.controlmode.action.PapyrusUncontrolAction.isEnabled(PapyrusUncontrolAction.java:67)
	at org.eclipse.papyrus.controlmode.action.CollaborativeActionsFactory.update(CollaborativeActionsFactory.java:118)
	at org.eclipse.papyrus.modelexplorer.actionprovider.EditingDomainActionProvider.update(EditingDomainActionProvider.java:160)
	at org.eclipse.papyrus.modelexplorer.actionprovider.EditingDomainActionProvider.activate(EditingDomainActionProvider.java:171)
	at org.eclipse.papyrus.modelexplorer.actionprovider.EditingDomainActionProvider.updateActionBars(EditingDomainActionProvider.java:190)
	at org.eclipse.ui.navigator.NavigatorActionService$3.run(NavigatorActionService.java:260)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.navigator.NavigatorActionService.fillActionBars(NavigatorActionService.java:253)
	at org.eclipse.ui.navigator.CommonNavigatorManager.selectionChanged(CommonNavigatorManager.java:222)
	at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:164)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:162)
	at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2188)
	at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1211)
	at org.eclipse.ui.navigator.CommonViewer.handleSelect(CommonViewer.java:478)
	at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1241)
	at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:239)
	at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:233)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:403)
	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:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	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:344)
	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:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Comment 1 Vincent Lorenzo CLA 2013-03-13 10:11:26 EDT
I can't reproduce this bug. I close it