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 String`
  `comments`
  `protected boolean`
  `createKeep`
  `protected boolean`
  `filesInUse`
  `protected boolean`
  `keepCheckedOut`
  `protected List<DomainFile>`
  `list`
  `protected 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(String title, PluginTool tool, List<DomainFile> list, Component parent)`
  Constructor

- ## Method Summary

  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, String filename, boolean isLinkFile)`
  Show the dialog.

  ### Methods inherited from class ghidra.util.task.Task

  `addTaskListener, canCancel, cancel, getStatusTextAlignment, getTaskTitle, getWaitForTaskCompleted, hasProgress, isCancelled, isModal, monitoredRun, notifyTaskListeners, run, setHasProgress`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### list

    protected List<DomainFile> list

  - ### actionID

    protected int actionID

  - ### keepCheckedOut

    protected boolean keepCheckedOut

  - ### createKeep

    protected boolean createKeep

  - ### comments

    protected String comments

  - ### filesInUse

    protected boolean filesInUse

  - ### tool

    protected PluginTool tool

  - ### wasCanceled

    protected boolean wasCanceled

  - ### parent

    protected Component parent

- ## Constructor Details

  - ### VersionControlTask

    protected VersionControlTask(String title, PluginTool tool, List<DomainFile> list, Component parent)
    Constructor
    Parameters:
      `title` - title of the task
      `tool` - tool associated with the task
      `list` - list of domain files
      `parent` - parent of the version control dialog; may be null

- ## Method Details

  - ### showDialog

    protected void showDialog(boolean addToVersionControl, String filename, boolean isLinkFile)
    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.
      `isLinkFile` - true if file is a link file, else false. Link-files may not be checked-out so keep-checked-out control disabled if this is true.

  - ### 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()