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(Tool tool)
Removes all connections involving toolWorkspace
getActiveWorkspace()
Get the active workspaceToolConnection
getConnection(Tool producer, Tool consumer)
Get the connection object for the producer and consumer tools.Tool[]
getConsumerTools()
Get a list of tools that consume at least one tool event.Tool[]
getProducerTools()
Get a list of tools that produce at least one tool event.Tool[]
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(Tool 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(Tool producer, Tool 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
-
getProducerTools
Tool[] getProducerTools()
Get a list of tools that produce at least one tool event.- Returns:
- zero-length array if no tool produces any events
-
getConsumerTools
Tool[] getConsumerTools()
Get a list of tools that consume at least one tool event.- Returns:
- zero-length array if no tool consumes any events
-
getRunningTools
Tool[] 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- 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(Tool tool)
Removes all connections involving tool- Parameters:
tool
- tool for which to remove all connections
-
toolChanged
void toolChanged(Tool tool)
A configuration change was made to the tool; a plugin was added or removed.- Parameters:
tool
- tool that changed
-
-