Package ghidra.framework.main
Class FrontEndTool
java.lang.Object
docking.AbstractDockingTool
ghidra.framework.plugintool.PluginTool
ghidra.framework.main.FrontEndTool
- All Implemented Interfaces:
Tool,OptionsChangeListener,ServiceProvider
- Direct Known Subclasses:
TestFrontEndTool
Tool that serves as the Ghidra Project Window. Only those plugins that
implement the FrontEndable interface may be directly added to this
tool by the user. Other plugins that are not marked as FrontEndable may get
pulled in because the FrontEndable plugins depend on them. These plugins are
aware of what tool they live in so that they can behave in the appropriate
manner.
-
Field Summary
FieldsFields inherited from class ghidra.framework.plugintool.PluginTool
DESCRIPTION_PROPERTY_NAME, ICON_PROPERTY_NAME, iconURL, isDisposed, manageDialog, PLUGIN_COUNT_PROPERTY_NAME, TOOL_NAME_PROPERTY, toolNameFields inherited from class docking.AbstractDockingTool
optionsMap, toolActions, winMgr -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanRequest tool to accept specified URL.voidAdd the given project listener.protected booleancanClose()booleanvoidcheckIn(PluginTool tool, DomainFile domainFile) Check in the given domain file.voidcheckIn(PluginTool tool, List<DomainFile> fileList, Component parent) Check in the list of domain files.protected PluginsConfigurationvoiddispose()protected booleanCalled when it is time to save the tool.Get the preferred default tool launch modegetToolTemplate(boolean includeConfigState) voidmerge(PluginTool tool, DomainFile domainFile, TaskListener taskListener) Merge the latest version in the repository with the given checked out domain file.voidmerge(PluginTool tool, List<DomainFile> fileList, TaskListener taskListener) Merge the latest version (in the repository) of each checked out file in fileList.voidoptionsChanged(ToolOptions options, String optionName, Object oldValue, Object newValue) Notification that an option changed.voidRemove the given project listener.voidselectFiles(Set<DomainFile> files) voidsetActiveProject(Project project) Set the active project.voidsetBusy(boolean busy) voidsetVisible(boolean visibility) Sets the tool visible or invisible.booleanChecks to see if the previous project should be restoredprotected voidshutdown()Methods inherited from class ghidra.framework.plugintool.PluginTool
acceptDomainFiles, addEventListener, addExitAction, addExportToolAction, addHelpActions, addListenerForAllPluginEvents, addNextPreviousProviderActions, addOptionsAction, addPlugin, addPlugin, addPlugins, addPlugins, addPropertyChangeListener, addSaveToolAction, addServiceListener, addStatusComponent, addToolListener, allowTerminatingTasksWhenClosing, beep, cancelCurrentTask, canCloseDomainObject, canClosePlugins, canStopTasks, clearLastEvents, close, contextChanged, createDockingWindowManager, execute, execute, execute, execute, execute, executeBackgroundCommand, firePluginEvent, getActiveComponentProvider, getActiveWindow, getConsumedToolEventNames, getDomainFiles, getIcon, getIconURL, getInstanceName, getLocation, getManagedPlugins, getManagePluginsDialog, getName, getOptions, getOptions, getPluginsConfiguration, getProject, getProjectManager, getService, getServices, getSize, getSupportedDataTypes, getToolEventNames, getToolName, getToolServices, getTransientState, getUndoRedoToolState, hasOptions, hasToolListeners, hasUnsavedData, initActions, installHomeButton, installUtilityPlugins, isConfigurable, isExecutingCommand, isRestoringDataState, isService, isWindowsOnTop, optionsChanged, prepareToSave, processToolEvent, putInstanceName, registerDefaultContextProvider, registerOptionsNameChange, removeEventListener, removeListenerForAllPluginEvents, removePlugins, removePlugins, removePreferenceState, removePropertyChangeListener, removeServiceListener, removeStatusComponent, removeToolListener, restoreDataStateFromXml, restoreFromXml, restoreOptionsFromXml, restorePluginsFromXml, restoreWindowingDataFromXml, saveDataStateToXml, saveTool, saveToolAs, saveToolToToolTemplate, saveToXml, saveWindowingDataToXml, scheduleFollowOnCommand, setConfigChanged, setDefaultComponent, setIconURL, setLocation, setProject, setSize, setSubTitle, setToolName, setUnconfigurable, setWindowsOnTop, shouldSave, showComponentHeader, showConfig, showDialog, showDialog, showDialogOnActiveWindow, showExtensions, threadIsBackgroundTaskThread, unregisterDefaultContextProviderMethods inherited from class docking.AbstractDockingTool
addAction, addComponentProvider, addContextListener, addLocalAction, addPopupActionProvider, clearStatusInfo, getAllActions, getComponentProvider, getDockingActionsByOwnerName, getGlobalActions, getLocalActions, getProviderWindow, getStatusInfo, getToolActions, getToolFrame, getWindowManager, hasConfigChanged, isActive, isVisible, isVisible, removeAction, removeComponentProvider, removeContextListener, removeLocalAction, removePopupActionProvider, setMenuGroup, setMenuGroup, setStatusInfo, setStatusInfo, showComponentProvider, showDialog, toFront, toFront, updateTitle
-
Field Details
-
DEFAULT_TOOL_LAUNCH_MODE
- See Also:
-
AUTOMATICALLY_SAVE_TOOLS
- See Also:
-
-
Constructor Details
-
FrontEndTool
Construct a new Ghidra Project Window.- Parameters:
pm- project manager
-
-
Method Details
-
dispose
public void dispose()- Overrides:
disposein classPluginTool
-
shutdown
protected void shutdown() -
accept
Description copied from class:PluginToolRequest tool to accept specified URL. Acceptance of URL depends greatly on the plugins configured into tool. If no plugin accepts URL it will be rejected and false returned. If a plugin can accept the specified URL it will attempt to process and return true if successful. The user may be prompted if connecting to the URL requires user authentication.- Overrides:
acceptin classPluginTool- Parameters:
url- read-only resource URL- Returns:
- true if URL accepted and processed else false
-
createPluginsConfigurations
- Overrides:
createPluginsConfigurationsin classPluginTool
-
selectFiles
-
doSaveTool
protected boolean doSaveTool()Description copied from class:PluginToolCalled when it is time to save the tool. Handles auto-saving logic.- Overrides:
doSaveToolin classPluginTool- Returns:
- true if a save happened
-
getDefaultLaunchMode
Get the preferred default tool launch mode- Returns:
- default tool launch mode
-
optionsChanged
public void optionsChanged(ToolOptions options, String optionName, Object oldValue, Object newValue) Description copied from interface:OptionsChangeListenerNotification that an option changed.Note: to reject an options change, you can throw a
OptionsVetoException.- Specified by:
optionsChangedin interfaceOptionsChangeListener- Parameters:
options- options object containing the property that changedoptionName- name of option that changedoldValue- old value of the optionnewValue- new value of the option
-
canClose
protected boolean canClose()- Overrides:
canClosein classPluginTool
-
setActiveProject
Set the active project.- Parameters:
project- may be null if there is no active project
-
shouldRestorePreviousProject
public boolean shouldRestorePreviousProject()Checks to see if the previous project should be restored- Returns:
- true if the previous project should be restored; otherwise, false
-
addProjectListener
Add the given project listener.- Parameters:
l- listener to add
-
removeProjectListener
Remove the given project listener.- Parameters:
l- listener to remove
-
checkIn
Check in the given domain file.- Parameters:
tool- tool that has the domain file openeddomainFile- domain file to check in
-
checkIn
Check in the list of domain files.- Parameters:
tool- tool that has the domain files openedfileList- list of DomainFile objectsparent- parent of dialog if an error occurs during checkin
-
merge
Merge the latest version in the repository with the given checked out domain file. Upon completion of the merge, the domain file appears as though the latest version was checked out.- Parameters:
tool- tool that has the domain file openeddomainFile- domain file where latest version will be merged intotaskListener- listener that is notified when the merge task completes
-
merge
Merge the latest version (in the repository) of each checked out file in fileList. Upon completion of the merge, the domain file appears as though the latest version was checked out.- Parameters:
tool- tool that has the domain files openedfileList- list of files that are checked out and are to be mergedtaskListener- listener that is notified when the merge task completes
-
setVisible
public void setVisible(boolean visibility) Description copied from interface:ToolSets the tool visible or invisible. This method is used by the Project to make it's tools visible or invisible depending on whether this tool is in is the active workspace.- Specified by:
setVisiblein interfaceTool- Overrides:
setVisiblein classAbstractDockingTool- Parameters:
visibility- true specifies that the tool should be visible
-
setBusy
public void setBusy(boolean busy) -
getToolTemplate
- Overrides:
getToolTemplatein classPluginTool
-
canCloseDomainFile
- Overrides:
canCloseDomainFilein classPluginTool
-