Class AbstractFileCommanderGitAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- adams.gui.action.AbstractBaseAction
-
- adams.gui.tools.filecommander.AbstractFileCommanderAction
-
- adams.gui.tools.filecommander.git.AbstractFileCommanderGitAction
-
- All Implemented Interfaces:
adams.core.CleanUpHandler
,adams.core.logging.LoggingLevelHandler
,adams.core.StatusMessageHandler
,adams.gui.action.BaseAction
,ActionListener
,Serializable
,Cloneable
,EventListener
,Action
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 Summary
Fields Modifier and Type Field Description protected org.eclipse.jgit.api.Git
m_Git
the current git instance to use.protected adams.core.logging.Logger
m_Logger
the logger in use.protected Boolean
m_LoggingIsEnabled
whether logging is enabled.protected adams.core.logging.LoggingLevel
m_LoggingLevel
the logging level.protected GitOperation
m_Operation
for managing git operations.-
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
-
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
-
-
Constructor Summary
Constructors Constructor Description AbstractFileCommanderGitAction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
configureLogger()
Initializes the logger.protected abstract void
doUpdate()
Updates the action.adams.core.logging.Logger
getLogger()
Returns the logger in use.adams.core.logging.LoggingLevel
getLoggingLevel()
Returns the logging level.protected void
initialize()
Initializes the menu item.protected void
initializeLogging()
Pre-configures the logging.boolean
isLoggingEnabled()
Returns whether logging is enabled.void
setLoggingLevel(adams.core.logging.LoggingLevel value)
Sets the logging level.void
showNotification(String msg)
Displays the message using the name of the action as title.void
showNotification(String title, String msg)
Displays the message.void
update()
Updates the action.-
Methods inherited from class adams.gui.tools.filecommander.AbstractFileCommanderAction
getActions, getOwner, setOwner, showStatus
-
Methods inherited from class adams.gui.action.AbstractBaseAction
actionPerformed, cleanUp, doActionPerformed, getAccelerator, getIcon, getMnemonic, getName, getToolTipText, hasAccelerator, hasIcon, hasMnemonic, hasToolTipText, isAsynchronous, isSelected, postActionPerformed, preActionPerformed, setAccelerator, setAsynchronous, setIcon, setIcon, setMnemonic, setName, setSelected, setToolTipText
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.swing.Action
accept, addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
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.
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the menu item.- Overrides:
initialize
in classadams.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 interfaceadams.core.logging.LoggingLevelHandler
- Parameters:
value
- the level
-
getLoggingLevel
public adams.core.logging.LoggingLevel getLoggingLevel()
Returns the logging level.- Specified by:
getLoggingLevel
in interfaceadams.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 dialogmsg
- the message to display
-
doUpdate
protected abstract void doUpdate()
Updates the action.
-
update
public void update()
Updates the action.- Specified by:
update
in classadams.gui.tools.filecommander.AbstractFileCommanderAction
-
-