Community
Participate
Working Groups
1. Open a file. The editor is active. 2. Close the 'Problems' view. 3. The bottom stack is now active (as observed by the colouring). 4. If you move try to type stuff, the text goes in the editor though. org.eclipse.e4.workbench.ui.renderers.swt.StackRenderer.activateStack(StackRenderer.java:94) at org.eclipse.e4.workbench.ui.renderers.swt.StackRenderer.access$4(StackRenderer.java:93) at org.eclipse.e4.workbench.ui.renderers.swt.StackRenderer$5.widgetSelected(StackRenderer.java:433) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1050) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1074) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1059) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:773) at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:2722) at org.eclipse.swt.custom.CTabFolder.destroyItem(CTabFolder.java:500) at org.eclipse.swt.custom.CTabItem.dispose(CTabItem.java:125) at org.eclipse.e4.workbench.ui.renderers.swt.StackRenderer.hideChild(StackRenderer.java:381) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.removeGui(PartRenderingEngine.java:400) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine$1.handleEvent(PartRenderingEngine.java:95) at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:41) at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:188) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:198) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149) at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:139) at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:76) at org.eclipse.e4.workbench.ui.internal.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:380) at org.eclipse.e4.ui.model.application.impl.PartImpl.setToBeRendered(PartImpl.java:508) at org.eclipse.e4.workbench.ui.internal.PartServiceImpl.hidePart(PartServiceImpl.java:517) at org.eclipse.e4.workbench.ui.renderers.swt.StackRenderer$6.close(StackRenderer.java:447) at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1578) at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:261) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1050) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4039) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3630) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine$5.run(PartRenderingEngine.java:553)
(In reply to comment #0) > 4. If you move try to type stuff, the text goes in the editor though. This is likely because we don't actually invoke setFocus(). See bug 308679.
Same thing happens if you have two editors open and a view active and you then invoke Ctrl+W to close the active editor. The editor stack will now become active.
Created attachment 165278 [details] StackRenderer patch v1 This is an illustrative patch to only activate the part if it's actually in the same stack that the currently active part is. I'm not entirely convinced that this is the right way to go though.
Remy, why don't we start to implement the 3.x activation history logic (which is what we should have anyways). Keep track of the activations and when the active part is closed revert the activation to the most recently active part that is still in the UI. I'm not sure but I think that the legacy handling also supports view/editor specific handling (i.e. if it was an editor that closed then it tries to maintain the activation within the editors).
Remy, what's the state of the activation history ?
(In reply to comment #5) > Remy, what's the state of the activation history ? Right now, we got nothin'.
This is still a problem. Just open two editors, activate a view, and then hit Ctrl+W. The editor stack suddenly becomes the active stack.
I'm wondering if we can remove the stack activation request in the widget selection listener. I'd expect an activation event to be sent to the CTabFolder if an item was actually clicked on by the user, so can that line (420) be removed?
This reminds me of bug 319799, where a widget selection event is also causing part stack activation and focus change...not sure it's the *same* bug, but similar.
*** Bug 319799 has been marked as a duplicate of this bug. ***
In RC2 I see the opposite effect which is also not really nice when selecting a Tab with the mouse the editor is not getting focus which means a second click is needed and this kills productivity by 10 because e.g. the last cursor position is not restored. And for the record navigating the TabFolder with the keyboard IS not supported in 3.x!
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
This is a mass change to close all e4 bugs marked with "stalebug" whiteboard. If this bug is still valid, please reopen and remove the "stalebug" keyword.