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:
IActionContributor

public class TextActionContributor
extends XMLActionContributor

Author:
Tomáš Studva 30.9.2005

Constructor Summary
TextActionContributor(EditorSite site, org.eclipse.gef.GraphicalViewer viewer, CaretManager caretManager)
          Constructor.
 
Method Summary
protected  IMultiViewAction checkOrCreateAction(String key)
          Checks for action with id key in registry.
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.
protected  void createContextMenu()
          Creates two more menus.
protected  EMMenuManager getEntityMenu()
           
protected  EMMenuManager getInsertAtCaretMenu()
           
protected  void populateDeleteMenu(IMenuManager manager)
          Adds statically to more action to delete menu.
protected  void populateEntityMenu(IMenuManager manager)
          Fills up entity menu to right content.
protected  void populateInsertAtCaretMenu(IMenuManager manager)
          Fills up insert menu to right content.
 
Methods inherited from class sk.uniba.euromath.editor.xmlEditor.actions.XMLActionContributor
contributeCoolBar, contributeToToolBar, getActionRegistry, getAttributeMenu, getContextMenuManager, getDeleteMenu, getEditorSite, getGlobalActionRegistry, getGraphicalViewer, getInsertAfterMenu, getInsertBeforeMenu, getInsertChildMenu, getWorkbenchPart, init, populateAttributeMenu, populateElementMenu, populateInsertPositionMenu, setEditorSite, setGlobalActionRegistry, setGraphicalViewer
 
Methods inherited from class sk.uniba.euromath.editor.actions.AbstractActionContributor
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

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

checkOrCreateAction

protected IMultiViewAction checkOrCreateAction(String key)
Description copied from class: AbstractActionContributor
Checks for action with id key in registry. If exist - is registered, than is returned. Otherwise is created by action factory. SelectionActions are added to selectionAction list for selection change update.

Overrides:
checkOrCreateAction in class AbstractActionContributor
Parameters:
key - to identify action, must be IAction.getId()
Returns:
desired action

createContextMenu

protected void createContextMenu()
Creates two more menus.

Overrides:
createContextMenu 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

populateDeleteMenu

protected void populateDeleteMenu(IMenuManager manager)
Adds statically to more action to delete menu.

Overrides:
populateDeleteMenu in class XMLActionContributor
Parameters:
manager - deleteMenu manager

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.