|
||||||||||
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.model.handlers.AbstractInitDiagramHandler
public abstract class AbstractInitDiagramHandler
A command handler that reinitializes a diagram file from a given model file.
Constructor Summary | |
---|---|
AbstractInitDiagramHandler()
|
Method Summary | |
---|---|
protected abstract TransactionalEditingDomain |
createEditingDomain()
Create a new transactional editing domain. |
abstract IEditorPart |
createNewDiagram(EObject modelRoot,
TransactionalEditingDomain editingDomain,
IFile diagramPath,
IProgressMonitor monitor)
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. |
IEditorPart |
initializeDiagram(IFile modelFile,
IFile diagramFile,
IProgressMonitor monitor)
Initialize a diagram file from a given model file. |
protected IEditorPart |
openDiagram(Resource diagramResource,
String editorId)
Utility method for opening an editor on the resource. |
protected void |
performPostOperationAction(IFile path,
List<IFile> partners,
IProgressMonitor monitor,
IEditorPart newEditor)
Perform actions after the reinitialization. |
protected void |
performPreOperationActions(IFile path,
List<IFile> partners,
IProgressMonitor monitor)
Perform actions prior to the reinitialization. |
protected void |
refreshWorkspace()
Refresh the workspace. |
void |
reinitialize(IFile file)
Reinitialize the diagram file. |
Methods inherited from class org.eclipse.core.commands.AbstractHandler |
---|
addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled, setEnabled |
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 AbstractInitDiagramHandler()
Method Detail |
---|
protected abstract String getDiagramExtension()
public Object execute(ExecutionEvent event) throws ExecutionException
ExecutionException
protected void refreshWorkspace()
public void reinitialize(IFile file)
file
- the model fileprotected void performPostOperationAction(IFile path, List<IFile> partners, IProgressMonitor monitor, IEditorPart newEditor)
path
- the filepartners
- the partner filesmonitor
- the progress monitornewEditor
- the newly opened editorprotected void performPreOperationActions(IFile path, List<IFile> partners, IProgressMonitor monitor)
path
- the filepartners
- the affected partner filesmonitor
- the progress monitorpublic IEditorPart initializeDiagram(IFile modelFile, IFile diagramFile, IProgressMonitor monitor)
modelFile
- the source file.diagramFile
- the destination file.monitor
- the progress monitor
protected abstract TransactionalEditingDomain createEditingDomain()
GMFEditingDomainFactory.INSTANCE.createEditingDomain()
public abstract IEditorPart createNewDiagram(EObject modelRoot, TransactionalEditingDomain editingDomain, IFile diagramPath, IProgressMonitor monitor)
modelRoot
- the root element of the domain model.editingDomain
- the editing domain.diagramPath
- the destination filemonitor
- the progress monitor
protected IEditorPart openDiagram(Resource diagramResource, String editorId) throws PartInitException
diagramResource
- the resourceeditorId
- the editor id
PartInitException
- if the editor was not opened
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |