Package ghidra.framework.main.datatree
Class VersionControlTask
- java.lang.Object
-
- ghidra.util.task.Task
-
- ghidra.framework.main.datatree.VersionControlTask
-
- All Implemented Interfaces:
MonitoredRunnable
- Direct Known Subclasses:
CheckInTask
public abstract class VersionControlTask extends Task
Task to show a dialog to enter comments for checking in a file
-
-
Field Summary
Fields Modifier and Type Field Description protected int
actionID
protected java.lang.String
comments
protected boolean
createKeep
protected boolean
filesInUse
protected boolean
keepCheckedOut
protected java.util.List<DomainFile>
list
protected java.awt.Component
parent
protected PluginTool
tool
protected boolean
wasCanceled
-
Fields inherited from class ghidra.util.task.Task
taskMonitor, waitForTaskCompleted
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
VersionControlTask(java.lang.String title, PluginTool tool, java.util.List<DomainFile> list, java.awt.Component parent)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
checkFilesForUnsavedChanges()
protected void
checkFilesInUse()
Sets the filesInUse field if any file is in use.protected void
showDialog(boolean addToVersionControl, java.lang.String filename)
Show the dialog.-
Methods inherited from class ghidra.util.task.Task
addTaskListener, canCancel, cancel, getStatusTextAlignment, getTaskTitle, hasProgress, isModal, monitoredRun, notifyTaskListeners, run, setHasProgress
-
-
-
-
Field Detail
-
list
protected java.util.List<DomainFile> list
-
actionID
protected int actionID
-
keepCheckedOut
protected boolean keepCheckedOut
-
createKeep
protected boolean createKeep
-
comments
protected java.lang.String comments
-
filesInUse
protected boolean filesInUse
-
tool
protected PluginTool tool
-
wasCanceled
protected boolean wasCanceled
-
parent
protected java.awt.Component parent
-
-
Constructor Detail
-
VersionControlTask
protected VersionControlTask(java.lang.String title, PluginTool tool, java.util.List<DomainFile> list, java.awt.Component parent)
Constructor- Parameters:
title
- title of the tasktool
- tool associated with the tasklist
- list of domain filesparent
- parent of the version control dialog; may be null
-
-
Method Detail
-
showDialog
protected void showDialog(boolean addToVersionControl, java.lang.String filename)
Show the dialog.- Parameters:
addToVersionControl
- true if the dialog is for adding files to version control, false for checking in files.filename
- the name of the file currently to be added, whose comment we need.
-
checkFilesInUse
protected void checkFilesInUse()
Sets the filesInUse field if any file is in use. Call this method from the run() method so that the "Keep checked out" checkbox on the dialog is disabled if files are still in use.
-
checkFilesForUnsavedChanges
protected boolean checkFilesForUnsavedChanges()
-
-