2 * (c) Copyright IBM Corp. 2000, 2001.
5 package net.sourceforge.phpdt.internal.corext.textmanipulation;
7 import org.eclipse.core.runtime.CoreException;
10 * A text edit that does nothing. A <code>NopTextEdit</code> can be used to track
11 * positions when executing <code>TextEdits</code> associated with a <code>
12 * TextBufferEditor</code>.
14 public class NopTextEdit extends TextEdit {
16 private TextRange fTextRange;
19 * Creates a new <code>NopTextEdit</code> for the given
22 * @param offset the starting offset this text edit is "working on"
23 * @param length the length this text edit is "working on"
25 public NopTextEdit(int offset, int length) {
26 this(new TextRange(offset, length));
30 * Creates a new <code>NopTextEdit</code> for the given
33 * @param range the <code>TextRange</code> this text edit is "working on"
35 public NopTextEdit(TextRange range) {
40 * @see TextEdit#getTextRange
42 public TextRange getTextRange() {
47 * @see TextEdit#perform
49 public TextEdit perform(TextBuffer buffer) throws CoreException {
50 return new NopTextEdit(fTextRange);
54 * @see TextEdit#perform
56 public TextEdit copy() {
57 return new NopTextEdit(fTextRange.copy());