de.cau.cs.kieler.synccharts.diagram.custom.commands
Class ReInitSyncchartsDiagramCommand

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.core.commands.AbstractHandler
          extended by de.cau.cs.kieler.core.ui.commands.ReInitDiagramCommand
              extended by de.cau.cs.kieler.synccharts.diagram.custom.commands.ReInitSyncchartsDiagramCommand
All Implemented Interfaces:
IHandler, IHandler2

public class ReInitSyncchartsDiagramCommand
extends ReInitDiagramCommand

A command that reinitializes a diagram file from a given kixs file.

Rating proposed yellow
(2010-03-01)

Constructor Summary
ReInitSyncchartsDiagramCommand()
           
 
Method Summary
 boolean createNewDiagram(EObject diagramRoot, TransactionalEditingDomain editingDomain, IFile diagramFile)
          Create a new diagram file from the given semantics model.
protected  String getDiagramExtension()
          Provides the file extension for the diagram file.
protected  String getModelExtension()
          Provides the file extension for the model file.
protected  void performPostOperationAction(IFile path, List<IFile> partners)
          Perform actions after the reinit.
 
Methods inherited from class de.cau.cs.kieler.core.ui.commands.ReInitDiagramCommand
execute, performPreOperationActions, refreshWorkspace, reinitialize, reinitializeDiagram, setEnabled
 
Methods inherited from class org.eclipse.core.commands.AbstractHandler
addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled
 
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
 

Constructor Detail

ReInitSyncchartsDiagramCommand

public ReInitSyncchartsDiagramCommand()
Method Detail

performPostOperationAction

protected void performPostOperationAction(IFile path,
                                          List<IFile> partners)
Perform actions after the reinit. In this case an auto layout on the currenly active diagram.

Overrides:
performPostOperationAction in class ReInitDiagramCommand
Parameters:
path - the file
partners - the partner files

createNewDiagram

public boolean createNewDiagram(EObject diagramRoot,
                                TransactionalEditingDomain editingDomain,
                                IFile diagramFile)
Create a new diagram file from the given semantics model. This code is taken directly from the synccharts.diagram plugin.

Specified by:
createNewDiagram in class ReInitDiagramCommand
Parameters:
diagramRoot - the root element.
editingDomain - the editing domain.
diagramFile - the destination file
Returns:
true if the creation was successful

getDiagramExtension

protected String getDiagramExtension()
Provides the file extension for the diagram file.

Specified by:
getDiagramExtension in class ReInitDiagramCommand
Returns:
the file extension

getModelExtension

protected String getModelExtension()
Provides the file extension for the model file.

Specified by:
getModelExtension in class ReInitDiagramCommand
Returns:
the file extension