|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation
org.aspectj.org.eclipse.jdt.internal.core.CommitWorkingCopyOperation
public class CommitWorkingCopyOperation
Commits the contents of a working copy compilation unit to its original element and resource, bringing the Java Model up-to-date with the current contents of the working copy.
It is possible that the contents of the
original resource have changed since the working copy was created,
in which case there is an update conflict. This operation allows
for two settings to resolve conflict set by the fForce flag:
false - in this case an JavaModelException
is throwntrue - in this case the contents of
the working copy are applied to the underlying resource even though
the working copy was created before a subsequent change in the
resourceThe default conflict resolution setting is the force flag is false
A JavaModelOperation exception is thrown either if the commit could not
be performed or if the new content of the compilation unit violates some Java Model
constraint (e.g. if the new package declaration doesn't match the name of the folder
containing the compilation unit).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation |
|---|
JavaModelOperation.IPostAction |
| Field Summary |
|---|
| Fields inherited from class org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation |
|---|
actions, actionsEnd, actionsStart, APPEND, attributes, elementsToProcess, force, HAS_MODIFIED_RESOURCE_ATTR, isNested, KEEP_EXISTING, NO_ELEMENTS, OPERATION_STACKS, parentElements, POST_ACTION_VERBOSE, progressMonitor, REMOVEALL_APPEND, resultElements, TRUE |
| Constructor Summary | |
|---|---|
CommitWorkingCopyOperation(ICompilationUnit element,
boolean force)
Constructs an operation to commit the contents of a working copy to its original compilation unit. |
|
| Method Summary | |
|---|---|
protected void |
executeOperation()
Performs the operation specific behavior. |
protected CompilationUnit |
getCompilationUnit()
Returns the compilation unit this operation is working on. |
protected ISchedulingRule |
getSchedulingRule()
|
IJavaModelStatus |
verify()
Possible failures: INVALID_ELEMENT_TYPES - the compilation unit supplied to this operation is not a working copy ELEMENT_NOT_PRESENT - the compilation unit the working copy is based on no longer exists. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CommitWorkingCopyOperation(ICompilationUnit element,
boolean force)
| Method Detail |
|---|
protected void executeOperation()
throws JavaModelException
JavaModelOperation
executeOperation in class JavaModelOperationJavaModelException - if setting the source
of the original compilation unit failsprotected CompilationUnit getCompilationUnit()
protected ISchedulingRule getSchedulingRule()
getSchedulingRule in class JavaModelOperationpublic IJavaModelStatus verify()
verify in class JavaModelOperationIJavaModelStatus
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||