Package ghidra.framework.main
Class FrontEndTool
- java.lang.Object
-
- docking.AbstractDockingTool
-
- ghidra.framework.plugintool.PluginTool
-
- ghidra.framework.main.FrontEndTool
-
- All Implemented Interfaces:
DockingTool,Tool,ToolListener,OptionsChangeListener,ServiceProvider
- Direct Known Subclasses:
TestFrontEndTool
public class FrontEndTool extends PluginTool implements OptionsChangeListener
Tool that serves as the 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
Fields Modifier and Type Field Description static java.lang.StringAUTOMATICALLY_SAVE_TOOLS-
Fields inherited from class ghidra.framework.plugintool.PluginTool
extensionTableProvider, iconURL, isDisposed, manageDialog, toolName
-
Fields inherited from class docking.AbstractDockingTool
configChangedFlag, optionsMap, toolActions, winMgr
-
Fields inherited from interface ghidra.framework.model.Tool
DESCRIPTION_PROPERTY_NAME, ICON_PROPERTY_NAME, PLUGIN_COUNT_PROPERTY_NAME, TOOL_NAME_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description FrontEndTool(ProjectManager pm)Construct a new Ghidra Project Window.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProjectListener(ProjectListener l)Add the given project listener.booleancanCloseDomainFile(DomainFile df)Can the domain File be closed?
Note: This forces plugins to terminate any tasks they have running for the indicated domain object and apply any unsaved data to the domain object.voidcheckIn(PluginTool tool, DomainFile domainFile, TaskListener taskListener)Check in the given domain file.voidcheckIn(PluginTool tool, java.util.List<DomainFile> fileList, TaskListener taskListener, java.awt.Component parent)Check in the list of domain files.voidclose()Close this tool: if there are no tasks running.voidexit()Tells the tool to stop functioning and release its resources.PluginClassManagergetPluginClassManager()ToolTemplategetToolTemplate(boolean includeConfigState)Returns a ToolTemplate for this Tool that describes the state of the tool.voidmerge(PluginTool tool, DomainFile domainFile, TaskListener taskListener)Merge the latest version in the repository with the given checked out domain file.voidmerge(PluginTool tool, java.util.List<DomainFile> fileList, TaskListener taskListener)Merge the latest version (in the repository) of each checked out file in fileList.voidoptionsChanged(ToolOptions options, java.lang.String optionName, java.lang.Object oldValue, java.lang.Object newValue)Notification that an option changed.voidremoveProjectListener(ProjectListener l)Remove the given project listener.voidselectFiles(java.util.Set<DomainFile> files)voidsetActiveProject(Project project)Set the active project.voidsetBusy(boolean busy)voidsetVisible(boolean visibility)Sets the tool visible or invisible.-
Methods inherited from class ghidra.framework.plugintool.PluginTool
acceptDomainFiles, addExitAction, addExportToolAction, addHelpActions, addListenerForAllPluginEvents, addOptionsAction, addPlugin, addPlugin, addPlugins, addPropertyChangeListener, addSaveToolAction, addServiceListener, addStatusComponent, addToolListener, beep, cancelCurrentTask, canClose, canCloseDomainObject, clearLastEvents, createDockingWindowManager, dispose, doSaveTool, execute, execute, execute, executeBackgroundCommand, firePluginEvent, getActiveComponentProvider, getActiveWindow, getConsumedToolEventNames, getDomainFiles, getIcon, getIconURL, getInstanceName, getLocation, getManagedPlugins, getManagePluginsDialog, getName, getOptions, getOptions, getProject, getProjectManager, getService, getServices, getSize, getSupportedDataTypes, getToolEventNames, getToolName, getToolServices, getTransientState, getUndoRedoToolState, hasOptions, hasToolListeners, hasUnsavedData, initActions, installHomeButton, isConfigurable, isExecutingCommand, isService, isWindowsOnTop, optionsChanged, prepareToSave, processToolEvent, putInstanceName, refreshKeybindings, registerOptionsNameChange, removeListenerForAllPluginEvents, 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, showEditWindow, showExtensions, terminateBackgroundCommands, threadIsBackgroundTaskThread
-
Methods inherited from class docking.AbstractDockingTool
addAction, addComponentProvider, addContextListener, addLocalAction, addPopupActionProvider, clearStatusInfo, contextChanged, getAllActions, getComponentProvider, getDockingActionsByOwnerName, getGlobalContext, getProviderWindow, getToolActions, getToolFrame, getWindowManager, hasConfigChanged, isActive, isVisible, isVisible, removeAction, removeComponentProvider, removeContextListener, removeLocalAction, removePopupActionProvider, setMenuGroup, setMenuGroup, setStatusInfo, setStatusInfo, showComponentProvider, showDialog, toFront, toFront, updateTitle
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface docking.DockingTool
addAction, addComponentProvider, addContextListener, addLocalAction, addPopupActionProvider, clearStatusInfo, contextChanged, getAllActions, getComponentProvider, getDockingActionsByOwnerName, getGlobalContext, getProviderWindow, getToolActions, getWindowManager, hasConfigChanged, isActive, isVisible, isVisible, removeAction, removeComponentProvider, removeContextListener, removeLocalAction, removePopupActionProvider, setMenuGroup, setStatusInfo, setStatusInfo, showComponentProvider, showDialog, toFront, toFront, updateTitle
-
-
-
-
Field Detail
-
AUTOMATICALLY_SAVE_TOOLS
public static final java.lang.String AUTOMATICALLY_SAVE_TOOLS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FrontEndTool
public FrontEndTool(ProjectManager pm)
Construct a new Ghidra Project Window.- Parameters:
pm- project manager
-
-
Method Detail
-
getPluginClassManager
public PluginClassManager getPluginClassManager()
- Specified by:
getPluginClassManagerin classPluginTool
-
selectFiles
public void selectFiles(java.util.Set<DomainFile> files)
-
optionsChanged
public void optionsChanged(ToolOptions options, java.lang.String optionName, java.lang.Object oldValue, java.lang.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
-
exit
public void exit()
Description copied from interface:ToolTells the tool to stop functioning and release its resources. The tool should dispose of all its windows and other resources.- Specified by:
exitin interfaceTool- Overrides:
exitin classPluginTool
-
close
public void close()
Description copied from class:PluginToolClose this tool:- if there are no tasks running.
- resolve the state of any plugins so they can be closed.
- Prompt the user to save any changes.
- close all associated plugins (this closes the domain object if one is open).
- pop up dialog to save the configuration if it has changed.
- notify the project tool services that this tool is going away.
- Specified by:
closein interfaceDockingTool- Overrides:
closein classPluginTool
-
setActiveProject
public void setActiveProject(Project project)
Set the active project.- Parameters:
project- may be null if there is no active project
-
addProjectListener
public void addProjectListener(ProjectListener l)
Add the given project listener.- Parameters:
l- listener to add
-
removeProjectListener
public void removeProjectListener(ProjectListener l)
Remove the given project listener.- Parameters:
l- listener to remove
-
checkIn
public void checkIn(PluginTool tool, DomainFile domainFile, TaskListener taskListener)
Check in the given domain file.- Parameters:
tool- tool that has the domain file openeddomainFile- domain file to check intaskListener- listener that is notified when task completes
-
checkIn
public void checkIn(PluginTool tool, java.util.List<DomainFile> fileList, TaskListener taskListener, java.awt.Component parent)
Check in the list of domain files.- Parameters:
tool- tool that has the domain files openedfileList- list of DomainFile objectstaskListener- listener that is notified when task completesparent- parent of dialog if an error occurs during checkin
-
merge
public void merge(PluginTool tool, DomainFile domainFile, TaskListener taskListener)
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
public void merge(PluginTool tool, java.util.List<DomainFile> fileList, TaskListener taskListener)
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:DockingToolSets 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 interfaceDockingTool- Overrides:
setVisiblein classAbstractDockingTool- Parameters:
visibility- true specifies that the tool should be visible
-
setBusy
public void setBusy(boolean busy)
-
getToolTemplate
public ToolTemplate getToolTemplate(boolean includeConfigState)
Description copied from interface:ToolReturns a ToolTemplate for this Tool that describes the state of the tool.- Specified by:
getToolTemplatein interfaceTool- Overrides:
getToolTemplatein classPluginTool- Returns:
- a ToolTemplate for this Tool that describes the state of the tool.
-
canCloseDomainFile
public boolean canCloseDomainFile(DomainFile df)
Description copied from interface:ToolCan the domain File be closed?
Note: This forces plugins to terminate any tasks they have running for the indicated domain object and apply any unsaved data to the domain object. If they can't do this or the user cancels then this returns false.- Specified by:
canCloseDomainFilein interfaceTool- Overrides:
canCloseDomainFilein classPluginTool- Returns:
- false any of the plugins reports that the domain object should not be closed
-
-