Search code examples
eclipseeclipse-plugineclipse-rcpm2eclipse

SaveAllAction.class is missing org.eclipse.ui.workbench Plugin for eclipse 4.7.2


SaveAllAction.class is missing in this org.eclipse.ui.workbench Plugin. I found one doc, but I didn't understand, what they are used as the alternate.


Solution

  • SaveAllAction was an internal class which you should not have been using. It was removed long ago in one of the Eclipse 3 releases.

    The current equivalent is the org.eclipse.ui.file.saveAll command. You can execute this command using something like:

    IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    
    IHandlerServicer handler = window.getService(IHandlerService.class);
    
    handler.executeCommand("org.eclipse.ui.file.saveAll", null);