first version of 'Code Assist" template engine
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / corext / textmanipulation / SwapTextEdit.java
1 /*
2  * (c) Copyright IBM Corp. 2000, 2001.
3  * All Rights Reserved.
4  */
5 package net.sourceforge.phpdt.internal.corext.textmanipulation;
6
7
8 /**
9  * A <code>SwapTextEdit</code> exchanges to text ranges.
10  */
11 public class SwapTextEdit extends MultiTextEdit {
12         /**
13          * Create a new <code>SwapTextEdit</code>
14          * 
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
19          */
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));
23         }
24 }
25