Package adams.gui.flow.menu.git
Class AbstractFlowEditorGitMenuItem
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.gui.flow.menu.AbstractFlowEditorMenuItem
-
- adams.gui.flow.menu.git.AbstractFlowEditorGitMenuItem
-
- All Implemented Interfaces:
adams.core.logging.LoggingSupporter
,adams.core.SizeOfHandler
,Serializable
,Comparable<adams.gui.flow.menu.AbstractFlowEditorMenuItem>
public abstract class AbstractFlowEditorGitMenuItem extends adams.gui.flow.menu.AbstractFlowEditorMenuItem
Ancestor for menuitems in the git sub-menu.- 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.
-
Constructor Summary
Constructors Constructor Description AbstractFlowEditorGitMenuItem()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getMenu()
Returns the name of the menu to list this item under.protected void
initialize()
Initializes the menu item.protected boolean
isRemoteRepo()
Checks whether the repository has a remote URL.protected <T extends org.eclipse.jgit.api.TransportCommand>
TsetTransportConfigCallbackIfNecessary(T cmd)
Adds the transport config callback (with sshd factory) if necessary.void
update(org.eclipse.jgit.api.Git git)
Updating the action/menuitem/submenu, based on the current status of the owner.-
Methods inherited from class adams.gui.flow.menu.AbstractFlowEditorMenuItem
compareTo, determineCaption, equals, getAction, getMenuItem, getMenuItems, getOwner, getSubMenu, hasAction, hasMenuItem, hasSubMenu, newAction, newMenuItem, newSubMenu, setOwner, update
-
-
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the menu item.- Overrides:
initialize
in classadams.gui.flow.menu.AbstractFlowEditorMenuItem
-
getMenu
public String getMenu()
Returns the name of the menu to list this item under.- Specified by:
getMenu
in classadams.gui.flow.menu.AbstractFlowEditorMenuItem
- Returns:
- sub-menu, so always null
-
update
public void update(org.eclipse.jgit.api.Git git)
Updating the action/menuitem/submenu, based on the current status of the owner.- Parameters:
git
- the git instance
-
setTransportConfigCallbackIfNecessary
protected <T extends org.eclipse.jgit.api.TransportCommand> T setTransportConfigCallbackIfNecessary(T cmd)
Adds the transport config callback (with sshd factory) if necessary. If the remote url starts with "git@", then we assume that ssh keys are used.- Parameters:
cmd
- the command to update- Returns:
- the updated command
-
isRemoteRepo
protected boolean isRemoteRepo()
Checks whether the repository has a remote URL.- Returns:
- true if remote URL available
-
-