public interface IMDATextEditor
Each editor can be set to read-only mode.
Modifier and Type | Method and Description |
---|---|
ModelElement |
getElement()
Get the element corresponding to this editor.
|
java.io.File |
getFile()
Get the file opened in the editor.
|
EditorType |
getType()
Get the editor's type.
|
boolean |
isDirty()
Indicates whether of not the editor's content has been modified.
It matches the presence of the little '*' in the editor's header. |
void |
reload()
Reload the content of the editor from the corresponding file.
|
void |
save()
Save the content of the editor.
Triggers IMDAEditorListener.documentSaved(IMDATextEditor, ModelElement, File) on the current listener. |
void |
setCharsetName(java.lang.String charsetName)
Change current charset on the editor.
|
void |
setListener(IMDAEditorListener listener)
Set the listener who will be notified when a 'save' or 'close' event occurs.
|
void |
setReadonlyMode(boolean readOnly)
Change the editor's editon mode.
A read only editor can't be modified. |
java.io.File getFile()
void save()
void reload()
boolean isDirty()
true
if the content of the editor has been modified.void setReadonlyMode(boolean readOnly)
readOnly
- true
if the editor is read only.void setListener(IMDAEditorListener listener)
listener
- The listener to attach to the editor.IMDAEditorListener
EditorType getType()
ModelElement getElement()
void setCharsetName(java.lang.String charsetName)