Class AbstractFileCommanderGitAction

  • All Implemented Interfaces:
    adams.core.CleanUpHandler, adams.core.logging.LoggingLevelHandler, adams.core.StatusMessageHandler, adams.gui.action.BaseAction, ActionListener, Serializable, Cloneable, EventListener, Action
    Direct Known Subclasses:
    Add, Commit, Log, Pull, Push, Rollback

    public abstract class AbstractFileCommanderGitAction
    extends adams.gui.tools.filecommander.AbstractFileCommanderAction
    implements adams.core.logging.LoggingLevelHandler
    Ancestor for git actions in the file commander.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_LoggingLevel

        protected adams.core.logging.LoggingLevel m_LoggingLevel
        the logging level.
      • m_Logger

        protected transient adams.core.logging.Logger m_Logger
        the logger in use.
      • m_LoggingIsEnabled

        protected transient Boolean m_LoggingIsEnabled
        whether logging is enabled.
      • m_Git

        protected org.eclipse.jgit.api.Git m_Git
        the current git instance to use.
      • m_Operation

        protected GitOperation m_Operation
        for managing git operations.
    • Constructor Detail

      • AbstractFileCommanderGitAction

        public AbstractFileCommanderGitAction()
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the menu item.
        Overrides:
        initialize in class adams.gui.action.AbstractBaseAction
      • initializeLogging

        protected void initializeLogging()
        Pre-configures the logging.
      • configureLogger

        protected void configureLogger()
        Initializes the logger.

        Default implementation uses the class name.
      • getLogger

        public adams.core.logging.Logger getLogger()
        Returns the logger in use.
        Returns:
        the logger
      • setLoggingLevel

        public void setLoggingLevel​(adams.core.logging.LoggingLevel value)
        Sets the logging level.
        Specified by:
        setLoggingLevel in interface adams.core.logging.LoggingLevelHandler
        Parameters:
        value - the level
      • getLoggingLevel

        public adams.core.logging.LoggingLevel getLoggingLevel()
        Returns the logging level.
        Specified by:
        getLoggingLevel in interface adams.core.logging.LoggingLevelHandler
        Returns:
        the level
      • isLoggingEnabled

        public boolean isLoggingEnabled()
        Returns whether logging is enabled.
        Returns:
        true if at least Level.INFO
      • showNotification

        public void showNotification​(String msg)
        Displays the message using the name of the action as title.
        Parameters:
        msg - the message to display
      • showNotification

        public void showNotification​(String title,
                                     String msg)
        Displays the message.
        Parameters:
        title - the title of the dialog
        msg - the message to display
      • doUpdate

        protected abstract void doUpdate()
        Updates the action.
      • update

        public void update()
        Updates the action.
        Specified by:
        update in class adams.gui.tools.filecommander.AbstractFileCommanderAction