Class CloseProjectActionProvider

All Implemented Interfaces:
IMementoAware

public class CloseProjectActionProvider extends CommonActionProvider
Puts iiziGo's Close Project and Close Unrelated Projects (CloseResourceActionEx, CloseUnrelatedProjectsActionEx) in the place of Eclipse's two actions, in every navigator that shows the IIZI content - the IIZI Explorer and the Project Explorer: in the context menu of a project, and as the handlers of Project > Close Project and Close Unrelated Projects while the navigator is the active part.

The provider depends on Eclipse's provider of those actions (org.eclipse.ui.navigator.resources.ResourceMgmtActions, see plugin.xml), so it is asked right after it: Eclipse's provider has added its two actions, and they are replaced here by item identity (iiziGo's actions carry the identities of Eclipse's). Build, Refresh and Open Project stay Eclipse's.

Author:
Christopher Mindus
  • Constructor Details

    • CloseProjectActionProvider

      public CloseProjectActionProvider()
  • Method Details

    • init

      public void init(ICommonActionExtensionSite site)
      Initializes the provider: makes the two actions.
      Overrides:
      init in class CommonActionProvider
      Parameters:
      site - The site of the provider.
    • getCloseProjectAction

      public CloseResourceActionEx getCloseProjectAction()
      Gets Close Project.
      Returns:
      The action.
    • getCloseUnrelatedProjectsAction

      public CloseUnrelatedProjectsActionEx getCloseUnrelatedProjectsAction()
      Gets Close Unrelated Projects.
      Returns:
      The action.
    • fillActionBars

      public void fillActionBars(IActionBars actionBars)
      Sets the two actions as the handlers of the Project menu's Close Project and Close Unrelated Projects.
      Overrides:
      fillActionBars in class ActionGroup
      Parameters:
      actionBars - The action bars of the navigator.
    • fillContextMenu

      public void fillContextMenu(IMenuManager menu)
      Replaces Eclipse's two actions in the context menu, where Eclipse's provider added them.
      Overrides:
      fillContextMenu in class ActionGroup
      Parameters:
      menu - The context menu.
    • updateActionBars

      public void updateActionBars()
      Tells the two actions the selection.
      Overrides:
      updateActionBars in class ActionGroup