public class TextEditGroup extends Object
TextEdit
s
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(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 single
TextEdit . |
TextEditGroup(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.
|
String |
getName()
Returns the edit group's name.
|
IRegion |
getRegion()
Returns the text region covered by the edits managed via this
edit group.
|
TextEdit[] |
getTextEdits()
Returns an array of
TextEdit s containing
the edits managed by this group. |
boolean |
isEmpty()
|
boolean |
removeTextEdit(TextEdit edit)
Removes the given
TextEdit from this group. |
public TextEditGroup(String name)
name
- the name of the text edit group. Must be
a human readable stringpublic TextEditGroup(String name, TextEdit edit)
TextEdit
.name
- the name of the text edit group. Must be
a human readable stringedit
- the edit to managepublic 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()
TextEdit
s containing
the edits managed by this group.public IRegion getRegion()
null
is returned.
null
if no edits are managed
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.