|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.commands.common.EventManager
org.eclipse.core.commands.AbstractHandler
de.cau.cs.kieler.core.ui.commands.ReInitDiagramCommand
public abstract class ReInitDiagramCommand
A command that reinitializes a diagram file from a given model file.
Constructor Summary | |
---|---|
ReInitDiagramCommand()
|
Method Summary | |
---|---|
abstract boolean |
createNewDiagram(EObject diagramRoot,
TransactionalEditingDomain editingDomain,
IFile diagramPath)
Create a new diagram file from the given semantics model. |
Object |
execute(ExecutionEvent event)
|
protected abstract String |
getDiagramExtension()
Provides the file extension for the diagram file. |
protected abstract String |
getModelExtension()
Provides the file extension for the model file. |
protected void |
performPostOperationAction(IFile path,
List<IFile> partners)
Perform actions after the reinit. |
protected void |
performPreOperationActions(IFile path,
List<IFile> partners)
Perform actions prior to the reinit. |
protected void |
refreshWorkspace()
Refresh the workspace. |
void |
reinitialize(IFile path)
Reinitialize the diagram file. |
void |
reinitializeDiagram(IFile modelPath,
IFile diagramPath)
Reinitialize the diagram from a given model file. |
void |
setEnabled(Object evaluationContext)
Checks whether the selection consists of edit parts in files with the model extension or files with the model extension. |
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 |
---|
public ReInitDiagramCommand()
Method Detail |
---|
protected abstract String getDiagramExtension()
protected abstract String getModelExtension()
public void setEnabled(Object evaluationContext)
setEnabled
in interface IHandler2
setEnabled
in class AbstractHandler
evaluationContext
- the evaluation contextpublic Object execute(ExecutionEvent event) throws ExecutionException
ExecutionException
protected void refreshWorkspace()
public void reinitialize(IFile path)
path
- the path of the model fileprotected void performPostOperationAction(IFile path, List<IFile> partners)
path
- the filepartners
- the partner filesprotected void performPreOperationActions(IFile path, List<IFile> partners)
path
- the filepartners
- the partner filespublic void reinitializeDiagram(IFile modelPath, IFile diagramPath)
modelPath
- the source file.diagramPath
- the destination file.public abstract boolean createNewDiagram(EObject diagramRoot, TransactionalEditingDomain editingDomain, IFile diagramPath)
diagramRoot
- the root element.editingDomain
- the editing domain.diagramPath
- the destination file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |