|
Eclipse JDT 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Common protocol for Java elements that support source code manipulations such as copy, move, rename, and delete.
This interface is not intended to be implemented by clients.
Method Summary | |
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. |
Method Detail |
public 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 monitor
JavaModelException
- 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
public 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 monitor
JavaModelException
- if this element could not be deleted. Reasons include:
CoreException
occurred while updating an underlying resource (CORE_EXCEPTION)public 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 monitor
JavaModelException
- 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
public 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 monitor
JavaModelException
- if this element could not be renamed. Reasons include:
CoreException
occurred while updating an underlying resource
replace
has been specified as false
|
Eclipse JDT 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |