public interface ISourceManipulation
This interface is not intended to be implemented by clients.
Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.Modifier and Type | Method and Description |
---|---|
void |
copy(IJavaScriptElement container,
IJavaScriptElement 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(IJavaScriptElement container,
IJavaScriptElement 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(IJavaScriptElement container, IJavaScriptElement sibling, java.lang.String rename, boolean replace, IProgressMonitor monitor) throws JavaScriptModelException
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 monitorJavaScriptModelException
- 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 JavaScriptModelException
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 monitorJavaScriptModelException
- if this element could not be deleted. Reasons include:
CoreException
occurred while updating an underlying resource (CORE_EXCEPTION)void move(IJavaScriptElement container, IJavaScriptElement sibling, java.lang.String rename, boolean replace, IProgressMonitor monitor) throws JavaScriptModelException
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 monitorJavaScriptModelException
- 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 JavaScriptModelException
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 monitorJavaScriptModelException
- 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 2000, 2010. All Rights Reserved.