3m9 compatible;
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / core / MoveElementsOperation.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package net.sourceforge.phpdt.internal.core;
12
13 import net.sourceforge.phpdt.core.IJavaElement;
14 import net.sourceforge.phpdt.internal.core.util.Util;
15
16 /**
17  * This operation moves elements from their current
18  * container to a specified destination container, optionally renaming the
19  * elements.
20  * A move operation is equivalent to a copy operation, where
21  * the source elements are deleted after the copy.
22  * <p>This operation can be used for reorganizing elements within the same container.
23  *
24  * @see CopyElementsOperation
25  */
26 public class MoveElementsOperation extends CopyElementsOperation {
27 /**
28  * When executed, this operation will move the given elements to the given containers.
29  */
30 public MoveElementsOperation(IJavaElement[] elementsToMove, IJavaElement[] destContainers, boolean force) {
31         super(elementsToMove, destContainers, force);
32 }
33 /**
34  * Returns the <code>String</code> to use as the main task name
35  * for progress monitoring.
36  */
37 protected String getMainTaskName() {
38         return Util.bind("operation.moveElementProgress"); //$NON-NLS-1$
39 }
40 /**
41  * @see CopyElementsOperation#isMove()
42  */
43 protected boolean isMove() {
44         return true;
45 }
46 }