0
votes

I have Eclipse RCP DSL application. Build All option does not work in case end user does not save manually all changed files. I need to find the following : - Can I save all DSL source file automatically when user click "Build All" menu item. From other hand I have to set "Save Before Build" option programmaticaly

Thank you Alex

1

1 Answers

1
votes

There is a 'Save automatically before build' option in the Preferences in 'General > Workspace'.

If this option is set the build action does something like:

IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();

for (IWorkbenchWindow window : windows) {
    IWorkbenchPage[] pages = window.getPages();

    for (IWorkbenchPage page : pages) {
        page.saveAllEditors(false);
    }
}