Klasse CommitWorkingCopyOperation
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation
org.aspectj.org.eclipse.jdt.internal.core.CommitWorkingCopyOperation
- Alle implementierten Schnittstellen:
org.eclipse.core.resources.IWorkspaceRunnable,org.eclipse.core.runtime.ICoreRunnable,org.eclipse.core.runtime.IProgressMonitor
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:
- force flag is
false- in this case anJavaModelExceptionis thrown - force flag is
true- 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 resource
The 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).
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation
JavaModelOperation.IPostAction -
Feldübersicht
Von Klasse geerbte Felder 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, TRUEVon Schnittstelle geerbte Felder org.eclipse.core.runtime.IProgressMonitor
UNKNOWN -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungCommitWorkingCopyOperation(ICompilationUnit element, boolean force) Constructs an operation to commit the contents of a working copy to its original compilation unit. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected voidPerforms the operation specific behavior.protected CompilationUnitReturns the compilation unit this operation is working on.protected org.eclipse.core.runtime.jobs.ISchedulingRuleverify()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.Von Klasse geerbte Methoden org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation
addAction, addDelta, addReconcileDelta, applyTextEdit, beginTask, canModifyRoots, checkCanceled, commonVerify, copyResources, createFile, createFolder, deleteEmptyPackageFragment, deleteResource, deleteResources, done, equalsOneOf, executeNestedOperation, firstActionWithID, getAttribute, getCompilationUnitFor, getCurrentOperationStack, getDocument, getElementToProcess, getJavaModel, getLatestASTLevel, getNestedFolders, getParentElement, getParentElements, getResultElements, getSubProgressMonitor, hasModifiedResource, internalWorked, isCanceled, isReadOnly, isTopLevelOperation, moveResources, newJavaElementDelta, popOperation, postAction, prefixesOneOf, pushOperation, removeAllPostAction, removeReconcileDelta, run, runOperation, runPostActions, setAttribute, setCanceled, setNested, setTaskName, subTask, workedVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden org.eclipse.core.runtime.IProgressMonitor
clearBlocked, setBlocked, slice
-
Konstruktordetails
-
CommitWorkingCopyOperation
Constructs an operation to commit the contents of a working copy to its original compilation unit.
-
-
Methodendetails
-
executeOperation
Beschreibung aus Klasse kopiert:JavaModelOperationPerforms the operation specific behavior. Subclasses must override.- Angegeben von:
executeOperationin KlasseJavaModelOperation- Löst aus:
JavaModelException- if setting the source of the original compilation unit fails
-
getCompilationUnit
Returns the compilation unit this operation is working on. -
getSchedulingRule
protected org.eclipse.core.runtime.jobs.ISchedulingRule getSchedulingRule()- Setzt außer Kraft:
getSchedulingRulein KlasseJavaModelOperation
-
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.
- UPDATE_CONFLICT - the original compilation unit has changed since the working copy was created and the operation specifies no force
- READ_ONLY - the original compilation unit is in read-only mode
- Setzt außer Kraft:
verifyin KlasseJavaModelOperation- Siehe auch:
-