Project: Eclipse_Platform_UI
Bug 45108 [Contributions] SubContributionManger.find(String) throws exception
Reported: 2003-10-17 11:00:14 | Status: verified fixed

I20031015 I wrote the following code: // @see EditorActionBarContributor#contributeToStatusLine public void contributeToStatusLine(IStatusLineManager statusLineManager) { super.contributeToStatusLine(statusLineManager); if (statusLineManager.find("<someString>") != null) statusLineManager.insertBefore("<someString>",(IContributionItem)fStatusFields.get(STATUSFIELDS[0])); and got: !ENTRY org.eclipse.ui.workbench 4 2 Okt 17, 2003 16:49:48.592 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench". !STACK 0 org.eclipse.jface.util.Assert$AssertionFailedException: Assertion failed: at java.lang.Throwable.<init>(Throwable.java) at java.lang.Throwable.<init>(Throwable.java:73) at org.eclipse.jface.util.Assert$AssertionFailedException.<init>(Assert.java:54) at org.eclipse.jface.util.Assert.isTrue(Assert.java:168) at org.eclipse.jface.util.Assert.isTrue(Assert.java:154) at org.eclipse.jface.action.SubContributionManager.unwrap(SubContributionManager.java:301) at org.eclipse.jface.action.SubContributionManager.find(SubContributionManager.java:94) at org.eclipse.ui.texteditor.BasicTextEditorActionContributor.contributeToStatusLine(BasicTextEditorActionContributor.java) at org.eclipse.ui.part.EditorActionBarContributor.init(EditorActionBarContributor.java:139) at org.eclipse.ui.part.EditorActionBarContributor.init(EditorActionBarContributor.java:119) at org.eclipse.jdt.internal.ui.javaeditor.BasicJavaEditorActionContributor.init(BasicJavaEditorActionContributor.java:125) at org.eclipse.jdt.internal.ui.javaeditor.BasicEditorActionContributor.init(BasicEditorActionContributor.java:103) at org.eclipse.ui.internal.EditorManager.createEditorActionBars(EditorManager.java:195) at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:614) at org.eclipse.ui.internal.EditorManager.openInternalEditor(EditorManager.java:666) at org.eclipse.ui.internal.EditorManager.access$7(EditorManager.java:655) at org.eclipse.ui.internal.EditorManager$7.run(EditorManager.java:919) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1018) at org.eclipse.core.runtime.Platform.run(Platform.java:461) at org.eclipse.ui.internal.EditorManager.busyRestoreEditor(EditorManager.java:864) at org.eclipse.ui.internal.EditorManager$6.run(EditorManager.java:857) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:84) at org.eclipse.ui.internal.EditorManager.restoreEditor(EditorManager.java:853) at org.eclipse.ui.internal.EditorManager.restoreState(EditorManager.java:756) at org.eclipse.ui.internal.WorkbenchPage.restoreState(WorkbenchPage.java:2291) at org.eclipse.ui.internal.WorkbenchWindow.restoreState(WorkbenchWindow.java:1525) at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:2203) at org.eclipse.ui.internal.Workbench.access$14(Workbench.java:2159) at org.eclipse.ui.internal.Workbench$23.run(Workbench.java:2071) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1018) at org.eclipse.core.runtime.Platform.run(Platform.java:461) at org.eclipse.ui.internal.Workbench.openPreviousWorkbenchState(Workbench.java:2024) at org.eclipse.ui.internal.Workbench.init(Workbench.java:1761) at org.eclipse.ui.internal.Workbench.run(Workbench.java:2332) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41) at java.lang.reflect.Method.invoke(Method.java:386) at org.eclipse.core.launcher.Main.basicRun(Main.java:291) at org.eclipse.core.launcher.Main.run(Main.java:747) at org.eclipse.core.launcher.Main.main(Main.java:583)

Files changed in fix:
bundles/org.eclipse.jface/src/org/eclipse/jface/action/SubContributionManager.java