Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357993 - [modeling] NPE when removing sub-package from context
Summary: [modeling] NPE when removing sub-package from context
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 0.9   Edit
Assignee: Miles Parker CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 354787 357742
  Show dependency tree
 
Reported: 2011-09-16 16:51 EDT by Steffen Pingel CLA
Modified: 2011-12-06 12:11 EST (History)
0 users

See Also:


Attachments
model (337 bytes, application/xml)
2011-09-16 16:51 EDT, Steffen Pingel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Pingel CLA 2011-09-16 16:51:14 EDT
Steps:
1. Create a model with a class and a sub-package
2. Remove sub-package

java.lang.NullPointerException
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject(ResourceImpl.java:740)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObject(ResourceSetImpl.java:219)
	at org.eclipse.mylyn.modeling.emf.EmfStructureBridge.getDomainObjectForHandle(EmfStructureBridge.java:137)
	at org.eclipse.mylyn.modeling.emf.EmfStructureBridge.getChildHandles(EmfStructureBridge.java:155)
	at org.eclipse.mylyn.internal.context.core.InteractionContextManager.manipulateInterestForElementHelper(InteractionContextManager.java:1011)
	at org.eclipse.mylyn.internal.context.core.InteractionContextManager.manipulateInterestForElements(InteractionContextManager.java:930)
	at org.eclipse.mylyn.internal.context.ui.actions.AbstractInterestManipulationAction.run(AbstractInterestManipulationAction.java:105)
	at org.eclipse.mylyn.internal.modeling.gmf.ui.RemoveModelFromContextAction.run(RemoveModelFromContextAction.java:41)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
	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(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	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 Steffen Pingel CLA 2011-09-16 16:51:47 EDT
Created attachment 203532 [details]
model
Comment 2 Miles Parker CLA 2011-09-21 15:45:20 EDT
Steffen, I'm not able to reproduce this, but it's likely that I'm just not following the right steps -- or perhaps inadvertently fixed it. How did you delete the package element?
Comment 3 Steffen Pingel CLA 2011-09-21 17:20:37 EDT
I think I used the context menu in the Project Explorer. Should I try again with the latest build?
Comment 4 Miles Parker CLA 2011-09-21 18:06:40 EDT
(In reply to comment #3)
> I think I used the context menu in the Project Explorer. Should I try again with
> the latest build?

Please, because I don't think it's possible to remove elements that way. :) Ecore tools supports browsing capabilities only, not editing in the project explorer.
Comment 5 Miles Parker CLA 2011-09-21 18:09:26 EDT
Also, I'm noticing something else broken with the context menu so it's likely you won't be able to use it at all anyway. And also.. note that Papyrus breaks ecore tools bug 357296 so you'd need to be running without the papyrus plugins active.
Comment 6 Miles Parker CLA 2011-09-21 19:25:55 EDT
OK, I've finally been able to reproduce this -- I was totally misunderstanding and thought you were referring to remove the element itself, not the interest.
Comment 7 Miles Parker CLA 2011-09-23 21:09:35 EDT
OK, I think I finally squashed this. And I've got it under testing as well! (Not all of the UI part, but at least the relevant context mechanics.)