# com.bea.ide.sourceeditor.compiler
TwoWayEdit.AddChild Class

public static class TwoWayEdit.AddChild
extends `TwoWayEdit`

A TwoWayEdit representing the addition of a child to a source element. This type should not be used directly. `ISourceElement.requestAddChild``` should be used to perform these two-way edit operations.

Hierarchy
  `Object`
  `TwoWayEdit`
  `TwoWayEdit.AddChild`

Enclosing class
  `TwoWayEdit`

## Nested Class Summary

Nested classes from com.bea.ide.sourceeditor.compiler`.`TwoWayEdit``
``TwoWayEdit.AddChild`, `TwoWayEdit.ChangeProperty`, `TwoWayEdit.RemoveChild``

## Field Summary

`protected int` | `_index` The index at which this child will be added

Fields from com.bea.ide.sourceeditor.compiler`.`TwoWayEdit``
``_data`, `_elemSource``

## Constructor Summary

TwoWayEdit.AddChild(`ISourceElement` elemParent, `ISourceElement` elemChild, int index) Creates a new AddChild object.
TwoWayEdit.AddChild(`ISourceElement` elemParent, `ISourceElement` elemChild) Creates a new AddChild object.

## Method Summary

`public boolean` | `doEdit`(`IStructureFeature` feature)

Methods from `com.bea.ide.sourceeditor.compiler.`TwoWayEdit``
``fire``

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

## Field Detail

### _index

    protected int _index

  The index at which this child will be added. -1 indicates that the child position should be determined by the compiler.

## Constructor Detail

### TwoWayEdit.AddChild

    public TwoWayEdit.AddChild(ISourceElement elemParent,
                               ISourceElement elemChild,
                               int index)

  Creates a new AddChild object.

### TwoWayEdit.AddChild

    public TwoWayEdit.AddChild(ISourceElement elemParent,
                               ISourceElement elemChild)

  Creates a new AddChild object.

## Method Detail

### doEdit(IStructureFeature) Method

    public boolean doEdit(IStructureFeature feature)

Overrides
  `TwoWayEdit.doEdit(IStructureFeature)`

#### Parameters

feature
  The IStructureFeature for the document that owns the source elements to be affected by the two-way edit.