Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.text.edits
Class TextEditGroup

    java.lang.Object
      org.eclipse.text.edits.TextEditGroup

public class TextEditGroup
extends Object

A text edit group combines a list of `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.

Since:
  3.0

Constructor Summary
`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.

Method Summary
`void` | `addTextEdit(TextEdit edit)` Adds the given `TextEdit` to 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()` Returns `true` if the list of managed `TextEdit`s is empty; otherwise `false` is returned.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TextEditGroup

    public TextEditGroup(String name)

  Creates a new text edit group with the given name.

Parameters:
  `name` - the name of the text edit group. Must be a human readable string

### TextEditGroup

    public TextEditGroup(String name,
                         TextEdit edit)

  Creates a new text edit group with a name and a single `TextEdit`.

Parameters:
  `name` - the name of the text edit group. Must be a human readable string
  `edit` - the edit to manage

### TextEditGroup

    public TextEditGroup(String name,
                         TextEdit[] edits)

  Creates 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 Detail

### getName

    public String getName()

  Returns the edit group's name.

  Returns:
    the edit group's name

### addTextEdit

    public void addTextEdit(TextEdit edit)

  Adds the given `TextEdit` to this group.

  Parameters:
    `edit` - the edit to add

### isEmpty

    public boolean isEmpty()

  Returns `true` if the list of managed `TextEdit`s is empty; otherwise `false` is returned.

  Returns:
    whether the list of managed text edits is empty or not

### getTextEdits

    public TextEdit[] getTextEdits()

  Returns an array of `TextEdit`s containing the edits managed by this group.

  Returns:
    the managed text edits

### getRegion

    public IRegion getRegion()

  Returns the text region covered by the edits managed via this edit group. If the group doesn't manage any edits `null` is returned.

  Returns:
    the text region covered by this edit group or `null` if no edits are managed

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.