package org.eclipse.jdt.core;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.runtime.IProgressMonitor;
/**
* Represent the root Java element corresponding to the workspace.
* Since there is only one such root element, it is commonly referred to as
* the Java model element.
* The Java model element needs to be opened before it can be navigated or manipulated.
* The Java model element has no parent (it is the root of the Java element
* hierarchy). Its children are IJavaProject
s.
*
* This interface provides methods for performing copy, move, rename, and * delete operations on multiple Java elements. *
*
* This interface is not intended to be implemented by clients. An instance
* of one of these handles can be created via
* JavaCore.create(workspace.getRoot())
.
*
* Optionally, each copy can positioned before a sibling
* element. If null
is specified for a given sibling, the copy
* is inserted as the last child of its associated container.
*
* Optionally, each copy can be renamed. If
* null
is specified for the new name, the copy
* is not renamed.
*
* Optionally, any existing child in the destination container with
* the same name can be replaced by specifying true
for
* force. Otherwise an exception is thrown in the event that a name
* collision occurs.
*
null
; or null
* @param renamings the list of new names any of which may be
* null
; or null
* @param replace true
if any existing child in a target container
* with the target name should be replaced, and false
to throw an
* exception in the event of a name collision
* @param monitor a progress monitor
* @exception JavaModelException if an element could not be copied. Reasons include:
* CoreException
occurred while updating an underlying resource
* INVALID_DESTINATION
)
* INVALID_SIBLING
)
* INVALID_NAME
)
* replace
has been specified as false
(NAME_COLLISION
)
* READ_ONLY
)
* CoreException
occurred while updating an underlying resource
* READ_ONLY
)
*
* Optionally, each element can positioned before a sibling
* element. If null
is specified for sibling, the element
* is inserted as the last child of its associated container.
*
* Optionally, each element can be renamed. If
* null
is specified for the new name, the element
* is not renamed.
*
* Optionally, any existing child in the destination container with
* the same name can be replaced by specifying true
for
* force. Otherwise an exception is thrown in the event that a name
* collision occurs.
*
null
; or null
* @param renamings the list of new names any of which may be
* null
; or null
* @param replace true
if any existing child in a target container
* with the target name should be replaced, and false
to throw an
* exception in the event of a name collision
* @param monitor a progress monitor
* @exception JavaModelException if an element could not be moved. Reasons include:
* CoreException
occurred while updating an underlying resource
* INVALID_DESTINATION
)
* INVALID_SIBLING
)
* INVALID_NAME
)
* replace
has been specified as false
(NAME_COLLISION
)
* READ_ONLY
)
* null
*/
void move(IJavaElement[] elements, IJavaElement[] containers, IJavaElement[] siblings, String[] renamings, boolean replace, IProgressMonitor monitor) throws JavaModelException;
/**
* Renames the given elements as specified.
* If one container is specified, all elements are renamed within that
* container. If more than one container is specified, the number of
* elements and containers must match, and each element is renamed within
* its associated container.
*
* @param elements the elements to rename
* @param destinations the container, or list of containers
* @param names the list of new names
* @param replace true
if an existing child in a target container
* with the target name should be replaced, and false
to throw an
* exception in the event of a name collision
* @param monitor a progress monitor
* @exception JavaModelException if an element could not be renamed. Reasons include:
* CoreException
occurred while updating an underlying resource
* INVALID_NAME
)
* replace
has been specified as false
(NAME_COLLISION
)
* READ_ONLY
)
*