Klasse SortElementsOperation
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation
org.aspectj.org.eclipse.jdt.internal.core.SortElementsOperation
- Alle implementierten Schnittstellen:
org.eclipse.core.resources.IWorkspaceRunnable
,org.eclipse.core.runtime.ICoreRunnable
,org.eclipse.core.runtime.IProgressMonitor
This operation is used to sort elements in a compilation unit according to
certain criteria.
- Seit:
- 2.1
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation
JavaModelOperation.IPostAction
-
Feldübersicht
FelderVon 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, TRUE
Von Schnittstelle geerbte Felder org.eclipse.core.runtime.IProgressMonitor
UNKNOWN
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungSortElementsOperation
(int level, IJavaElement[] elements, int[] positions, Comparator comparator) Constructor for SortElementsOperation. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungorg.eclipse.text.edits.TextEdit
calculateEdit
(CompilationUnit unit, org.eclipse.text.edits.TextEditGroup group) Calculates the required text edits to sort theunit
protected void
Performs the operation specific behavior.protected int
Returns the amount of work for the main task of this operation for progress reporting.static void
insert
(org.eclipse.text.edits.TextEdit parent, org.eclipse.text.edits.TextEdit edit) protected boolean
isMalformed
(ASTNode node) verify()
Possible failures: NO_ELEMENTS_TO_PROCESS - the compilation unit supplied to the operation isnull
.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, getSchedulingRule, getSubProgressMonitor, hasModifiedResource, internalWorked, isCanceled, isReadOnly, isTopLevelOperation, moveResources, newJavaElementDelta, popOperation, postAction, prefixesOneOf, pushOperation, removeAllPostAction, removeReconcileDelta, run, runOperation, runPostActions, setAttribute, setCanceled, setNested, setTaskName, subTask, worked
Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Von Schnittstelle geerbte Methoden org.eclipse.core.runtime.IProgressMonitor
clearBlocked, setBlocked, slice
-
Felddetails
-
CONTAINS_MALFORMED_NODES
- Siehe auch:
-
-
Konstruktordetails
-
SortElementsOperation
public SortElementsOperation(int level, IJavaElement[] elements, int[] positions, Comparator comparator) Constructor for SortElementsOperation.- Parameter:
level
- the AST API level; one of the AST LEVEL constantselements
-positions
-comparator
-
-
-
Methodendetails
-
getMainAmountOfWork
protected int getMainAmountOfWork()Returns the amount of work for the main task of this operation for progress reporting. -
isMalformed
-
executeOperation
Beschreibung aus Klasse kopiert:JavaModelOperation
Performs the operation specific behavior. Subclasses must override.- Angegeben von:
executeOperation
in KlasseJavaModelOperation
- Löst aus:
JavaModelException
- Siehe auch:
-
calculateEdit
public org.eclipse.text.edits.TextEdit calculateEdit(CompilationUnit unit, org.eclipse.text.edits.TextEditGroup group) throws JavaModelException Calculates the required text edits to sort theunit
- Parameter:
group
-- Gibt zurück:
- the edit or null if no sorting is required
- Löst aus:
JavaModelException
-
verify
Possible failures:- NO_ELEMENTS_TO_PROCESS - the compilation unit supplied to the operation is
null
.
- INVALID_ELEMENT_TYPES - the supplied elements are not an instance of IWorkingCopy .
- Setzt außer Kraft:
verify
in KlasseJavaModelOperation
- Gibt zurück:
- IJavaModelStatus
- Siehe auch:
- NO_ELEMENTS_TO_PROCESS - the compilation unit supplied to the operation is
-
insert
public static void insert(org.eclipse.text.edits.TextEdit parent, org.eclipse.text.edits.TextEdit edit)
-