public class TextEditGroup
extends java.lang.Object
TextEdits
and a name into a single object. The name must be a human
readable string use to present the text edit group in the
user interface.
Clients may extend this class to add extra information to a text edit group.
| Constructor and Description |
|---|
TextEditGroup(java.lang.String name)
Creates a new text edit group with the given name.
|
TextEditGroup(java.lang.String name,
TextEdit edit)
Creates a new text edit group with a name and a single
TextEdit. |
TextEditGroup(java.lang.String name,
TextEdit[] edits)
Creates a new text edit group with the given name and
array of edits.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTextEdit(TextEdit edit)
Adds the given
TextEdit to this group. |
void |
clearTextEdits()
Removes all text edits from this group.
|
java.lang.String |
getName()
Returns the edit group's name.
|
org.eclipse.jface.text.IRegion |
getRegion()
Returns the text region covered by the edits managed via this
edit group.
|
TextEdit[] |
getTextEdits()
Returns an array of
TextEdits containing
the edits managed by this group. |
boolean |
isEmpty()
|
boolean |
removeTextEdit(TextEdit edit)
Removes the given
TextEdit from this group. |
public TextEditGroup(java.lang.String name)
name - the name of the text edit group. Must be
a human readable stringpublic TextEditGroup(java.lang.String name,
TextEdit edit)
TextEdit.name - the name of the text edit group. Must be
a human readable stringedit - the edit to managepublic TextEditGroup(java.lang.String name,
TextEdit[] edits)
name - the name of the text edit group. Must be
a human readable stringedits - the array of editspublic java.lang.String getName()
public void addTextEdit(TextEdit edit)
TextEdit to this group.edit - the edit to addpublic boolean removeTextEdit(TextEdit edit)
TextEdit from this group.edit - the edit to removetrue if this group contained the specified edit.public void clearTextEdits()
public boolean isEmpty()
public TextEdit[] getTextEdits()
TextEdits containing
the edits managed by this group.public org.eclipse.jface.text.IRegion getRegion()
null
is returned.
null if no edits are managed