Community
Participate
Working Groups
The problem is that the Action CLOSE_ALL_SAVED makes an entry in error log when added on an RCP application. Here is how I add it: ActionFactory.CLOSE_ALL_SAVED.create(window); register(closeAllSavedAction); The Entry in error log is: The command ("org.eclipse.ui.file.closeAllSaved") is undefined With the following stacktrace: ---------------------------- java.lang.Exception at org.eclipse.jface.action.ExternalActionManager$CommandCallback.isActive(ExternalActionManager.java:297) at org.eclipse.jface.action.ActionContributionItem.isCommandActive(ActionContributionItem.java:589) at org.eclipse.jface.action.ActionContributionItem.isVisible(ActionContributionItem.java:645) at org.eclipse.jface.action.MenuManager.update(MenuManager.java:607) at org.eclipse.jface.action.MenuManager.update(MenuManager.java:585) at org.eclipse.jface.action.MenuManager.fill(MenuManager.java:236) at org.eclipse.jface.action.MenuManager.update(MenuManager.java:666) at org.eclipse.jface.action.MenuManager.update(MenuManager.java:585) at org.eclipse.jface.action.MenuManager.createMenuBar(MenuManager.java:159) at org.eclipse.jface.action.MenuManager.createMenuBar(MenuManager.java:175) at org.eclipse.ui.internal.WorkbenchWindow.createDefaultContents(WorkbenchWindow.java:1009) at org.eclipse.ui.internal.WorkbenchWindowConfigurer.createDefaultContents(WorkbenchWindowConfigurer.java:624) at org.eclipse.ui.application.WorkbenchWindowAdvisor.createWindowContents(WorkbenchWindowAdvisor.java:268) at org.eclipse.ui.internal.WorkbenchWindow.createContents(WorkbenchWindow.java:974) at org.eclipse.jface.window.Window.create(Window.java:426) etc... etc... ---------------------------- The most suprising is that the action seems to works fine either in file menu (where I added it) and toolbar. A post on newsgroup has been opened about this: http://www.eclipse.org/newsportal/article.php?id=31067&group=eclipse.platform.rcp#31067
Always existing in Eclipse 4.2
(In reply to comment #1) > Always existing in Eclipse 4.2 Please post a stack trace, as the one from comment #0 will no longer occur. PW
Here the stack trace : 08:07:28,609 DEBUG nc.gouv.dsf.pac.client.WorkbenchErrorHandler.handle(69): Erreur : style=1, severity=ERROR, code=0, message=La commande ("org.eclipse.ui.file.closeAllSaved") n'est pas définie, exception=java.lang.Exception 08:07:28,781 WARN nc.gouv.dsf.pac.client.WorkbenchErrorHandler.handle(163): Erreur inconnue java.lang.Exception at org.eclipse.jface.action.ExternalActionManager$CommandCallback.isActive(ExternalActionManager.java:370) at org.eclipse.jface.action.ActionContributionItem.isCommandActive(ActionContributionItem.java:647) at org.eclipse.jface.action.ActionContributionItem.isVisible(ActionContributionItem.java:703) at org.eclipse.ui.internal.WorkbenchWindow.fill(WorkbenchWindow.java:896) at org.eclipse.ui.internal.WorkbenchWindow.fill(WorkbenchWindow.java:874) at org.eclipse.ui.internal.WorkbenchWindow.setup(WorkbenchWindow.java:569) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:861) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:113) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:83) at org.eclipse.e4.core.contexts.ContextInjectionFactory.inject(ContextInjectionFactory.java:72) at org.eclipse.ui.internal.Workbench.createWorkbenchWindow(Workbench.java:1252) at org.eclipse.ui.internal.Workbench.getActiveWorkbenchWindow(Workbench.java:1224) at org.eclipse.ui.internal.services.WorkbenchSourceProvider.updateActiveShell(WorkbenchSourceProvider.java:924) at org.eclipse.ui.internal.services.WorkbenchSourceProvider.getCurrentState(WorkbenchSourceProvider.java:133) at org.eclipse.ui.internal.services.WorkbenchSourceProvider$6.handleEvent(WorkbenchSourceProvider.java:684) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058) at org.eclipse.swt.widgets.Decorations.WM_ACTIVATE(Decorations.java:1664) at org.eclipse.swt.widgets.Shell.WM_ACTIVATE(Shell.java:2145) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4525) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341) at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1627) at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2069) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4976) at org.eclipse.swt.internal.win32.OS.BringWindowToTop(Native Method) at org.eclipse.swt.widgets.Decorations.bringToTop(Decorations.java:231) at org.eclipse.swt.widgets.Shell.open(Shell.java:1217) at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer.postProcess(WBWRenderer.java:735) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:643) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:729) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:700) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:694) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:679) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:981) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:940) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:587) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:542) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at nc.gouv.dsf.pac.client.Application.start(Application.java:97) 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:353) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584) at org.eclipse.equinox.launcher.Main.run(Main.java:1438) at org.eclipse.equinox.launcher.Main.main(Main.java:1414) To solve this error, I have to defined "org.eclipse.ui.file.closeAllSaved" command in the plugin.xml file : <extension point="org.eclipse.ui.commands"> <!-- Rmq: workaround lié au bug eclipse 236398 >> voir : (http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/msg31160.html) >> et : https://bugs.eclipse.org/bugs/show_bug.cgi?id=236398 --> <command categoryId="org.eclipse.ui.category.file" id="org.eclipse.ui.file.closeAllSaved" name="Close All Saved" /> <!-- Fin workaround bug eclipse 236398 --> Regards.
(In reply to comment #3) > To solve this error, I have to defined "org.eclipse.ui.file.closeAllSaved" > command in the plugin.xml file : > <extension point="org.eclipse.ui.commands"> > <!-- Rmq: workaround lié au bug eclipse 236398 > >> voir : > (http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/msg31160.html) > >> et : https://bugs.eclipse.org/bugs/show_bug.cgi?id=236398 --> > <command > categoryId="org.eclipse.ui.category.file" > id="org.eclipse.ui.file.closeAllSaved" > name="Close All Saved" /> > <!-- Fin workaround bug eclipse 236398 --> > > Regards. Yes, you are correct. The org.eclipse.ui plugin does not define the org.eclipse.ui.file.closeAllSaved command, and that's causing your error log message. You have the correct workaround, and if you submit your change I'll make sure it gets into Kepler. See http://wiki.eclipse.org/Platform_UI/How_to_Contribute PW
Created attachment 229475 [details] Patch from eclipse.platform.ui master branch to org.eclipse.ui project Here a patch created on eclipse.platform.ui master branch. You must apply it on org.eclipse.ui project. My knowledge of git and English language have not helped me understand how I push my changes. Regards, Arnaud.
It's OK, thank you for the patch. Released as http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=21e67ff09dca32ef46bf194a17289b976c6fd7a0 PW
In 4.3.0.I20130516-2200 PW