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

Bug 56816

Summary: [Workbench] Error when dragging properties tab elsewhere on the tool
Product: [Eclipse Project] Platform Reporter: Yves Grenier <ygrenier>
Component: UIAssignee: Stefan Xenos <sxenos>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P1 CC: christof_marti, john.arthorne, mwa, steven.melzer, wswb0922
Version: 3.0   
Target Milestone: 3.0 M9   
Hardware: All   
OS: All   
Whiteboard:

Description Yves Grenier CLA 2004-03-30 15:24:05 EST
Steps to reproduce:

Start the workbench
Create a New Simple Project called Test
Do File/New/Other, click on show all wizards
Expand Example EMF Model Creation Wizards
Select Ecore Model
Click on Next
Select Test
Click on Next
In the Model Object field, select EPackage
Click on Finish
Do Window/Show View/Properties
(Note that the properties pane is all empty)
Drag the properties pane on top of the tasks pane
You get: "An error as occurred. See error log for more details"

Note that this error seems to cause other issues. Did get errors on closing the 
tool or files after this one happens.

Here is the log content:

!SESSION Mar 30, 2004 14:00:19.594 ---------------------------------------------
java.fullversion=J2RE 1.4.2 IBM build cxia32dev-20040322 (JIT enabled: jitc)
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
!ENTRY org.eclipse.core.runtime 4 2 Mar 30, 2004 14:00:19.594
!MESSAGE Problems occurred when invoking code from plug-
in: "org.eclipse.core.runtime".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.ui.internal.presentations.BasicStackPresentation.initTab
(BasicStackPresentation.java:610)
	at 
org.eclipse.ui.internal.presentations.BasicStackPresentation.childPropertyChange
d(BasicStackPresentation.java:376)
	at 
org.eclipse.ui.internal.presentations.BasicStackPresentation$7.propertyChanged
(BasicStackPresentation.java:190)
	at org.eclipse.ui.internal.PresentableViewPart.firePropertyChange
(PresentableViewPart.java:54)
	at org.eclipse.ui.internal.ViewPane.toolBarResized(ViewPane.java:278)
	at org.eclipse.ui.internal.ViewPane.access$0(ViewPane.java:269)
	at org.eclipse.ui.internal.ViewPane$PaneToolBarManager.relayout
(ViewPane.java:92)
	at org.eclipse.jface.action.ToolBarManager.update
(ToolBarManager.java:289)
	at org.eclipse.ui.internal.ViewPane.updateActionBars(ViewPane.java:566)
	at org.eclipse.ui.internal.ViewActionBars.updateActionBars
(ViewActionBars.java:55)
	at org.eclipse.ui.part.PageBookView.showPageRec(PageBookView.java:719)
	at org.eclipse.ui.part.PageBookView.partActivated(PageBookView.java:569)
	at org.eclipse.ui.views.properties.PropertySheet.partActivated
(PropertySheet.java:162)
	at org.eclipse.ui.internal.PartListenerList$1.run
(PartListenerList.java:49)
	at org.eclipse.core.internal.runtime.InternalPlatform.run
(InternalPlatform.java:610)
	at org.eclipse.core.runtime.Platform.run(Platform.java:521)
	at org.eclipse.ui.internal.PartListenerList.firePartActivated
(PartListenerList.java:47)
	at org.eclipse.ui.internal.WorkbenchPage.firePartActivated
(WorkbenchPage.java:1296)
	at org.eclipse.ui.internal.WorkbenchPage.setActivePart
(WorkbenchPage.java:2595)
	at org.eclipse.ui.internal.WorkbenchPage.requestActivation
(WorkbenchPage.java:2290)
	at org.eclipse.ui.internal.PartPane.requestActivation(PartPane.java:290)
	at org.eclipse.ui.internal.PartPane.setFocus(PartPane.java:317)
	at org.eclipse.ui.internal.PartTabFolder.presentationSelectionChanged
(PartTabFolder.java:638)
	at org.eclipse.ui.internal.PartTabFolder.access$3
(PartTabFolder.java:628)
	at org.eclipse.ui.internal.PartTabFolder$1.selectPart
(PartTabFolder.java:140)
	at 
org.eclipse.ui.internal.presentations.BasicStackPresentation$4.handleEvent
(BasicStackPresentation.java:159)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java
(Compiled Code))
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined 
Compiled Code))
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Compiled Code))
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:948)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:818)
	at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:2904)
	at org.eclipse.swt.custom.CTabFolder.destroyItem(CTabFolder.java:627)
	at org.eclipse.swt.custom.CTabItem.dispose(CTabItem.java:148)
	at 
org.eclipse.ui.internal.presentations.BasicStackPresentation.removePart
(BasicStackPresentation.java:637)
	at org.eclipse.ui.internal.PartTabFolder.remove(PartTabFolder.java:655)
	at org.eclipse.ui.internal.PerspectivePresentation.derefPart
(PerspectivePresentation.java:486)
	at org.eclipse.ui.internal.RootLayoutContainer.derefPart
(RootLayoutContainer.java:253)
	at org.eclipse.ui.internal.PartSashContainer.stackPane
(PartSashContainer.java:732)
	at org.eclipse.ui.internal.PartSashContainer.stack
(PartSashContainer.java:710)
	at org.eclipse.ui.internal.PartSashContainer.dropObject
(PartSashContainer.java:668)
	at org.eclipse.ui.internal.RootLayoutContainer.dropObject
(RootLayoutContainer.java:191)
	at org.eclipse.ui.internal.PartSashContainer$3.drop
(PartSashContainer.java:627)
	at org.eclipse.ui.internal.dnd.DragUtil.performDrag(DragUtil.java:109)
	at org.eclipse.ui.internal.PartTabFolder$1.dragStart
(PartTabFolder.java:92)
	at 
org.eclipse.ui.internal.presentations.BasicStackPresentation$10.handleEvent
(BasicStackPresentation.java:274)
	at org.eclipse.ui.presentations.PresentationUtil.handleMouseMove
(PresentationUtil.java:86)
	at org.eclipse.ui.presentations.PresentationUtil.access$1
(PresentationUtil.java:79)
	at org.eclipse.ui.presentations.PresentationUtil$2.handleEvent
(PresentationUtil.java:58)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java
(Compiled Code))
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined 
Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java
(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java
(Compiled Code))
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java
(Compiled Code))
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1536)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
(Workbench.java:257)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:139)
	at org.eclipse.ui.internal.ide.IDEApplication.run
(IDEApplication.java:90)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run
(PlatformActivator.java:277)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:239)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:117)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:84)
	at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:59)
	at java.lang.reflect.Method.invoke(Method.java:389)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:267)
	at org.eclipse.core.launcher.Main.run(Main.java:692)
	at org.eclipse.core.launcher.Main.main(Main.java:676)
!ENTRY org.eclipse.core.runtime 4 2 Mar 30, 2004 14:00:21.757
!MESSAGE Problems occurred when invoking code from plug-
in: "org.eclipse.core.runtime".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.ui.internal.presentations.BasicStackPresentation.initTab
(BasicStackPresentation.java:610)
	at 
org.eclipse.ui.internal.presentations.BasicStackPresentation.childPropertyChange
d(BasicStackPresentation.java:376)
	at 
org.eclipse.ui.internal.presentations.BasicStackPresentation$7.propertyChanged
(BasicStackPresentation.java:190)
	at org.eclipse.ui.internal.PresentableViewPart.firePropertyChange
(PresentableViewPart.java:54)
	at org.eclipse.ui.internal.ViewPane.toolBarResized(ViewPane.java:278)
	at org.eclipse.ui.internal.ViewPane.access$0(ViewPane.java:269)
	at org.eclipse.ui.internal.ViewPane$PaneToolBarManager.relayout
(ViewPane.java:92)
	at org.eclipse.jface.action.ToolBarManager.update
(ToolBarManager.java:289)
	at org.eclipse.ui.internal.ViewPane.updateActionBars(ViewPane.java:566)
	at org.eclipse.ui.internal.ViewActionBars.updateActionBars
(ViewActionBars.java:55)
	at org.eclipse.ui.part.PageBookView.showPageRec(PageBookView.java:719)
	at org.eclipse.ui.part.PageBookView.partActivated(PageBookView.java:567)
	at org.eclipse.ui.views.properties.PropertySheet.partActivated
(PropertySheet.java:162)
	at org.eclipse.ui.internal.PartListenerList$1.run
(PartListenerList.java:49)
	at org.eclipse.core.internal.runtime.InternalPlatform.run
(InternalPlatform.java:610)
	at org.eclipse.core.runtime.Platform.run(Platform.java:521)
	at org.eclipse.ui.internal.PartListenerList.firePartActivated
(PartListenerList.java:47)
	at org.eclipse.ui.internal.WorkbenchPage.firePartActivated
(WorkbenchPage.java:1296)
	at org.eclipse.ui.internal.WorkbenchPage.setActivePart
(WorkbenchPage.java:2595)
	at org.eclipse.ui.internal.WorkbenchPage.requestActivation
(WorkbenchPage.java:2290)
	at org.eclipse.ui.internal.PartPane.requestActivation(PartPane.java:290)
	at org.eclipse.ui.internal.EditorPane.requestActivation
(EditorPane.java:167)
	at org.eclipse.ui.internal.PartPane.handleEvent(PartPane.java:270)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java
(Compiled Code))
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined 
Compiled Code))
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Compiled Code))
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Compiled Code))
	at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:859)
	at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:2142)
	at org.eclipse.swt.widgets.Control.gtk_event_after(Control.java
(Compiled Code))
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled 
Code))
	at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(Native Method)
	at org.eclipse.swt.widgets.Display.eventProc(Display.java(Compiled 
Code))
	at org.eclipse.swt.internal.gtk.OS.gtk_main_iteration(Native Method)
	at org.eclipse.swt.widgets.Display.update(Display.java(Inlined Compiled 
Code))
	at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled 
Code))
	at org.eclipse.jface.window.Window.open(Window.java:650)
	at org.eclipse.jface.dialogs.MessageDialog.openError
(MessageDialog.java:285)
	at org.eclipse.jface.util.SafeRunnable.handleException
(SafeRunnable.java:50)
	at org.eclipse.ui.internal.PartListenerList$1.handleException
(PartListenerList.java:52)
	at org.eclipse.core.internal.runtime.InternalPlatform.handleException
(InternalPlatform.java:345)
	at org.eclipse.core.internal.runtime.InternalPlatform.run
(InternalPlatform.java:612)
	at org.eclipse.core.runtime.Platform.run(Platform.java:521)
	at org.eclipse.ui.internal.PartListenerList.firePartActivated
(PartListenerList.java:47)
	at org.eclipse.ui.internal.WorkbenchPage.firePartActivated
(WorkbenchPage.java:1296)
	at org.eclipse.ui.internal.WorkbenchPage.setActivePart
(WorkbenchPage.java:2595)
	at org.eclipse.ui.internal.WorkbenchPage.requestActivation
(WorkbenchPage.java:2290)
	at org.eclipse.ui.internal.PartPane.requestActivation(PartPane.java:290)
	at org.eclipse.ui.internal.PartPane.setFocus(PartPane.java:317)
	at org.eclipse.ui.internal.PartTabFolder.presentationSelectionChanged
(PartTabFolder.java:638)
	at org.eclipse.ui.internal.PartTabFolder.access$3
(PartTabFolder.java:628)
	at org.eclipse.ui.internal.PartTabFolder$1.selectPart
(PartTabFolder.java:140)
	at 
org.eclipse.ui.internal.presentations.BasicStackPresentation$4.handleEvent
(BasicStackPresentation.java:159)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java
(Compiled Code))
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined 
Compiled Code))
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Compiled Code))
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:948)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:818)
	at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:2904)
	at org.eclipse.swt.custom.CTabFolder.destroyItem(CTabFolder.java:627)
	at org.eclipse.swt.custom.CTabItem.dispose(CTabItem.java:148)
	at 
org.eclipse.ui.internal.presentations.BasicStackPresentation.removePart
(BasicStackPresentation.java:637)
	at org.eclipse.ui.internal.PartTabFolder.remove(PartTabFolder.java:655)
	at org.eclipse.ui.internal.PerspectivePresentation.derefPart
(PerspectivePresentation.java:486)
	at org.eclipse.ui.internal.RootLayoutContainer.derefPart
(RootLayoutContainer.java:253)
	at org.eclipse.ui.internal.PartSashContainer.stackPane
(PartSashContainer.java:732)
	at org.eclipse.ui.internal.PartSashContainer.stack
(PartSashContainer.java:710)
	at org.eclipse.ui.internal.PartSashContainer.dropObject
(PartSashContainer.java:668)
	at org.eclipse.ui.internal.RootLayoutContainer.dropObject
(RootLayoutContainer.java:191)
	at org.eclipse.ui.internal.PartSashContainer$3.drop
(PartSashContainer.java:627)
	at org.eclipse.ui.internal.dnd.DragUtil.performDrag(DragUtil.java:109)
	at org.eclipse.ui.internal.PartTabFolder$1.dragStart
(PartTabFolder.java:92)
	at 
org.eclipse.ui.internal.presentations.BasicStackPresentation$10.handleEvent
(BasicStackPresentation.java:274)
	at org.eclipse.ui.presentations.PresentationUtil.handleMouseMove
(PresentationUtil.java:86)
	at org.eclipse.ui.presentations.PresentationUtil.access$1
(PresentationUtil.java:79)
	at org.eclipse.ui.presentations.PresentationUtil$2.handleEvent
(PresentationUtil.java:58)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java
(Compiled Code))
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined 
Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java
(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java
(Compiled Code))
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java
(Compiled Code))
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1536)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
(Workbench.java:257)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:139)
	at org.eclipse.ui.internal.ide.IDEApplication.run
(IDEApplication.java:90)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run
(PlatformActivator.java:277)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:239)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:117)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:84)
	at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:59)
	at java.lang.reflect.Method.invoke(Method.java:389)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:267)
	at org.eclipse.core.launcher.Main.run(Main.java:692)
	at org.eclipse.core.launcher.Main.main(Main.java:676)
Comment 1 Ed Merks CLA 2004-03-30 15:40:04 EST
Yves, the properties view and its drag and drop support is part of the workbench 
not part of EMF; EMF is not even on the stack in your stack trace.  I couldn't 
reproduce this with M8 on Windows so this is likely a platform specific problem. 
  I will reassign this bugzilla to the platform.
Comment 2 Yves Grenier CLA 2004-03-30 16:03:28 EST
YG: I initially tought that this is an EMF bug since I could not reproduce 
creating other type of artifacts. The bug is happening on Red Hat Linux and 
Windows XP.
Comment 3 Rafael Chaves CLA 2004-03-30 16:23:29 EST
Please provide Eclipse version or build.
Comment 4 Yves Grenier CLA 2004-03-30 16:53:58 EST
YG:

Eclipse build number is 200403261517

We also found that this happens for any editor that populates the property 
viewer so it is not EMF (Sorry guys!)
Comment 5 Randy Hudson CLA 2004-03-31 10:06:15 EST
The same problem was observed when using GEF.
Comment 6 Debbie Wilson CLA 2004-04-20 11:20:34 EDT
*** Bug 58627 has been marked as a duplicate of this bug. ***
Comment 7 Debbie Wilson CLA 2004-05-03 10:03:23 EDT
Easier steps to reproduce this problem in bug 60637.
Comment 8 Debbie Wilson CLA 2004-05-03 10:03:38 EDT
*** Bug 60637 has been marked as a duplicate of this bug. ***
Comment 9 Michael Van Meekeren CLA 2004-05-04 17:00:01 EDT
marking to be fixed for M9, Stefan please see steps in  bug 60637 to recreate.
Comment 10 Stefan Xenos CLA 2004-05-08 06:17:42 EDT
*** Bug 59594 has been marked as a duplicate of this bug. ***
Comment 11 Stefan Xenos CLA 2004-05-08 06:18:30 EDT
*** Bug 59370 has been marked as a duplicate of this bug. ***
Comment 12 John Wiegand CLA 2004-05-10 20:36:32 EDT
steps comment #9 (saying to use bug 60637 instructions) no longer work as PDE 
editor has been changed - property view no longer being populated by PDE 
editor.  
Comment 13 Stefan Xenos CLA 2004-05-10 21:13:03 EDT
*** Bug 61578 has been marked as a duplicate of this bug. ***
Comment 14 Stefan Xenos CLA 2004-05-10 21:20:45 EDT
This can still be reproduced with the schema editor.

It seems to be caused by the fact that removePart is triggering a selection change.
Comment 15 Stefan Xenos CLA 2004-05-11 21:52:54 EDT
Fixed in HEAD.

Added check to PartStack to ignore presentation selection changes triggered by a
removal, and added a check to the presentation to ignore property changes coming
from a tab in the process of being disposed.
Comment 16 Stefan Xenos CLA 2004-05-11 21:54:28 EDT
Forgot to close bug :-)
Comment 17 Tod Creasey CLA 2004-05-14 11:11:40 EDT
*** Bug 58627 has been marked as a duplicate of this bug. ***