sk.uniba.euromath.editor.actions
Class MultiViewActionContributor

java.lang.Object
  extended by org.eclipse.ui.part.EditorActionBarContributor
      extended by org.eclipse.ui.part.MultiPageEditorActionBarContributor
          extended by sk.uniba.euromath.editor.actions.MultiViewActionContributor
All Implemented Interfaces:
IEditorActionBarContributor, IFocusListener

public class MultiViewActionContributor
extends MultiPageEditorActionBarContributor
implements IFocusListener

MultiViewActionContributor is contributor for special IEditorPart - MutliViewXMLEditor. It is common contributor for all opened views. Contributes to global bars by it's contributions and by contribution of active IEditor. When focus is changed in EditorSite (active IEditor has changed) or in workbench page (another EditorSite has ben activated, ...) contribution are updated and actions are updated so. Action contributions must implement IMultiViewAction interface, must be held in global registry and must have unique id.

Author:
Tomáš Studva 19.9.2005

Constructor Summary
MultiViewActionContributor()
          Constructor.
 
Method Summary
 void contributeToMenu(IMenuManager menuManager)
           
 void contributeToStatusLine(IStatusLineManager statusLineManager)
           
 void contributeToToolBar(IToolBarManager toolBarManager)
           
 void focusGained(IEditor editor)
          Sent when IEditor gets focus.
 void focusLost(IEditor editor)
          Sent when IEditor loses focus.
 org.eclipse.gef.ui.actions.ActionRegistry getActionRegistry()
          This contributor's action registry.
 EditorSite getActiveEditorSite()
           
 void setActiveEditorSite(EditorSite activeEditorSite)
           
 void setActivePage(IEditorPart activeEditor)
           
 
Methods inherited from class org.eclipse.ui.part.MultiPageEditorActionBarContributor
setActiveEditor
 
Methods inherited from class org.eclipse.ui.part.EditorActionBarContributor
contributeToCoolBar, dispose, getActionBars, getPage, init, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiViewActionContributor

public MultiViewActionContributor()
Constructor.

Method Detail

setActivePage

public void setActivePage(IEditorPart activeEditor)
Specified by:
setActivePage in class MultiPageEditorActionBarContributor

getActionRegistry

public org.eclipse.gef.ui.actions.ActionRegistry getActionRegistry()
This contributor's action registry.

Returns:
action registry used to registry actions used to contribute by this contributor

contributeToMenu

public void contributeToMenu(IMenuManager menuManager)
Overrides:
contributeToMenu in class EditorActionBarContributor

contributeToStatusLine

public void contributeToStatusLine(IStatusLineManager statusLineManager)
Overrides:
contributeToStatusLine in class EditorActionBarContributor

contributeToToolBar

public void contributeToToolBar(IToolBarManager toolBarManager)
Overrides:
contributeToToolBar in class EditorActionBarContributor

focusGained

public void focusGained(IEditor editor)
Description copied from interface: IFocusListener
Sent when IEditor gets focus.

Specified by:
focusGained in interface IFocusListener
Parameters:
editor - which has acquired focus

focusLost

public void focusLost(IEditor editor)
Description copied from interface: IFocusListener
Sent when IEditor loses focus.

Specified by:
focusLost in interface IFocusListener
Parameters:
editor - which has lost focus

getActiveEditorSite

public EditorSite getActiveEditorSite()
Returns:
Returns the activeEditorSite.

setActiveEditorSite

public void setActiveEditorSite(EditorSite activeEditorSite)
Parameters:
activeEditorSite - The activeEditorSite to set.


Copyright © 2003-2006 null. All Rights Reserved.