Package ghidra.framework.model
Interface ToolManager
- All Known Implementing Classes:
ToolManagerImpl
public interface ToolManager
Interface to define methods to manage running tools and tools in
the Tool Chest. The ToolManager also keeps track of the workspaces, and
what tools are running in workspace, as well as the connections among tools
across all workspaces.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add the listener that will be notified when a tool is added or removed.createWorkspace
(String name) Create a workspace with the given name.void
disconnectTool
(PluginTool tool) Removes all connections involving toolGet the active workspacegetConnection
(PluginTool producer, PluginTool consumer) Get the connection object for the producer and consumer toolsGet a list of tools that consume at least one tool event.Get a list of tools that produce at least one tool event.Get a list running tools across all workspaces.Get list of known workspaces.void
Remove the workspace.void
Remove the workspace listener.void
toolChanged
(PluginTool tool) A configuration change was made to the tool; a plugin was added or removed.
-
Field Details
-
DEFAULT_WORKSPACE_NAME
The name to use for a new unnamed workspace; used by the Ghidra Project Window when the user creates a new workspace.- See Also:
-
WORKSPACE_NAME_PROPERTY
Property used when sending the change event when a workspace name is changed.- See Also:
-
-
Method Details
-
getConnection
Get the connection object for the producer and consumer tools- Parameters:
producer
- tool that is producing the tool eventconsumer
- tool that is consuming the tool event- Returns:
- the connection
-
getProducerTools
PluginTool[] getProducerTools()Get a list of tools that produce at least one tool event.- Returns:
- zero-length array if no tool produces any events
-
getConsumerTools
PluginTool[] getConsumerTools()Get a list of tools that consume at least one tool event.- Returns:
- zero-length array if no tool consumes any events
-
getRunningTools
PluginTool[] getRunningTools()Get a list running tools across all workspaces.- Returns:
- zero-length array if there are no running tools.
-
createWorkspace
Create a workspace with the given name.- Parameters:
name
- name of workspace- Returns:
- the workspace
- Throws:
DuplicateNameException
- if a workspace with this name already exists
-
removeWorkspace
Remove the workspace.- Parameters:
ws
- workspace to remove
-
getWorkspaces
Workspace[] getWorkspaces()Get list of known workspaces.- Returns:
- an array of known workspaces
-
getActiveWorkspace
Workspace getActiveWorkspace()Get the active workspace- Returns:
- the active workspace
-
addWorkspaceChangeListener
Add the listener that will be notified when a tool is added or removed.- Parameters:
listener
- workspace listener to add
-
removeWorkspaceChangeListener
Remove the workspace listener.- Parameters:
l
- workspace listener to remove
-
disconnectTool
Removes all connections involving tool- Parameters:
tool
- tool for which to remove all connections
-
toolChanged
A configuration change was made to the tool; a plugin was added or removed.- Parameters:
tool
- tool that changed
-