org.eclipse.weaver.editors
Class GlobalWeaverEditor

java.lang.Object
  extended byMultiPageEditorPart
      extended byorg.eclipse.weaver.editors.GlobalWeaverEditor

public class GlobalWeaverEditor
extends MultiPageEditorPart

This class is the editor of the model weaver

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

Constructor Summary
GlobalWeaverEditor()
          This creates a weaver editor
 
Method Summary
 void addSelectionChangedListener(ISelectionChangedListener listener)
           
 AdapterFactoryEditingDomain createEditingDomain(ComposedAdapterFactory factory)
          Creates the editing domain.
protected  void createPages()
          Creates the page of the editor.
 void dispose()
          The MultiPageEditorPart implementation of this IWorkbenchPart method disposes all nested editors.
 void doSave(IProgressMonitor progressMonitor)
           
 void doSaveAs()
           
protected  void doSaveAs(URI uri, IEditorInput editorInput)
          Saves the input (resource) with this uri
 void firePropertyChange(int propertyId)
           
 GlobalWeaverEditorContributor getActionBarContributor()
          Returns the action bar contribuor (for global editor part)
 IActionBars getActionBars()
          Returns the actions bars (for global editor part)
 java.lang.Object getAdapter(java.lang.Class key)
           
 ComposedAdapterFactory getAdapterFactory()
          Returns the adapterFactory
 java.io.File getConfigFile(IFile file)
          get the config file (% input editor file)
 PropertySheetPage getCreatePropertySheetPage()
          Creates a new property sheet page
 EditingDomain getEditingDomain()
           
 GlobalWeaverEditor getGlobalWeaverEditor()
          Returns this instance of GlobalWeaverEditor
 WeaverModelManager getModelManager()
          Returns the model manager
 ISelection getSelection()
           
 IWeavingPanel getWeaverEditorPanel()
           
 java.util.List getWeaverModelPanels()
           
 WeaverXMLMetadata getXmlFile()
           
protected  void hideTabs()
          If there is just one page in the multi-page editor part, this hides the single tab at the bottom.
 void init(IEditorSite site, IEditorInput editorInput)
          The MultiPageEditorExample implementation of this method checks that the input is an instance of IFileEditorInput.
 boolean isDirty()
           
 boolean isSaveAsAllowed()
           
protected  void refreshState()
          Refreshs the necessary state
 void removeSelectionChangedListener(ISelectionChangedListener listener)
           
protected  void saveResource()
          Saves the editing domain resource (weaving model)
 void setFocus()
           
 void setSelection(ISelection selection)
           
 void updateXMLConfigFile(IFile file)
          Updates the xml config file (metadata properties file)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalWeaverEditor

public GlobalWeaverEditor()
This creates a weaver editor

Method Detail

createPages

protected void createPages()
Creates the page of the editor.


hideTabs

protected void hideTabs()
If there is just one page in the multi-page editor part, this hides the single tab at the bottom.


createEditingDomain

public AdapterFactoryEditingDomain createEditingDomain(ComposedAdapterFactory factory)
Creates the editing domain. Its is responsible for the command stack and creation of new objects

Parameters:
factory -
Returns:
the editing domain

init

public void init(IEditorSite site,
                 IEditorInput editorInput)
          throws PartInitException
The MultiPageEditorExample implementation of this method checks that the input is an instance of IFileEditorInput.

Throws:
PartInitException

getConfigFile

public java.io.File getConfigFile(IFile file)
get the config file (% input editor file)

Parameters:
file - the editor input file

updateXMLConfigFile

public void updateXMLConfigFile(IFile file)
                         throws WeaverException
Updates the xml config file (metadata properties file)

Parameters:
file - the config file
Throws:
WeaverException

dispose

public void dispose()
The MultiPageEditorPart implementation of this IWorkbenchPart method disposes all nested editors. Subclasses may extend.


isDirty

public boolean isDirty()

isSaveAsAllowed

public boolean isSaveAsAllowed()

saveResource

protected void saveResource()
Saves the editing domain resource (weaving model)


refreshState

protected void refreshState()
Refreshs the necessary state


doSave

public void doSave(IProgressMonitor progressMonitor)

doSaveAs

public void doSaveAs()

doSaveAs

protected void doSaveAs(URI uri,
                        IEditorInput editorInput)
Saves the input (resource) with this uri

Parameters:
uri -
editorInput -

setFocus

public void setFocus()

getAdapter

public java.lang.Object getAdapter(java.lang.Class key)

firePropertyChange

public void firePropertyChange(int propertyId)

getCreatePropertySheetPage

public PropertySheetPage getCreatePropertySheetPage()
Creates a new property sheet page

Returns:
the property sheet page

getGlobalWeaverEditor

public GlobalWeaverEditor getGlobalWeaverEditor()
Returns this instance of GlobalWeaverEditor

Returns:

getActionBarContributor

public GlobalWeaverEditorContributor getActionBarContributor()
Returns the action bar contribuor (for global editor part)

Returns:

getActionBars

public IActionBars getActionBars()
Returns the actions bars (for global editor part)

Returns:

getEditingDomain

public EditingDomain getEditingDomain()

addSelectionChangedListener

public void addSelectionChangedListener(ISelectionChangedListener listener)

getSelection

public ISelection getSelection()

removeSelectionChangedListener

public void removeSelectionChangedListener(ISelectionChangedListener listener)

setSelection

public void setSelection(ISelection selection)

getModelManager

public WeaverModelManager getModelManager()
Returns the model manager

Returns:

getAdapterFactory

public ComposedAdapterFactory getAdapterFactory()
Returns the adapterFactory

Returns:

getWeaverEditorPanel

public IWeavingPanel getWeaverEditorPanel()
Returns:
Returns the weaverEditorPanel.

getWeaverModelPanels

public java.util.List getWeaverModelPanels()
Returns:
Returns the weaverModelPanels.

getXmlFile

public WeaverXMLMetadata getXmlFile()
Returns:
Returns the xmlFile.