org.eclipse.weaver.editors
Class GlobalWeaverEditorContributor

java.lang.Object
  extended byEditingDomainActionBarContributor
      extended byorg.eclipse.weaver.editors.GlobalWeaverEditorContributor

public class GlobalWeaverEditorContributor
extends EditingDomainActionBarContributor

Manages the installation/deinstallation of global actions for multi-page editors. Responsible for the redirection of global actions to the active editor. Multi-page contributor replaces the contributors for the individual editors in the multi-page editor.

Since:
1.0
Author:
- Marcos Didonet Del Fabro (LINA Labs, INRIA team)
- Guillaume Gueltas (Sodifrance)
See Also:
Serialized Form

Field Summary
protected  IEditorPart activeEditorPart
           
protected  java.util.Collection createChildActions
           
protected  IMenuManager createChildMenuManager
           
protected  java.util.Collection createSiblingActions
           
protected  IMenuManager createSiblingMenuManager
           
protected  IAction saveEcoreMetamodelAction
          Action to save the weaving metamodel as ecore
protected  IAction saveKm3MetamodelAction
          Action to save the weaving metamodel as ecore
protected  ISelectionProvider selectionProvider
           
protected  IAction showPropertiesViewAction
          Action for display the property view
protected  IWeaverMenuAdapter wMenuAdapter
           
 
Constructor Summary
GlobalWeaverEditorContributor()
          This creates an instance the contributor.
 
Method Summary
protected  void addGlobalActions(IMenuManager menuManager)
          This inserts global actions before the "additions-end" separator.
 void contributeToMenu(IMenuManager menuManager)
           
protected  void depopulateManager(IContributionManager manager, java.util.Collection actions)
          This removes from the specified manager all org.eclipse.jface.action.ActionContributionItems based on the org.eclipse.jface.action.IActions contained in the actions collection
protected  java.util.Collection generateCreateChildActions(java.util.Collection descriptors, ISelection selection)
          This generates a org.eclipse.emf.edit.ui.action.CreateChildAction for each object in descriptors, and returns the collection of these actions.
protected  java.util.Collection generateCreateSiblingActions(java.util.Collection descriptors, ISelection selection)
          This generates a org.eclipse.emf.edit.ui.action.CreateSiblingAction for each object in descriptors, and returns the collection of these actions.
 void menuAboutToShow(IMenuManager menuManager)
          This populates the pop-up menu before it appears
protected  void populateManager(IContributionManager manager, java.util.Collection actions, java.lang.String contributionID)
          This populates the specified manager with org.eclipse.jface.action.ActionContributionItems based on the org.eclipse.jface.action.IActions contained in the actions collection, by inserting them before the specified contribution item contributionID.
 void selectionChanged(SelectionChangedEvent event)
           
 void setActiveEditor(IEditorPart part)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

activeEditorPart

protected IEditorPart activeEditorPart

selectionProvider

protected ISelectionProvider selectionProvider

createChildActions

protected java.util.Collection createChildActions

createChildMenuManager

protected IMenuManager createChildMenuManager

createSiblingActions

protected java.util.Collection createSiblingActions

createSiblingMenuManager

protected IMenuManager createSiblingMenuManager

wMenuAdapter

protected IWeaverMenuAdapter wMenuAdapter

showPropertiesViewAction

protected IAction showPropertiesViewAction
Action for display the property view


saveKm3MetamodelAction

protected IAction saveKm3MetamodelAction
Action to save the weaving metamodel as ecore


saveEcoreMetamodelAction

protected IAction saveEcoreMetamodelAction
Action to save the weaving metamodel as ecore

Constructor Detail

GlobalWeaverEditorContributor

public GlobalWeaverEditorContributor()
This creates an instance the contributor.

Method Detail

setActiveEditor

public void setActiveEditor(IEditorPart part)

contributeToMenu

public void contributeToMenu(IMenuManager menuManager)

selectionChanged

public void selectionChanged(SelectionChangedEvent event)

depopulateManager

protected void depopulateManager(IContributionManager manager,
                                 java.util.Collection actions)
This removes from the specified manager all org.eclipse.jface.action.ActionContributionItems based on the org.eclipse.jface.action.IActions contained in the actions collection

Parameters:
manager -
actions -

populateManager

protected void populateManager(IContributionManager manager,
                               java.util.Collection actions,
                               java.lang.String contributionID)
This populates the specified manager with org.eclipse.jface.action.ActionContributionItems based on the org.eclipse.jface.action.IActions contained in the actions collection, by inserting them before the specified contribution item contributionID. If ID is null, they are simply added.

Parameters:
manager -
actions -
contributionID -

menuAboutToShow

public void menuAboutToShow(IMenuManager menuManager)
This populates the pop-up menu before it appears

Parameters:
menuManager -

addGlobalActions

protected void addGlobalActions(IMenuManager menuManager)
This inserts global actions before the "additions-end" separator.

Parameters:
menuManager -

generateCreateChildActions

protected java.util.Collection generateCreateChildActions(java.util.Collection descriptors,
                                                          ISelection selection)
This generates a org.eclipse.emf.edit.ui.action.CreateChildAction for each object in descriptors, and returns the collection of these actions.

Parameters:
descriptors -
selection -
Returns:

generateCreateSiblingActions

protected java.util.Collection generateCreateSiblingActions(java.util.Collection descriptors,
                                                            ISelection selection)
This generates a org.eclipse.emf.edit.ui.action.CreateSiblingAction for each object in descriptors, and returns the collection of these actions.

Parameters:
descriptors -
selection -
Returns: