com.sysord.mad.ui
Class MAD

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.ui.part.WorkbenchPart
          extended by org.eclipse.ui.part.ViewPart
              extended by com.sysord.mad.ui.MAD
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.IPersistable, org.eclipse.ui.IViewPart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation

public class MAD
extends org.eclipse.ui.part.ViewPart

Main view for the Model Aggregator eDitor.

Author:
Fabien Vignal

Field Summary
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
MAD()
          Default constructor.
 
Method Summary
protected  void _selectionChanged(org.eclipse.emf.ecore.EObject eObject)
          Notified when the selection has changed.
protected  void addConfigurationManagerListener()
          Add a ConfigurationManager.ConfigurationManagerListener for reloading the view when the configuration have changed.
protected  void addModelCacheListener()
          Add a listener to the ModelCache for listening to foreign models changes.
protected  void addModelSelectionListener()
          Add the listener given by getSelectionChangedListener() to the ModelSelectionPlugin.
protected  SWTSpecificWidgetContext createContext(org.eclipse.swt.widgets.Composite parentComposite)
           
 void createContextMenuManager(org.eclipse.swt.widgets.Control... controls)
          Create the context menu for the current tabbed container.
 void createPartControl(org.eclipse.swt.widgets.Composite parent)
           
 void dispose()
           
protected  void fillContextMenu(org.eclipse.jface.action.IMenuManager contextMenuManager)
          Fill the view context menu.
protected  com.sysord.modeling.modelselection.IModelSelectionListener getSelectionChangedListener()
          Returns a IModeltSelectionListener for listening the selection of EObjects.
protected  void init()
           
protected  void initializePreferences()
          Initialize MAD with the defined preferences.
 void setFocus()
           
protected  void update(org.eclipse.emf.ecore.EObject eObject)
          Updates the preferences provider and the layer selection for the given EObject.
protected  void updateLayerSelection()
          Updates the layer selection from the project preferences if the selected EObject is in an other project than the previous selected EObject.
protected  void updateProjectPreferenceProvider(org.eclipse.emf.ecore.EObject eObject)
          Updates the current Project Preference Provider for the project containing the resource of the given EObject.
 
Methods inherited from class org.eclipse.ui.part.ViewPart
checkSite, getViewSite, init, init, saveState, setContentDescription, setInitializationData, setPartName
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Constructor Detail

MAD

public MAD()
Default constructor.

Method Detail

init

protected void init()

addModelSelectionListener

protected void addModelSelectionListener()
Add the listener given by getSelectionChangedListener() to the ModelSelectionPlugin.


initializePreferences

protected void initializePreferences()
Initialize MAD with the defined preferences.


getSelectionChangedListener

protected com.sysord.modeling.modelselection.IModelSelectionListener getSelectionChangedListener()
Returns a IModeltSelectionListener for listening the selection of EObjects.

Returns:
a IModelSelectionListener.

createPartControl

public void createPartControl(org.eclipse.swt.widgets.Composite parent)
Specified by:
createPartControl in interface org.eclipse.ui.IWorkbenchPart
Specified by:
createPartControl in class org.eclipse.ui.part.WorkbenchPart

createContext

protected SWTSpecificWidgetContext createContext(org.eclipse.swt.widgets.Composite parentComposite)

_selectionChanged

protected void _selectionChanged(org.eclipse.emf.ecore.EObject eObject)
Notified when the selection has changed.

Parameters:
eObject -

update

protected void update(org.eclipse.emf.ecore.EObject eObject)
Updates the preferences provider and the layer selection for the given EObject.

Parameters:
eObject -

updateProjectPreferenceProvider

protected void updateProjectPreferenceProvider(org.eclipse.emf.ecore.EObject eObject)
Updates the current Project Preference Provider for the project containing the resource of the given EObject.

Parameters:
eObject -

updateLayerSelection

protected void updateLayerSelection()
Updates the layer selection from the project preferences if the selected EObject is in an other project than the previous selected EObject.


addModelCacheListener

protected void addModelCacheListener()
Add a listener to the ModelCache for listening to foreign models changes.


addConfigurationManagerListener

protected void addConfigurationManagerListener()
Add a ConfigurationManager.ConfigurationManagerListener for reloading the view when the configuration have changed.


createContextMenuManager

public void createContextMenuManager(org.eclipse.swt.widgets.Control... controls)
Create the context menu for the current tabbed container.

Parameters:
controls - Controls for which the context menu will be set.

fillContextMenu

protected void fillContextMenu(org.eclipse.jface.action.IMenuManager contextMenuManager)
Fill the view context menu.

Parameters:
manager -

setFocus

public void setFocus()
Specified by:
setFocus in interface org.eclipse.ui.IWorkbenchPart
Specified by:
setFocus in class org.eclipse.ui.part.WorkbenchPart

dispose

public void dispose()
Specified by:
dispose in interface org.eclipse.ui.IWorkbenchPart
Overrides:
dispose in class org.eclipse.ui.part.WorkbenchPart