public interface ISourceManipulation
Modifier and Type | Method and Description |
---|---|
void |
copy(IJavaElement container,
IJavaElement sibling,
String rename,
boolean replace,
IProgressMonitor monitor)
Copies this element to the given container.
|
void |
delete(boolean force,
IProgressMonitor monitor)
Deletes this element, forcing if specified and necessary.
|
void |
move(IJavaElement container,
IJavaElement sibling,
String rename,
boolean replace,
IProgressMonitor monitor)
Moves this element to the given container.
|
void |
rename(String name,
boolean replace,
IProgressMonitor monitor)
Renames this element to the given name.
|
void copy(IJavaElement container, IJavaElement sibling, String rename, boolean replace, IProgressMonitor monitor) throws JavaModelException
container
- the containersibling
- the sibling element before which the copy should be inserted,
or null
if the copy should be inserted as the last child of
the containerrename
- the new name for the element, or null
if the copy
retains the name of this elementreplace
- true
if any existing child in the container with
the target name should be replaced, and false
to throw an
exception in the event of a name collisionmonitor
- a progress monitorJavaModelException
- if this element could not be copied. Reasons include:
CoreException
occurred while updating an underlying resource
replace
has been specified as false
IllegalArgumentException
- if container is null
IJavaModelStatusConstants.INVALID_DESTINATION
void delete(boolean force, IProgressMonitor monitor) throws JavaModelException
force
- a flag controlling whether underlying resources that are not
in sync with the local file system will be tolerated (same as the force flag
in IResource operations).monitor
- a progress monitorJavaModelException
- if this element could not be deleted. Reasons include:
CoreException
occurred while updating an underlying resource (CORE_EXCEPTION)void move(IJavaElement container, IJavaElement sibling, String rename, boolean replace, IProgressMonitor monitor) throws JavaModelException
container
- the containersibling
- the sibling element before which the element should be inserted,
or null
if the element should be inserted as the last child of
the containerrename
- the new name for the element, or null
if the
element retains its namereplace
- true
if any existing child in the container with
the target name should be replaced, and false
to throw an
exception in the event of a name collisionmonitor
- a progress monitorJavaModelException
- if this element could not be moved. Reasons include:
CoreException
occurred while updating an underlying resource
replace
has been specified as false
IllegalArgumentException
- if container is null
IJavaModelStatusConstants.INVALID_DESTINATION
void rename(String name, boolean replace, IProgressMonitor monitor) throws JavaModelException
name
- the new name for the elementreplace
- true
if any existing element with the target name
should be replaced, and false
to throw an exception in the
event of a name collisionmonitor
- a progress monitorJavaModelException
- if this element could not be renamed. Reasons include:
CoreException
occurred while updating an underlying resource
replace
has been specified as false
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.