Class OpenSystemEditorAction

All Implemented Interfaces:
IAction, ISelectionChangedListener
Direct Known Subclasses:
OpenFileAction

public class OpenSystemEditorAction extends SelectionListenerAction
Standard action for opening a system editor on the currently selected file resource.

This class may be instantiated; it is not intended to be subclassed.

Restriction:
This class is not intended to be subclassed by clients.
  • Field Details

  • Constructor Details

    • OpenSystemEditorAction

      public OpenSystemEditorAction(IWorkbenchPage page)
      Creates a new action that will open system editors on the then-selected file resources.
      Parameters:
      page - the workbench page in which to open the editor
  • Method Details

    • run

      public void run()
      Description copied from class: Action
      The default implementation of this IAction method does nothing. Subclasses should override this method if they do not need information from the triggering event, or override runWithEvent(Event) if they do.
      Specified by:
      run in interface IAction
      Overrides:
      run in class Action
      See Also:
    • updateSelection

      protected boolean updateSelection(IStructuredSelection selection)
      The OpenSystemEditorAction implementation of this SelectionListenerAction method enables the action only if the selection contains just file resources.
      Overrides:
      updateSelection in class BaseSelectionListenerAction
      Parameters:
      selection - the new selection
      Returns:
      true if the action should be enabled for this selection, and false otherwise