Class AbstractPlugIn

    • Constructor Detail

      • AbstractPlugIn

        public AbstractPlugIn()
      • AbstractPlugIn

        public AbstractPlugIn​(String name)
    • Method Detail

      • execute

        public boolean execute​(PlugInContext context)
                        throws Exception
        Description copied from interface: PlugIn
        Performs the action for this plugin. For threaded plugins with dialogs, this method contains the code to invoke the dialog. If the user cancels the dialog, this method should return false to prevent the run method from being called.
        Specified by:
        execute in interface PlugIn
        Returns:
        true if the action completed, false if it was aborted. Used by ThreadedPlugIns to indicate that their #run method needn't be called next.
        Throws:
        Exception - if a problem occurs during plug-in execution
        See Also:
        ThreadedPlugIn
      • getName

        public String getName()
        Description copied from interface: PlugIn
        Returns a very brief description of this PlugIn e.g. for display as a menu item
        Specified by:
        getName in interface PlugIn
        Returns:
        the class name, minus "PlugIn", with spaces inserted at the appropraite point before each uppercase+lowercase and lowercase+uppercase combination.
      • createName

        public static String createName​(Class plugInClass)
      • toActionListener

        public static ActionListener toActionListener​(PlugIn plugIn,
                                                      WorkbenchContext workbenchContext,
                                                      TaskMonitorManager taskMonitorManager)
        Parameters:
        taskMonitorManager - can be null if you do not wish to use the Task Monitor progress-reporting framework
      • reportNothingToUndoYet

        protected void reportNothingToUndoYet​(PlugInContext context)
        Indicates that this plug-in either (1) is undoable but hasn't modified the system yet or (2) does not modify the system. In either case, the undo history will be preserved. If this method is not called, then this plug-in will be assumed to be non-undoable, and the undo history will be truncated.
      • isRollingBackInvalidEdits

        protected boolean isRollingBackInvalidEdits​(PlugInContext context)