Class RefactoringSaveHelper

    • Field Detail


        public static final int SAVE_ALL_ALWAYS_ASK
        Save mode to save all dirty editors (always ask).
        See Also:
        Constant Field Values
      • SAVE_ALL

        public static final int SAVE_ALL
        Save mode to save all dirty editors.
        See Also:
        Constant Field Values

        public static final int SAVE_NOTHING
        Save mode to not save any editors.
        See Also:
        Constant Field Values

        public static final int SAVE_REFACTORING
        Save mode to save all editors that are known to cause trouble for Java refactorings, e.g. editors on compilation units that are not in working copy mode.
        See Also:
        Constant Field Values
    • Constructor Detail

      • RefactoringSaveHelper

        public RefactoringSaveHelper​(int saveMode)
        Creates a refactoring save helper with the given save mode.
        saveMode - one of the SAVE_* constants
    • Method Detail

      • saveEditors

        public boolean saveEditors​(Shell shell)
        Saves all editors. Depending on the PreferenceConstants.REFACTOR_SAVE_ALL_EDITORS preference, the user is asked to save affected dirty editors.
        shell - the parent shell for the confirmation dialog
        true if save was successful and refactoring can proceed; false if the refactoring must be cancelled
      • triggerIncrementalBuild

        public void triggerIncrementalBuild()
        Triggers an incremental build if this save helper did save files before.
      • didSaveFiles

        public boolean didSaveFiles()
        Returns whether this save helper did actually save any files.
        true iff files have been saved