|
||||||||||
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.
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. |
protected EMMenuManager |
getAttributeMenu()
|
protected EMMenuManager |
getContextMenuManager()
|
protected EMMenuManager |
getDeleteMenu()
|
EditorSite |
getEditorSite()
|
org.eclipse.gef.ui.actions.ActionRegistry |
getGlobalActionRegistry()
Global registry for all IEditors. |
org.eclipse.gef.GraphicalViewer |
getGraphicalViewer()
|
protected EMMenuManager |
getInsertAfterMenu()
|
protected EMMenuManager |
getInsertBeforeMenu()
|
protected EMMenuManager |
getInsertChildMenu()
|
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 |
populateDeleteMenu(IMenuManager manager)
Fills delete menu with actions. |
protected void |
populateElementMenu(IMenuManager manager)
Fills up element menu to right content. |
protected void |
populateInsertPositionMenu(IMenuManager manager,
short position)
Fills up insert before/child/after 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, getActionFactory, getDocumentModifyHelper, getSelectionActions, getXMLAccess, selectionChangedHandle, setActionFactory, setSelectionActions, setXMLAccess |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 registryprotected void populateDeleteMenu(IMenuManager manager)
manager
- deleteMenu managerpublic 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, short position)
manager
- of insert before menuposition
- one of ActionConsts#BEFORE
/ActionConsts#CHILD
/ActionConsts#AFTER
protected void populateAttributeMenu(IMenuManager manager)
manager
- of attribute menupublic 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
protected EMMenuManager getAttributeMenu()
protected EMMenuManager getContextMenuManager()
protected EMMenuManager getDeleteMenu()
protected EMMenuManager getInsertAfterMenu()
protected EMMenuManager getInsertBeforeMenu()
protected EMMenuManager getInsertChildMenu()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |