public interface IEditionService
A text editor is bound to a model element and a file, and must have one of those types:
Each editor can be set to read-only mode.
IMDAEditorListener| Modifier and Type | Method and Description |
|---|---|
void |
activateEditor(IMDATextEditor editor)
Set the focus on a specific editor.
|
void |
closeEditor(IMDATextEditor editor)
Close the given text editor.
|
boolean |
createDocumentContent(IExternDocument doc)
Create a document content for the given document.
|
List<String> |
getSupportedMimeTypes()
Indicates which mime type are supported in the current instance of Modelio.
|
void |
openEditor(IAbstractDiagram diagram)
Open a diagram editor from an absract diagram.
|
void |
openEditor(IArtifact artifact)
Open an editor from an artifact.
|
void |
openEditor(IExternDocument document)
Open an editor from an extern document.
|
IMDATextEditor |
openEditor(IModelElement modelElement,
File file,
String editorTypeID,
boolean readonly)
Open a new text editor, making the correspondence between a model element and a file.
|
void closeEditor(IMDATextEditor editor)
editor - The text editor to close.IMDATextEditor openEditor(IModelElement modelElement, File file, String editorTypeID, boolean readonly)
modelElement - the model element to edit.file - the file to display in the editor.editorTypeID - the type of the editor to open.readonly - true if the editor is in read only mode.void activateEditor(IMDATextEditor editor)
editor - the editor to focus.void openEditor(IAbstractDiagram diagram)
diagram - the diagram to edit.void openEditor(IArtifact artifact)
artifact - the artifact to edit.void openEditor(IExternDocument document)
document - the extern document to edit.List<String> getSupportedMimeTypes()
boolean createDocumentContent(IExternDocument doc) throws IOException
A default content is found by 2 ways:
IExternDocumentType with the same MIME type.
role_name.mime_type.dat like file
role_name.dat like file.
doc - The document to initializetrue if the file was created, false if no default content could be found.IOException - in case of error trying to create the file.