Package ghidra.framework.main.datatree

# Class VersionControlDataTypeArchiveUndoCheckoutAction

java.lang.Object
docking.action.DockingAction
ghidra.framework.main.datatable.DomainFileProviderContextAction
ghidra.framework.main.projectdata.actions.VersionControlAction
ghidra.framework.main.datatree.VersionControlDataTypeArchiveUndoCheckoutAction

All Implemented Interfaces:
  `DockingActionIf`, `HelpDescriptor`

public class VersionControlDataTypeArchiveUndoCheckoutAction extends VersionControlAction
Action to undo checkouts for domain files in the repository.

- ## Field Summary

  ### Fields inherited from class ghidra.framework.main.projectdata.actions.VersionControlAction

  `GROUP, repository, tool`

  ### Fields inherited from interface docking.action.DockingActionIf

  `DESCRIPTION_PROPERTY, ENABLEMENT_PROPERTY, GLOBALCONTEXT_PROPERTY, KEYBINDING_DATA_PROPERTY, MENUBAR_DATA_PROPERTY, POPUP_MENU_DATA_PROPERTY, TOOLBAR_DATA_PROPERTY`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VersionControlDataTypeArchiveUndoCheckoutAction(ghidra.app.plugin.core.datamgr.DataTypeManagerPlugin plugin, ArchiveProvider provider)`
  Creates an action to undo checkouts for domain files in the repository.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `actionPerformed(DomainFileContext context)`
  `boolean`
  `isEnabledForContext(DomainFileContext context)`
  `protected void`
  `saveCheckOutChanges(List<DomainFile> changedList)`
  Saves all checked out changes.
  `protected void`
  `undoCheckOut()`
  Gets the domain files from the provider and then undoes the checkout on any that are checked out.
  `protected void`
  `undoCheckOuts(List<ghidra.app.plugin.core.datamgr.archive.DomainFileArchive> unmodifiedArchivesList, List<ghidra.app.plugin.core.datamgr.archive.DomainFileArchive> modifiedArchivesList)`
  Displays the undo checkout confirmation dialog for each checked out file and then undoes the checkout while keeping a copy of the working version of the file if the user chooses to do so.
  All unmodified checkouts will be undone.

  ### Methods inherited from class ghidra.framework.main.projectdata.actions.VersionControlAction

  `checkRepositoryConnected, isAddToPopup, isFileSystemBusy`

  ### Methods inherited from class ghidra.framework.main.datatable.DomainFileProviderContextAction

  `actionPerformed, isAddToPopup, isEnabledForContext, isValidContext, isValidContext`

  ### Methods inherited from class docking.action.DockingAction

  `addPropertyChangeListener, addToWindowWhen, createButton, createMenuItem, dispose, doCreateButton, doCreateMenuItem, enabledWhen, firePropertyChanged, getContextClass, getDefaultKeyBindingData, getDescription, getFullName, getHelpInfo, getHelpLocation, getHelpObject, getInceptionFromTheFirstClassThatIsNotUsOrABuilder, getInceptionInformation, getKeyBinding, getKeyBindingData, getKeyBindingType, getMenuBarData, getName, getOwner, getPopupMenuData, getPreferredKeyBindingType, getToolBarData, isEnabled, markHelpUnnecessary, popupWhen, removePropertyChangeListener, setAddToAllWindows, setContextClass, setDescription, setEnabled, setHelpLocation, setKeyBindingData, setMenuBarData, setPopupMenuData, setToolBarData, setUnvalidatedKeyBindingData, shouldAddToWindow, supportsDefaultContext, toString, validContextWhen`

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

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

  ### Methods inherited from interface docking.action.DockingActionIf

  `createMenuComponent, getOwnerDescription`

- ## Constructor Details

  - ### VersionControlDataTypeArchiveUndoCheckoutAction

    public VersionControlDataTypeArchiveUndoCheckoutAction(ghidra.app.plugin.core.datamgr.DataTypeManagerPlugin plugin, ArchiveProvider provider)
    Creates an action to undo checkouts for domain files in the repository.
    Parameters:
      `plugin` - the plug-in that owns this action.
      `provider` - provides a list of domain files to be affected by this action.

- ## Method Details

  - ### actionPerformed

    public void actionPerformed(DomainFileContext context)
    Specified by:
      `actionPerformed` in class `DomainFileProviderContextAction`

  - ### isEnabledForContext

    public boolean isEnabledForContext(DomainFileContext context)
    Overrides:
      `isEnabledForContext` in class `DomainFileProviderContextAction`

  - ### undoCheckOut

    protected void undoCheckOut()
    Gets the domain files from the provider and then undoes the checkout on any that are checked out.

  - ### undoCheckOuts

    protected void undoCheckOuts(List<ghidra.app.plugin.core.datamgr.archive.DomainFileArchive> unmodifiedArchivesList, List<ghidra.app.plugin.core.datamgr.archive.DomainFileArchive> modifiedArchivesList) throws CancelledException
    Displays the undo checkout confirmation dialog for each checked out file and then undoes the checkout while keeping a copy of the working version of the file if the user chooses to do so.
    All unmodified checkouts will be undone. Only modified checkouts the user chooses will be undone.
    Parameters:
      `unmodifiedArchivesList` - the list of unmodified archives
      `modifiedArchivesList` - the list of archives that have been modified
    Throws:
      `CancelledException` - if cancelled

  - ### saveCheckOutChanges

    protected void saveCheckOutChanges(List<DomainFile> changedList) throws CancelledException
    Saves all checked out changes.
    Parameters:
      `changedList` - the list of changes
    Throws:
      `CancelledException` - if cancelled