Package org.eclipse.text.edits
Class TextEditGroup
java.lang.Object
org.eclipse.text.edits.TextEditGroup
- Direct Known Subclasses:
- CategorizedTextEditGroup
A text edit group combines a list of 
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.
- Since:
- 3.0
- 
Constructor SummaryConstructorsConstructorDescriptionTextEditGroup(String name) Creates a new text edit group with the given name.TextEditGroup(String name, TextEdit edit) Creates a new text edit group with a name and a singleTextEdit.TextEditGroup(String name, TextEdit[] edits) Creates a new text edit group with the given name and array of edits.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddTextEdit(TextEdit edit) Adds the givenTextEditto this group.voidRemoves all text edits from this group.getName()Returns the edit group's name.Returns the text region covered by the edits managed via this edit group.TextEdit[]Returns an array ofTextEdits containing the edits managed by this group.booleanisEmpty()booleanremoveTextEdit(TextEdit edit) Removes the givenTextEditfrom this group.
- 
Constructor Details- 
TextEditGroupCreates a new text edit group with the given name.- Parameters:
- name- the name of the text edit group. Must be a human readable string
 
- 
TextEditGroupCreates a new text edit group with a name and a singleTextEdit.- Parameters:
- name- the name of the text edit group. Must be a human readable string
- edit- the edit to manage
 
- 
TextEditGroupCreates a new text edit group with the given name and array of edits.- Parameters:
- name- the name of the text edit group. Must be a human readable string
- edits- the array of edits
 
 
- 
- 
Method Details- 
getNameReturns the edit group's name.- Returns:
- the edit group's name
 
- 
addTextEditAdds the givenTextEditto this group.- Parameters:
- edit- the edit to add
 
- 
removeTextEditRemoves the givenTextEditfrom this group.- Parameters:
- edit- the edit to remove
- Returns:
- trueif this group contained the specified edit.
- Since:
- 3.3
 
- 
clearTextEditspublic void clearTextEdits()Removes all text edits from this group.- Since:
- 3.3
 
- 
isEmptypublic boolean isEmpty()- Returns:
- whether the list of managed text edits is empty or not
 
- 
getTextEditsReturns an array ofTextEdits containing the edits managed by this group.- Returns:
- the managed text edits
 
- 
getRegionReturns the text region covered by the edits managed via this edit group. If the group doesn't manage any editsnullis returned.- Returns:
- the text region covered by this edit group or nullif no edits are managed
 
 
-