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
Fields Modifier and Type Field Description static java.lang.String
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.static java.lang.String
WORKSPACE_NAME_PROPERTY
Property used when sending the change event when a workspace name is changed.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addWorkspaceChangeListener(WorkspaceChangeListener listener)
Add the listener that will be notified when a tool is added or removed.Workspace
createWorkspace(java.lang.String name)
Create a workspace with the given name.void
disconnectTool(PluginTool tool)
Removes all connections involving toolWorkspace
getActiveWorkspace()
Get the active workspaceToolConnection
getConnection(PluginTool producer, PluginTool consumer)
Get the connection object for the producer and consumer toolsPluginTool[]
getConsumerTools()
Get a list of tools that consume at least one tool event.PluginTool[]
getProducerTools()
Get a list of tools that produce at least one tool event.PluginTool[]
getRunningTools()
Get a list running tools across all workspaces.Workspace[]
getWorkspaces()
Get list of known workspaces.void
removeWorkspace(Workspace ws)
Remove the workspace.void
removeWorkspaceChangeListener(WorkspaceChangeListener l)
Remove the workspace listener.void
toolChanged(PluginTool tool)
A configuration change was made to the tool; a plugin was added or removed.
-
-
-
Field Detail
-
DEFAULT_WORKSPACE_NAME
static final java.lang.String 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:
- Constant Field Values
-
WORKSPACE_NAME_PROPERTY
static final java.lang.String WORKSPACE_NAME_PROPERTY
Property used when sending the change event when a workspace name is changed.- See Also:
- Constant Field Values
-
-
Method Detail
-
getConnection
ToolConnection getConnection(PluginTool producer, PluginTool consumer)
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
Workspace createWorkspace(java.lang.String name) throws DuplicateNameException
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
void removeWorkspace(Workspace ws)
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
void addWorkspaceChangeListener(WorkspaceChangeListener listener)
Add the listener that will be notified when a tool is added or removed.- Parameters:
listener
- workspace listener to add
-
removeWorkspaceChangeListener
void removeWorkspaceChangeListener(WorkspaceChangeListener l)
Remove the workspace listener.- Parameters:
l
- workspace listener to remove
-
disconnectTool
void disconnectTool(PluginTool tool)
Removes all connections involving tool- Parameters:
tool
- tool for which to remove all connections
-
toolChanged
void toolChanged(PluginTool tool)
A configuration change was made to the tool; a plugin was added or removed.- Parameters:
tool
- tool that changed
-
-