de.cau.cs.kieler.synccharts.diagram.custom.handlers
Class ReInitDiagramCommand

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

public class ReInitDiagramCommand
extends AbstractHandler

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

Rating proposed yellow
(2010-03-01)

Nested Class Summary
 class ReInitDiagramCommand.WaitUntilDoneMonitor
          A monitor that blocks the calling thread until the monitored thread is done.
 
Constructor Summary
ReInitDiagramCommand()
           
 
Method Summary
 boolean createNewDiagram(EObject diagramRoot, TransactionalEditingDomain editingDomain, IPath kidsPath)
          Create a new diagram file from the given semantics model.
 Object execute(ExecutionEvent event)
          
 void setEnabled(Object evaluationContext)
          
 
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

ReInitDiagramCommand

public ReInitDiagramCommand()
Method Detail

setEnabled

public void setEnabled(Object evaluationContext)

Specified by:
setEnabled in interface IHandler2
Overrides:
setEnabled in class AbstractHandler

execute

public Object execute(ExecutionEvent event)
               throws ExecutionException

Throws:
ExecutionException

createNewDiagram

public boolean createNewDiagram(EObject diagramRoot,
                                TransactionalEditingDomain editingDomain,
                                IPath kidsPath)
Create a new diagram file from the given semantics model.

Parameters:
diagramRoot - the root element.
editingDomain - the editing domain.
kidsPath - the destination file
Returns:
true if the creation was successful