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

Bug 408353

Summary: [Contributions] closeAllSaved should be added to IWorkbenchCommandConstants
Product: [Eclipse Project] Platform Reporter: Paul Webster <pwebster>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: arnaud.brunet+eclipse, daniel.rolka, lucyberad, pwebster
Version: 4.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard: stalebug
Bug Depends on: 236398    
Bug Blocks:    
Attachments:
Description Flags
Add FILE_CLOSE_ALL_SAVED constant in IWorkbenchCommandConstants none

Description Paul Webster CLA 2013-05-17 10:51:51 EDT
This command needs an entry in the IWorkbenchCommandConstants.

+++ This bug was initially created as a clone of Bug #236398 +++

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
Comment 1 Arnaud Brunet CLA 2013-05-17 18:07:12 EDT
Created attachment 231178 [details]
Add FILE_CLOSE_ALL_SAVED constant in IWorkbenchCommandConstants

Here a patch
Comment 2 Daniel Rolka CLA 2013-09-25 10:53:21 EDT
(In reply to Arnaud Brunet from comment #1)
> Created attachment 231178 [details]
> Add FILE_CLOSE_ALL_SAVED constant in IWorkbenchCommandConstants
> 
> Here a patch

Thanks for this patch however it is only part of the bigger patch for the reported issue.

I'm going to investigate it,
Daniel
Comment 3 Eclipse Genie CLA 2020-03-01 17:45:00 EST
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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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.