|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IToolManager
Field Summary | |
---|---|
static java.lang.String |
ATTR_CLASS
Points to class field of extension point attribute |
static java.lang.String |
ATTR_ID
Points to id field of extension point attribute |
static java.lang.String |
P_TOOL_MANAGER
Preference constant that can used to set and look up the default IToolManager. |
static java.lang.String |
XPID
|
Method Summary | |
---|---|
void |
addToolAction(IAction action)
Adds an Action that executes a tool to the toolbar. |
void |
contributeActionTools(IToolBarManager toolBarManager,
IActionBars bars)
Adds action tools contribution items to the toolbar. |
void |
contributeActiveModalTool(IMenuManager manager)
Contributes items from current active modal tool to the context menu if the modal tool implements IContextMenuContributionTool
interface. |
void |
contributeGlobalActions(IWorkbenchPart part,
IActionBars bars)
Contributes the common global actions. |
void |
contributeModalTools(IToolBarManager toolBarManager,
IActionBars bars)
Adds modal tools contribution items to the toolbar. |
void |
contributeToCoolBar(SubCoolBarManager cbmanager,
IActionBars bars)
Deprecated. |
void |
contributeToMenu(IMenuManager manager)
|
MenuManager |
createOperationsContextMenu(ISelection selection)
This allows for customized operation menus that are based on the currently selected tool. |
IAction |
createToolAction(java.lang.String toolID,
java.lang.String categoryID)
Creates a action that acts as a proxy for the tool in the editor toolbar. |
ActionToolCategory |
findActionCategory(java.lang.String id)
|
Tool |
findTool(java.lang.String toolID)
Finds tool proxy and returns the actual tool implementation object. |
Cursor |
findToolCursor(java.lang.String cursorID)
Searches for the Cursor object by ID. |
ToolCategory |
getActiveCategory()
Returns the tool category that is currently active. |
Tool |
getActiveTool()
Returns current active tool implementation object. |
IAction |
getBACKWARD_HISTORYAction()
Retrieves the backward navigation action that is used by much of the map components such as the MapEditor and the LayersView. |
IAction |
getCOPYAction(IWorkbenchPart part)
|
IAction |
getCUTAction(IWorkbenchPart part)
|
IAction |
getDELETEAction()
|
IAction |
getFORWARD_HISTORYAction()
Retrieves the forward navigation action that is used by much of the map components such as the MapEditor and the LayersView. |
java.util.List<ModalToolCategory> |
getModalToolCategories()
Returns the list of categories containing modal tools. |
IAction |
getPASTEAction(IWorkbenchPart part)
|
IAction |
getREDOAction()
Retrieves the redo action that is used by much of the map components such as the MapEditor and the LayersView. |
IAction |
getTool(java.lang.String toolID,
java.lang.String categoryID)
Deprecated. since 1.1, use getToolAction() |
IAction |
getToolAction(java.lang.String toolID,
java.lang.String categoryID)
Returns the tool identified by an id and a category. |
IAction |
getUNDOAction()
Retrieves the undo action that is used by much of the map components such as the MapEditor and the LayersView. |
void |
registerActionsWithPart(IWorkbenchPart part)
Registers keybindings for tools and cut/paste with the workbench part |
void |
setBACKAction(IAction action,
IWorkbenchPart part)
|
void |
setCOPYAction(IAction action,
IWorkbenchPart part)
|
void |
setCurrentEditor(MapPart editor)
|
void |
setCUTAction(IAction action,
IWorkbenchPart part)
|
void |
setDELETEAction(IAction action,
IWorkbenchPart part)
|
void |
setFORWARDAction(IAction action,
IWorkbenchPart part)
|
void |
setPASTEAction(IAction action,
IWorkbenchPart part)
|
void |
setREDOAction(IAction action,
IWorkbenchPart part)
|
void |
setUNDOAction(IAction action,
IWorkbenchPart part)
|
void |
unregisterActions(IWorkbenchPart part)
Unregisters keybindings for tools and cut/paste with the workbench part |
Field Detail |
---|
static final java.lang.String XPID
static final java.lang.String ATTR_ID
static final java.lang.String ATTR_CLASS
static final java.lang.String P_TOOL_MANAGER
Method Detail |
---|
void setCurrentEditor(MapPart editor)
void addToolAction(IAction action)
action
- IAction createToolAction(java.lang.String toolID, java.lang.String categoryID)
The client code must set the name image descriptor etc... of the Action
toolID
- the id of the toolcategoryID
- the category the tool is part of
ActionToolCategory findActionCategory(java.lang.String id)
void contributeToMenu(IMenuManager manager)
void contributeActiveModalTool(IMenuManager manager)
IContextMenuContributionTool
interface.
manager
- a context menu manager from MapEditor.IAction getREDOAction()
void setREDOAction(IAction action, IWorkbenchPart part)
IAction getUNDOAction()
part
- void setUNDOAction(IAction action, IWorkbenchPart part)
IAction getFORWARD_HISTORYAction()
void setFORWARDAction(IAction action, IWorkbenchPart part)
void registerActionsWithPart(IWorkbenchPart part)
part
- void unregisterActions(IWorkbenchPart part)
part
- IAction getBACKWARD_HISTORYAction()
part
- void setBACKAction(IAction action, IWorkbenchPart part)
IAction getCUTAction(IWorkbenchPart part)
void setCUTAction(IAction action, IWorkbenchPart part)
IAction getCOPYAction(IWorkbenchPart part)
void setCOPYAction(IAction action, IWorkbenchPart part)
IAction getPASTEAction(IWorkbenchPart part)
void setPASTEAction(IAction action, IWorkbenchPart part)
IAction getDELETEAction()
void setDELETEAction(IAction action, IWorkbenchPart part)
void contributeToCoolBar(SubCoolBarManager cbmanager, IActionBars bars)
cbmanager
- bars
- ModalTool
,
ActionTool
void contributeActionTools(IToolBarManager toolBarManager, IActionBars bars)
The actual toolbar UI elements are created and managed by the framework, IToolManager
just adds action tools as contributions to the specified IToolBarManager
.
toolManager
- bars
- void contributeModalTools(IToolBarManager toolBarManager, IActionBars bars)
The actual toolbar UI elements are created and managed by the framework, IToolManager
just adds action tools as contributions to the specified IToolBarManager
.
toolManager
- bars
- void contributeGlobalActions(IWorkbenchPart part, IActionBars bars)
bars
- IAction getTool(java.lang.String toolID, java.lang.String categoryID)
UnsupportedOperationException
, but it can be ran with either
IAction#run()
or IAction#runWithEvent(org.eclipse.swt.widgets.Event)
.
toolID
- the id of the tool to findcategoryID
- the id of the category the tool is part of
IAction getToolAction(java.lang.String toolID, java.lang.String categoryID)
UnsupportedOperationException
, but it can be ran with either
IAction#run()
or IAction#runWithEvent(org.eclipse.swt.widgets.Event)
.
toolID
- the id of the tool to findcategoryID
- the id of the category the tool is part of
java.util.List<ModalToolCategory> getModalToolCategories()
ToolCategory getActiveCategory()
MenuManager createOperationsContextMenu(ISelection selection)
selection
- the selection to find operations for.Tool getActiveTool()
Tool findTool(java.lang.String toolID)
toolID
- the tool ID from extension registry.
Cursor findToolCursor(java.lang.String cursorID)
Cursor
object by ID.
The cursorID
is a custom ID from extension
registry or a constant from ModatTool
interface for
systems cursors.
cursorID
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |