Package ghidra.framework.model
Interface ToolManager
-
- All Known Implementing Classes:
ToolManagerImpl
public interface ToolManagerInterface 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 Change Modifier and Type Field Description static java.lang.StringDEFAULT_WORKSPACE_NAMEThe name to use for a new unnamed workspace; used by the Ghidra Project Window when the user creates a new workspace.static java.lang.StringWORKSPACE_NAME_PROPERTYProperty used when sending the change event when a workspace name is changed.
-
Method Summary
All Methods Instance Methods Abstract Methods Change Modifier and Type Method Description voidaddWorkspaceChangeListener(WorkspaceChangeListener listener)Add the listener that will be notified when a tool is added or removed.WorkspacecreateWorkspace(java.lang.String name)Create a workspace with the given name.NEW voiddisconnectTool(PluginTool tool)Removes all connections involving toolWorkspacegetActiveWorkspace()Get the active workspaceNEW ToolConnectiongetConnection(PluginTool producer, PluginTool consumer)Get the connection object for the producer and consumer toolsMODIFIED PluginTool[]getConsumerTools()Get a list of tools that consume at least one tool event.MODIFIED PluginTool[]getProducerTools()Get a list of tools that produce at least one tool event.MODIFIED PluginTool[]getRunningTools()Get a list running tools across all workspaces.Workspace[]getWorkspaces()Get list of known workspaces.voidremoveWorkspace(Workspace ws)Remove the workspace.voidremoveWorkspaceChangeListener(WorkspaceChangeListener l)Remove the workspace listener.NEW voidtoolChanged(PluginTool tool)A configuration change was made to the tool; a plugin was added or removed.REMOVED ToolConnectiongetConnection(Tool producer, Tool consumer) (Removed)REMOVED voiddisconnectTool(Tool tool) (Removed)REMOVED voidtoolChanged(Tool tool) (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 NEW
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 MODIFIED
return type: ghidra.framework.model.Tool[] → ghidra.framework.plugintool.PluginTool[]-ghidra.framework.model.Tool[] getProducerTools()+ghidra.framework.plugintool.PluginTool[] 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 MODIFIED
return type: ghidra.framework.model.Tool[] → ghidra.framework.plugintool.PluginTool[]-ghidra.framework.model.Tool[] getConsumerTools()+ghidra.framework.plugintool.PluginTool[] 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 MODIFIED
return type: ghidra.framework.model.Tool[] → ghidra.framework.plugintool.PluginTool[]-ghidra.framework.model.Tool[] getRunningTools()+ghidra.framework.plugintool.PluginTool[] 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 NEW
void disconnectTool(PluginTool tool)
Removes all connections involving tool- Parameters:
tool- tool for which to remove all connections
-
toolChanged NEW
void toolChanged(PluginTool tool)
A configuration change was made to the tool; a plugin was added or removed.- Parameters:
tool- tool that changed
-
-