2 * (c) Copyright IBM Corp. 2000, 2001.
5 package net.sourceforge.phpdt.internal.corext.textmanipulation;
9 * A <code>SwapTextEdit</code> exchanges to text ranges.
11 public class SwapTextEdit extends MultiTextEdit {
13 * Create a new <code>SwapTextEdit</code>
15 * @param offset1 the offset of the first text range
16 * @param length1 the length of the first text range
17 * @param offset2 the offset of the second text range
18 * @param length2 the length of the second text range
20 public SwapTextEdit(int offset1, int length1, int offset2, int length2) {
21 add(new MoveTextEdit(offset1, length1, offset2));
22 add(new MoveTextEdit(offset2, length2, offset1));