KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > core > MoveResourceElementsOperation


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.internal.core;
12
13 import org.eclipse.jdt.core.IJavaElement;
14 import org.eclipse.jdt.internal.core.util.Messages;
15
16 /**
17  * This operation moves resources (package fragments and compilation units) from their current
18  * container to a specified destination container, optionally renaming the
19  * elements.
20  * A move resource operation is equivalent to a copy resource operation, where
21  * the source resources are deleted after the copy.
22  * <p>This operation can be used for reorganizing resources within the same container.
23  *
24  * @see CopyResourceElementsOperation
25  */

26 public class MoveResourceElementsOperation extends CopyResourceElementsOperation {
27 /**
28  * When executed, this operation will move the given elements to the given containers.
29  */

30 public MoveResourceElementsOperation(IJavaElement[] elementsToMove, IJavaElement[] destContainers, boolean force) {
31     super(elementsToMove, destContainers, force);
32 }
33 /**
34  * @see MultiOperation
35  */

36 protected String JavaDoc getMainTaskName() {
37     return Messages.operation_moveResourceProgress;
38 }
39 /**
40  * @see CopyResourceElementsOperation#isMove()
41  */

42 protected boolean isMove() {
43     return true;
44 }
45 }
46
Popular Tags