|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.editor.actions.AbstractActionContributor sk.uniba.euromath.editor.xmlEditor.actions.XMLActionContributor
public class XMLActionContributor
Contributor for XMLEditor. Creates and fills context menu with actions for selecting and editing.
Field Summary | |
---|---|
protected EMMenuManager |
attributeMenu
Insert attribute submenu manager. |
protected EMMenuManager |
contextMenu
Menu mamager for context menu. |
protected EMMenuManager |
insertAfterMenu
Insert after submenu manager. |
protected EMMenuManager |
insertBeforeMenu
Insert before submenu manager. |
protected EMMenuManager |
insertChildMenu
Insert child submenu manager. |
Constructor Summary | |
---|---|
XMLActionContributor(EditorSite site,
org.eclipse.gef.GraphicalViewer viewer)
Constructor. |
Method Summary | |
---|---|
protected void |
configureFactory()
Configures factory. |
void |
contributeCoolBar(ICoolBarManager manager)
Contribute to global cool bar by modifying passed manager. |
protected void |
contributeToContextMenu(IMenuManager manager)
Fills context menu. |
void |
contributeToMenu(IMenuManager manager)
Contribute to global menu by modifying passed manager. |
void |
contributeToStatusLine(IStatusLineManager manager)
Contribute to status line by modifying passed manager. |
void |
contributeToToolBar(IToolBarManager manager)
Contribute to global tool bar by modifying passed manager. |
protected void |
createContextMenu()
Creates context menu on GraphicalViewer's control. |
org.eclipse.gef.ui.actions.ActionRegistry |
getActionRegistry()
Returns action registry in which created actions are registered. |
EditorSite |
getEditorSite()
|
Map<String,IAction> |
getGlobalActionHandlers()
Return global action handlers, which are registred when associated IEditor is gains focus and removed when losts focus; |
org.eclipse.gef.ui.actions.ActionRegistry |
getGlobalActionRegistry()
Global registry for all IEditors. |
org.eclipse.gef.GraphicalViewer |
getGraphicalViewer()
|
IWorkbenchPart |
getWorkbenchPart()
Returns workbench part for which actions are created. |
void |
init(org.eclipse.gef.ui.actions.ActionRegistry actionRegistry)
Initialization of this contributor with access to global registry. |
protected void |
populateAttributeMenu(IMenuManager manager)
Fills up attribute menu to right content. |
protected void |
populateElementMenu(IMenuManager manager)
Fills up element menu to right content. |
protected void |
populateInsertPositionMenu(IMenuManager manager,
InsertPosition position)
Fills up insert before/child/after/ at caret menu to right content. |
void |
setEditorSite(EditorSite editorSite)
|
void |
setGlobalActionRegistry(org.eclipse.gef.ui.actions.ActionRegistry globalActionRegistry)
|
void |
setGraphicalViewer(org.eclipse.gef.GraphicalViewer graphicalViewer)
|
Methods inherited from class sk.uniba.euromath.editor.actions.AbstractActionContributor |
---|
checkOrCreateAction, checkOrCreateActions, dispose, getActionFactory, getDocumentModifyHelper, getXMLAccess, selectionChanged, setActionFactory, setXMLAccess, stackChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected EMMenuManager contextMenu
protected EMMenuManager insertBeforeMenu
protected EMMenuManager insertChildMenu
protected EMMenuManager insertAfterMenu
protected EMMenuManager attributeMenu
Constructor Detail |
---|
public XMLActionContributor(EditorSite site, org.eclipse.gef.GraphicalViewer viewer)
site
- EditorSite instanceviewer
- GraphicalViewer from XMLEditor, to which this
contributor contributes context menuMethod Detail |
---|
protected void configureFactory()
AbstractActionContributor
configureFactory
in class AbstractActionContributor
protected void createContextMenu()
public void init(org.eclipse.gef.ui.actions.ActionRegistry actionRegistry)
init
in interface IActionContributor
actionRegistry
- global action registrypublic void contributeToToolBar(IToolBarManager manager)
IActionContributor
contributeToToolBar
in interface IActionContributor
public void contributeToStatusLine(IStatusLineManager manager)
IActionContributor
contributeToStatusLine
in interface IActionContributor
public void contributeCoolBar(ICoolBarManager manager)
IActionContributor
contributeCoolBar
in interface IActionContributor
public void contributeToMenu(IMenuManager manager)
IActionContributor
contributeToMenu
in interface IActionContributor
protected void contributeToContextMenu(IMenuManager manager)
manager
- protected void populateElementMenu(IMenuManager manager)
manager
- of element menuprotected void populateInsertPositionMenu(IMenuManager manager, InsertPosition position)
manager
- of insert before menuposition
- any of InsertPosition
protected void populateAttributeMenu(IMenuManager manager)
manager
- of attribute menupublic Map<String,IAction> getGlobalActionHandlers()
IActionContributor
getGlobalActionHandlers
in interface IActionContributor
public org.eclipse.gef.ui.actions.ActionRegistry getGlobalActionRegistry()
getGlobalActionRegistry
in interface IActionContributor
IActionContributor.init(ActionRegistry)
public EditorSite getEditorSite()
public void setEditorSite(EditorSite editorSite)
editorSite
- The editorSite to set.public org.eclipse.gef.GraphicalViewer getGraphicalViewer()
public void setGraphicalViewer(org.eclipse.gef.GraphicalViewer graphicalViewer)
graphicalViewer
- The graphicalViewer to set.public void setGlobalActionRegistry(org.eclipse.gef.ui.actions.ActionRegistry globalActionRegistry)
globalActionRegistry
- The globalActionRegistry to set.public IWorkbenchPart getWorkbenchPart()
AbstractActionContributor
getWorkbenchPart
in class AbstractActionContributor
public org.eclipse.gef.ui.actions.ActionRegistry getActionRegistry()
AbstractActionContributor
getActionRegistry
in class AbstractActionContributor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |