Class MasterDetailAction

  • All Implemented Interfaces:
    org.eclipse.core.commands.IHandler, org.eclipse.core.commands.IHandler2
    Direct Known Subclasses:
    CreateNewInstanceAction, KeybindedMasterDetailAction

    public abstract class MasterDetailAction
    extends org.eclipse.core.commands.AbstractHandler
    A MasterDetailAction may be added to the context menu of a TreeMasterDetailComposite.
    Since:
    1.8
    Author:
    Alexandra Buzila, Johannes Faltermeier
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void execute​(java.util.List<java.lang.Object> objects)  
      java.lang.String getImagePath()  
      java.lang.String getLabel()  
      protected org.eclipse.jface.viewers.TreeViewer getTreeViewer()
      Returns the treeviewer renderered by the tree master detail composite.
      void setImagePath​(java.lang.String imagePath)  
      void setLabel​(java.lang.String label)  
      void setTreeViewer​(org.eclipse.jface.viewers.TreeViewer treeviewer)
      Sets the treeviewer of the tree master detail composite.
      abstract boolean shouldShow​(java.util.List<java.lang.Object> objects)  
      • Methods inherited from class org.eclipse.core.commands.AbstractHandler

        addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled, setEnabled
      • Methods inherited from class org.eclipse.core.commands.common.EventManager

        addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.eclipse.core.commands.IHandler

        execute
    • Constructor Detail

      • MasterDetailAction

        public MasterDetailAction()
    • Method Detail

      • shouldShow

        public abstract boolean shouldShow​(java.util.List<java.lang.Object> objects)
        Parameters:
        objects - the list of objects on which to test if the action can be executed
        Returns:
        true if the action can be executed on the parameter
        Since:
        1.10
      • execute

        public abstract void execute​(java.util.List<java.lang.Object> objects)
        Parameters:
        objects - The list of objects on which the action is executed
        Since:
        1.10
      • getLabel

        public java.lang.String getLabel()
        Returns:
        the label of the action
      • setLabel

        public void setLabel​(java.lang.String label)
        Parameters:
        label - the label of the action
      • getImagePath

        public java.lang.String getImagePath()
        Returns:
        the imagePath
      • setImagePath

        public void setImagePath​(java.lang.String imagePath)
        Parameters:
        imagePath - the path to the image
      • setTreeViewer

        public void setTreeViewer​(org.eclipse.jface.viewers.TreeViewer treeviewer)
        Sets the treeviewer of the tree master detail composite.
        Parameters:
        treeviewer - the tree
      • getTreeViewer

        protected org.eclipse.jface.viewers.TreeViewer getTreeViewer()
        Returns the treeviewer renderered by the tree master detail composite.
        Returns:
        the tree