public interface ISourceManipulation
Modifier and Type | Method and Description |
---|---|
void |
copy(ICElement container,
ICElement sibling,
java.lang.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(ICElement container,
ICElement sibling,
java.lang.String rename,
boolean replace,
IProgressMonitor monitor)
Moves this element to the given container.
|
void |
rename(java.lang.String name,
boolean replace,
IProgressMonitor monitor)
Renames this element to the given name.
|
void copy(ICElement container, ICElement sibling, java.lang.String rename, boolean replace, IProgressMonitor monitor) throws CModelException
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 monitorCModelException
- if this element could not be copied. Reasons include:
CoreException
occurred while updating an underlying resource
replace
has been specified as false
java.lang.IllegalArgumentException
- if container is null
void delete(boolean force, IProgressMonitor monitor) throws CModelException
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 monitorCModelException
- if this element could not be deleted. Reasons include:
CoreException
occurred while updating an underlying resource (CORE_EXCEPTION)void move(ICElement container, ICElement sibling, java.lang.String rename, boolean replace, IProgressMonitor monitor) throws CModelException
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 monitorCModelException
- if this element could not be moved. Reasons include:
CoreException
occurred while updating an underlying resource
replace
has been specified as false
java.lang.IllegalArgumentException
- if container is null
void rename(java.lang.String name, boolean replace, IProgressMonitor monitor) throws CModelException
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 monitorCModelException
- if this element could not be renamed. Reasons include:
CoreException
occurred while updating an underlying resource
replace
has been specified as false
Copyright (c) IBM Corp. and others 2004, 2014. All Rights Reserved.