sk.uniba.euromath.editor.textEditor.actions
Class TextActionContributor

java.lang.Object
  extended by sk.uniba.euromath.editor.actions.AbstractActionContributor
      extended by sk.uniba.euromath.editor.xmlEditor.actions.XMLActionContributor
          extended by sk.uniba.euromath.editor.textEditor.actions.TextActionContributor
All Implemented Interfaces:
org.eclipse.gef.commands.CommandStackEventListener, IActionContributor, IDOMSelectionChangedListener

public class TextActionContributor
extends XMLActionContributor

Author:
Tomáš Studva 30.9.2005

Field Summary
 
Fields inherited from class sk.uniba.euromath.editor.xmlEditor.actions.XMLActionContributor
attributeMenu, contextMenu, insertAfterMenu, insertBeforeMenu, insertChildMenu
 
Constructor Summary
TextActionContributor(EditorSite site, org.eclipse.gef.GraphicalViewer viewer, CaretManager caretManager)
          Constructor.
 
Method Summary
protected  void configureFactory()
          Configures factory.
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 two more menus.
protected  EMMenuManager getEntityMenu()
           
 Map<String,IAction> getGlobalActionHandlers()
          Return global action handlers, which are registred when associated IEditor is gains focus and removed when losts focus;
protected  EMMenuManager getInsertAtCaretMenu()
           
protected  void populateEntityMenu(IMenuManager manager)
          Fills up entity menu to right content.
protected  void populateInsertAtCaretMenu(IMenuManager manager)
          Fills up insert menu to right content.
protected  void populateInsertPositionMenu(IMenuManager manager, InsertPosition position)
          Fills up insert before/child/after/ at caret menu to right content.
 
Methods inherited from class sk.uniba.euromath.editor.xmlEditor.actions.XMLActionContributor
contributeCoolBar, getActionRegistry, getEditorSite, getGlobalActionRegistry, getGraphicalViewer, getWorkbenchPart, init, populateAttributeMenu, populateElementMenu, setEditorSite, setGlobalActionRegistry, setGraphicalViewer
 
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
 

Constructor Detail

TextActionContributor

public TextActionContributor(EditorSite site,
                             org.eclipse.gef.GraphicalViewer viewer,
                             CaretManager caretManager)
Constructor.

Parameters:
site -
viewer -
caretProvider -
Method Detail

configureFactory

protected void configureFactory()
Description copied from class: AbstractActionContributor
Configures factory. Registers action in factory by their ids to their classes.

Overrides:
configureFactory in class XMLActionContributor

createContextMenu

protected void createContextMenu()
Creates two more menus.

Overrides:
createContextMenu in class XMLActionContributor

contributeToToolBar

public void contributeToToolBar(IToolBarManager manager)
Description copied from interface: IActionContributor
Contribute to global tool bar by modifying passed manager.

Specified by:
contributeToToolBar in interface IActionContributor
Overrides:
contributeToToolBar in class XMLActionContributor

contributeToContextMenu

protected void contributeToContextMenu(IMenuManager manager)
Description copied from class: XMLActionContributor
Fills context menu.

Overrides:
contributeToContextMenu in class XMLActionContributor

populateInsertAtCaretMenu

protected void populateInsertAtCaretMenu(IMenuManager manager)
Fills up insert menu to right content. Prior insert menu must be empty.

Parameters:
manager - of insert menu

populateEntityMenu

protected void populateEntityMenu(IMenuManager manager)
Fills up entity menu to right content. Prior entity menu must be empty.

Parameters:
manager - of entity menu

populateInsertPositionMenu

protected void populateInsertPositionMenu(IMenuManager manager,
                                          InsertPosition position)
Description copied from class: XMLActionContributor
Fills up insert before/child/after/ at caret menu to right content. Insert menu must be empty prior.

Overrides:
populateInsertPositionMenu in class XMLActionContributor
Parameters:
manager - of insert before menu
position - any of InsertPosition

getGlobalActionHandlers

public Map<String,IAction> getGlobalActionHandlers()
Description copied from interface: IActionContributor
Return global action handlers, which are registred when associated IEditor is gains focus and removed when losts focus;

Specified by:
getGlobalActionHandlers in interface IActionContributor
Overrides:
getGlobalActionHandlers in class XMLActionContributor
Returns:
Map

contributeToStatusLine

public void contributeToStatusLine(IStatusLineManager manager)
Description copied from interface: IActionContributor
Contribute to status line by modifying passed manager.

Specified by:
contributeToStatusLine in interface IActionContributor
Overrides:
contributeToStatusLine in class XMLActionContributor

contributeToMenu

public void contributeToMenu(IMenuManager manager)
Description copied from interface: IActionContributor
Contribute to global menu by modifying passed manager.

Specified by:
contributeToMenu in interface IActionContributor
Overrides:
contributeToMenu in class XMLActionContributor

getEntityMenu

protected EMMenuManager getEntityMenu()
Returns:
Returns the entityMenu.

getInsertAtCaretMenu

protected EMMenuManager getInsertAtCaretMenu()
Returns:
Returns the insertMenu.


Copyright © 2003-2006 null. All Rights Reserved.