This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 409324 - Editors Ping Pong once the Outline View has been activated
Summary: Editors Ping Pong once the Outline View has been activated
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: 4.4 M1   Edit
Assignee: Eric Moffatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 410468 410955 (view as bug list)
Depends on:
Blocks: 409746 414048
  Show dependency tree
 
Reported: 2013-05-28 14:16 EDT by Markus Keller CLA
Modified: 2013-08-07 04:03 EDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2013-05-28 14:16:44 EDT
4.3.0.I20130526-2000

I sometimes get the ISE below when I switch between open editor tabs using the mouse. It doesn't happen all the time, but once it started, it usually continues to happen with every further click.

I haven't seen this before the I20130526-2000 build.

Warning
Tue May 28 20:08:52 CEST 2013
Blocked recursive attempt to activate part

java.lang.IllegalStateException
	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer$2.setFocus(ContributedPartRenderer.java:119)
	at org.eclipse.swt.custom.CTabItem.setFocus(CTabItem.java:329)
	at org.eclipse.swt.custom.CTabFolder.setFocus(CTabFolder.java:2509)
	at org.eclipse.swt.widgets.Control.fixFocus(Control.java:1053)
	at org.eclipse.swt.widgets.Control.setVisible(Control.java:3819)
	at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3049)
	at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3006)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1101)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:66)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4688)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:205)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
	at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
	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:80)
	at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58)
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
	at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:171)
	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:576)
	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:543)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:605)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:585)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.setPart(PartServiceImpl.java:158)
	at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:613)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.internal.contexts.ContextObjectSupplier$ContextInjectionListener.update(ContextObjectSupplier.java:88)
	at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:107)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:328)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:342)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.activate(EclipseContext.java:625)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.activateBranch(EclipseContext.java:630)
	at org.eclipse.e4.ui.internal.workbench.PartActivationHistory.activate(PartActivationHistory.java:52)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:588)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:539)
	at org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer.activate(AbstractPartRenderer.java:104)
	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer$1.handleEvent(ContributedPartRenderer.java:59)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1081)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
	at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1453)
	at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1416)
	at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:2856)
	at org.eclipse.swt.widgets.Widget.wmSetFocus(Widget.java:2421)
	at org.eclipse.swt.widgets.Control.WM_SETFOCUS(Control.java:5235)
	at org.eclipse.swt.widgets.Canvas.WM_SETFOCUS(Canvas.java:457)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4681)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:340)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4977)
	at org.eclipse.swt.internal.win32.OS.$$YJP$$CallWindowProcW(Native Method)
	at org.eclipse.swt.internal.win32.OS.CallWindowProcW(OS.java)
	at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2443)
	at org.eclipse.swt.internal.BidiUtil.windowProc(BidiUtil.java:639)
	at org.eclipse.swt.internal.win32.OS.$$YJP$$SetFocus(Native Method)
	at org.eclipse.swt.internal.win32.OS.SetFocus(OS.java)
	at org.eclipse.swt.widgets.Control.forceFocus(Control.java:1098)
	at org.eclipse.swt.widgets.Control.setFocus(Control.java:3323)
	at org.eclipse.swt.widgets.Composite.setFocus(Composite.java:1042)
	at org.eclipse.ui.texteditor.AbstractTextEditor.setFocus(AbstractTextEditor.java:6213)
	at org.eclipse.ui.texteditor.StatusTextEditor.setFocus(StatusTextEditor.java:122)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.setFocus(JavaEditor.java:2389)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.delegateSetFocus(CompatibilityPart.java:192)
	at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:613)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:249)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:220)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:107)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.focusGui(PartRenderingEngine.java:763)
	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer$2.setFocus(ContributedPartRenderer.java:102)
	at org.eclipse.swt.custom.CTabItem.setFocus(CTabItem.java:329)
	at org.eclipse.swt.custom.CTabFolder.setFocus(CTabFolder.java:2509)
	at org.eclipse.swt.widgets.Control.fixFocus(Control.java:1053)
	at org.eclipse.swt.widgets.Control.setVisible(Control.java:3819)
	at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3049)
	at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3057)
	at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1753)
	at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:278)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	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:354)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:613)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
Comment 1 Dani Megert CLA 2013-05-28 14:28:05 EDT
I've also seen this using I20130526-2000, but could not reproduce yet.
Comment 2 Eric Moffatt CLA 2013-05-29 13:51:34 EDT
Markus, is this just switching between java files ? Are there any '.class' files involved ?
Comment 3 Markus Keller CLA 2013-05-29 14:24:25 EDT
I currently get the ISE when I switch to or away from a .java or .class file editor (with or without a source attachment). I don't get it when I just switch between text or .properties file editors.
Comment 4 Markus Keller CLA 2013-05-30 13:37:48 EDT
Steps in I20130529-2000:

- paste to Package Explorer:

package p;
public class C extends Object {
}

- Ctrl+click "Object"
- in the Outline view, click the "Object" type
- click tab "C.java"
- click tab "Object.class"
=> ISE
Comment 5 Lars Neumeier CLA 2013-06-02 12:15:43 EDT
I fixed the logger code in ContributedPartRenderer (line 116) and got a least the problematic ID.


Warning
Sun Jun 02 18:09:27 CEST 2013
Blocked recursive attempt to activate part org.eclipse.e4.ui.compatibility.editor

java.lang.IllegalStateException
	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer$2.setFocus(ContributedPartRenderer.java:117)
	at org.eclipse.swt.custom.CTabItem.setFocus(CTabItem.java:329)
	at org.eclipse.swt.custom.CTabFolder.setFocus(CTabFolder.java:2509)
	at org.eclipse.swt.widgets.Control.fixFocus(Control.java:1053)
	at org.eclipse.swt.widgets.Control.setVisible(Control.java:3819)
	at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3049)
	at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3006)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1101)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:66)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4688)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:205)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
	at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
	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:80)
	at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58)
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
	at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:171)
	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:576)
	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:543)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:605)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:585)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.setPart(PartServiceImpl.java:158)
	at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.internal.contexts.ContextObjectSupplier$ContextInjectionListener.update(ContextObjectSupplier.java:88)
	at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:107)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:328)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:342)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.activate(EclipseContext.java:625)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.activateBranch(EclipseContext.java:630)
	at org.eclipse.e4.ui.internal.workbench.PartActivationHistory.activate(PartActivationHistory.java:52)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:588)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:539)
	at org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer.activate(AbstractPartRenderer.java:104)
	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer$1.handleEvent(ContributedPartRenderer.java:60)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1081)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
	at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1453)
	at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1416)
	at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:2856)
	at org.eclipse.swt.widgets.Widget.wmSetFocus(Widget.java:2421)
	at org.eclipse.swt.widgets.Control.WM_SETFOCUS(Control.java:5235)
	at org.eclipse.swt.widgets.Canvas.WM_SETFOCUS(Canvas.java:457)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4681)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:340)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4977)
	at org.eclipse.swt.internal.win32.OS.SetFocus(Native Method)
	at org.eclipse.swt.widgets.Control.forceFocus(Control.java:1098)
	at org.eclipse.swt.widgets.Control.setFocus(Control.java:3323)
	at org.eclipse.swt.widgets.Composite.setFocus(Composite.java:1042)
	at org.eclipse.ui.texteditor.AbstractTextEditor.setFocus(AbstractTextEditor.java:6213)
	at org.eclipse.ui.texteditor.StatusTextEditor.setFocus(StatusTextEditor.java:122)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.setFocus(JavaEditor.java:2389)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.delegateSetFocus(CompatibilityPart.java:192)
	at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:249)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:220)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:107)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.focusGui(PartRenderingEngine.java:763)
	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer$2.setFocus(ContributedPartRenderer.java:104)
	at org.eclipse.swt.custom.CTabItem.setFocus(CTabItem.java:329)
	at org.eclipse.swt.custom.CTabFolder.setFocus(CTabFolder.java:2509)
	at org.eclipse.swt.widgets.Control.fixFocus(Control.java:1053)
	at org.eclipse.swt.widgets.Control.setVisible(Control.java:3819)
	at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3049)
	at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3057)
	at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1753)
	at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:278)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	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:354)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
	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:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
Comment 6 Markus Keller CLA 2013-06-03 07:02:39 EDT
If debugging comment 4 doesn't reveal the real cause of this, then we better disable the logging by default (i.e. make it dependent on a .options policy). The only directly visible effect is that the log is filled.
Comment 7 Eric Moffatt CLA 2013-06-03 10:24:35 EDT
The 'trigger' for this bug is unfortunately easier to get to than we first imagined...

Open two editors
just activate the Outline view by clicking on its tab
Now switching between editors can induce the bug

It turns out that this is somehow caused by the Outline view going back to showing its 'default' PageRec. During this process we deactivate the Outline view's context which somehow causes the PartService's 'setPart' to fire on the part that *was* active when the Outline view was originally focused.

The code is in ContentOutline(PageBookView):showPageRec where it does a PageSite.deactivate()...

This may well be a bug in the DI engine, firing the RATs associated with the IServiceConstants.ACTIVE_PART changing even though the context being deactivated is no longer part of the actual active context chain...
Comment 8 Dani Megert CLA 2013-06-03 11:01:20 EDT
FYI: This is caused during RC2 by Fix(3) for Bug 402073 - Keyboard shortcuts sometimes do not work for other windows:

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=8d6f0caed3b2f5204a129f09337e7c1e2ab868f1
Comment 9 Paul Webster CLA 2013-06-03 11:08:42 EDT
I've pushed a change that would turn this logging into debug tracing, https://git.eclipse.org/r/13506

I think this is probably too much for RC4, will post a different solution

PW
Comment 10 Paul Webster CLA 2013-06-03 11:35:17 EDT
I've proposed to remove the logging for Kepler in bug 409746 and keep this open so we can investigate in 4.3.1

PW
Comment 11 Eric Moffatt CLA 2013-06-04 14:09:29 EDT
FYI: As Dani points out this is indeed caused by the fox for bug 402073. I ran similar tests on 4.3.0.I20130502-0800 and we do *not* get the spurious activation of the wrong part during Outline View's deactivation.

I then copied over the changes introduced for bug 402073 and then we're back where we are now...ISE and all. Now as to why this happens I'm at a complete loss. I think that we should take a very deep look into how the EclipseContext / RATS are interacting (Paul Elder is looking into this now in the hopes of coming up with an approach to take in Luna).

BTW, if you change PageSite to neither activate nor deactivate 'e4Context' then everything seems to go OK. Note that there's always an activateBranch that takes place independently of what goes on in the Outline view so I think everything should be OK.
Comment 12 Eric Moffatt CLA 2013-06-05 10:07:46 EDT
Just to add a little more info for when we come back to this...

The issue here is that we use the currently active context 'branch' to determine the currently active part. This make the current behavior of the PageBookView (at least) suspect in that it changes the shape of the context set whenever it shows a new PageRec. Perhaps it should only be doing this when it's the active part itself ?

I tried a different approach yesterday, changing the way we manage the active part to have it *not* be a ComputedFunction but to rather be an actual value which is 'set' in the PartService's 'activate' call. This seemed to work pretty well as long as the value was stored in the MApplication's context. Could be something we want to investigate as an alternative.
Comment 13 Paul Webster CLA 2013-06-12 08:15:34 EDT
*** Bug 410468 has been marked as a duplicate of this bug. ***
Comment 14 Dani Megert CLA 2013-06-18 02:34:59 EDT
*** Bug 410955 has been marked as a duplicate of this bug. ***
Comment 15 Eric Moffatt CLA 2013-07-30 11:42:39 EDT
We're now working on the following regression introduced by the previous work; the issue is that once the Outline view has been active switching between two editors (say from "A" to "B") you get the following activations:

B activates
A activates
B activates

This is truly a performance hog; tripling our tab switching time (at least).

The issue has to do with how the PageBookView's manage their current Page's context (needed for handling commands).

I've updated the title to reflect this...
Comment 16 Eric Moffatt CLA 2013-07-30 13:38:39 EDT
Committed (to master):

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=13205bd57a0909261cf0b2fd19cd631fe9531999

Prevents a PageBookView from changing the context structure unless it's active.
Comment 17 Daniel Rolka CLA 2013-08-07 04:03:09 EDT
Verified in the build: I20130805-2000