Class CloseResourceActionEx

All Implemented Interfaces:
EventListener, IResourceChangeListener, IAction, ISelectionChangedListener

public class CloseResourceActionEx extends CloseResourceAction
Close Project of the IIZI Explorer and the Project Explorer: Eclipse's action, with the question for the changed files of the Module projects in front of it (UnsavedFiles.askBeforeClose).

Eclipse's Close Project asks only for the changed files that an editor shows. A file of a Module project can be changed without an editor - a rename made its references follow, or its editor was closed without saving - and its changes were lost at the close without a word. Here every changed file of the projects is offered first, at the moment Eclipse's action asks for the projects it closes; Cancel leaves the projects open; then Eclipse's action goes on as it always did.

Author:
Christopher Mindus
  • Constructor Details

    • CloseResourceActionEx

      public CloseResourceActionEx(IShellProvider provider)
      Creates the action.
      Parameters:
      provider - The provider of the shell for a dialog.
  • Method Details

    • run

      public void run()
      Closes the selected projects as Eclipse's action does, the changed files of the projects asked for first.
      Specified by:
      run in interface IAction
      Overrides:
      run in class CloseResourceAction
    • getSelectedResources

      protected List<? extends IResource> getSelectedResources()
      Gets the projects the action closes: in a run, after the question was answered, the projects that may be closed (CloseQuestion.closable(List)).
      Overrides:
      getSelectedResources in class CloseResourceAction
      Returns:
      The projects.