@API(type=NOT_EXTENDABLE, src=PUBLIC) public interface WSEditorBase extends TransformationScenarioInvoker
Modifier and Type | Method and Description |
---|---|
boolean |
close(boolean askForSave)
Closes the current editor.
|
java.io.InputStream |
createContentInputStream()
Create a properly encoded input stream reader over the whole editor's content (exactly the XML content which gets saved on disk).
|
java.io.Reader |
createContentReader()
Create a reader over the whole editor's content (exactly the XML content which gets saved on disk).
|
java.net.URL |
getEditorLocation()
Get the
URL representing the editor location. |
boolean |
isModified()
This method can be used to determine if the document from the editor contains unsaved modifications.
|
boolean |
isNewDocument()
This method can be used to determine if the document from the editor was ever saved.
|
void |
reloadContent(java.io.Reader reader)
Update the whole content of the editor with the one taken from the reader.
|
void |
reloadContent(java.io.Reader reader,
boolean discardUndoableEdits)
Update the whole content of the editor with the one taken from the reader.
|
void |
save()
Saves the editor content.
|
void |
saveAs(java.net.URL location)
Saves the editor content to a new location.
|
void |
setEditorTabText(java.lang.String tabText)
Set the text which appears on the editor's tab, by default it is the loaded file name.
|
void |
setEditorTabTooltipText(java.lang.String tabTooltip)
Set the tooltip text for the editor's tab, by default it is the loaded file path.
|
void |
setModified(boolean modified)
Set the modified status of the editor document.
|
runTransformationScenarios
java.net.URL getEditorLocation()
URL
representing the editor location.null
.void save()
void saveAs(java.net.URL location)
location
- The new editor location.boolean close(boolean askForSave)
If the editor has unsaved content and askForSave
is
true
, the user will be given the opportunity to save it.
askForSave
- true
to save the editor contents if required,
and false
to discard any unsaved changes.true
if the editor was successfully closed, and
false
if the editor is still openboolean isModified()
true
if the document in the current editor contains unsaved modifications.void setModified(boolean modified)
modified
- true
if the document in the current editor contains unsaved modifications.boolean isNewDocument()
true
if the document in the current editor is new.java.io.Reader createContentReader()
null
.for the processing instruction names
java.io.InputStream createContentInputStream() throws java.io.IOException
null
.java.io.IOException
Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.
for the processing instruction names
void reloadContent(java.io.Reader reader)
reader
- The reader provided by the extension.void reloadContent(java.io.Reader reader, boolean discardUndoableEdits)
false
in which case you will be able to UNDO the editor
to the content prior to the reload.reader
- The reader provided by the extension.discardUndoableEdits
- true
to lose undo history.void setEditorTabText(java.lang.String tabText)
tabText
- the text which appears on the editor's tab, by default it is the loaded file name.
NULL to reset the tab title to the default value (the loaded file name).void setEditorTabTooltipText(java.lang.String tabTooltip)
tabTooltip
- the tooltip for the editor's tab, by default it is the loaded file path.
NULL to reset the tab tooltip to the default value (the loaded file path).© Copyright SyncRO Soft SRL 2002 - 2014. All rights reserved.