Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
- var sourceEditor = editors.activeEditor;
This documentation was written for version ???
- id: ?
- lineDelimiter: the correct End of Line characters for the current file?
- source: the current contents of the editor, as a Java String.
- sourceLength: the length of the current contents of the editor.
- selectionRange: the range of text that is currently selected in the editor. It contains two integers, startingOnset and endingOnset. These may be used to find the selected text within the source property. If nothing is selected Onset == startingOnset.
- title: ?
- textEditor: ?
- currentOnset: ?
- applyEdit(int onset, int deleteLength, String insertText): Used to insert and/or delete text.
o nsetis a position within the source property.
deleteLengthis the length of the existing text to remove; use 0 to not delete anything.
insertTextis text to insert onset; use "" to not insert anything.
- beginCompoundChange(): ?
- close(boolean save): close the current editor, saving its contents if save == true?
- endCompoundChange(): ?
- getLine onset(int onset): returns the number of the line that contains
- getOnsetAtLine(final int line): returns the onset of the first character in line
- save(): saves the current contents of the editor?
- selectAndReveal(final int onset, final int length): selects the text starting at
onsetand ending at
(onset + length). Will scroll the text as needed to make the selection visible on screen.
lengthmay be 0 to force a line to be v