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.compare
Interface IEditableContent

All Known Implementing Classes:
  DocumentRangeNode, ResourceNode

public interface IEditableContent

Common interface for objects with editable contents. Typically it is implemented by objects that also implement the `IStreamContentAccessor` interface.

Clients may implement this interface.

Note that implementing `IEditableContent` does not automatically mean that it is editable. An object is only editable if it implements `IEditableContent` and the `isEditable` method returns `true`.

See Also:
  `IStreamContentAccessor`

Method Summary
`boolean` | `isEditable()` Returns `true` if this object can be modified.
`ITypedElement` | `replace(ITypedElement child, ITypedElement other)` This method is called on a parent to add or remove a child, or to copy the contents of a child.
`void` | `setContent(byte[] newContent)` Replaces the current content with the given new bytes.

Method Detail

### isEditable

    public boolean isEditable()

  Returns `true` if this object can be modified. If it returns `false` the other methods of this API must not be called.

  Returns:
    `true` if this object can be modified

### setContent

    public void setContent(byte[] newContent)

  Replaces the current content with the given new bytes.

  Parameters:
    `newContent` - this new contents replaces the old contents

### replace

    public ITypedElement replace(ITypedElement child,
                                 ITypedElement other)

  This method is called on a parent to add or remove a child, or to copy the contents of a child. What to do is encoded in the two arguments as follows:

  add: | child == null | other != null
  remove: | child != null | other == null
  copy: | child != null | other != null

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.