Package com.iizigo.link.java
Class AddAnnotationPrecondition
java.lang.Object
com.iizigo.link.java.AddAnnotationPrecondition
- All Implemented Interfaces:
- ILinkOperation
Adds an annotation to a Java element (type or method) as a precondition to an operation.
- Author:
- Christopher Mindus
- Constructor SummaryConstructorsConstructorDescription- AddAnnotationPrecondition- (IJavaElement element, String fqnAnnotation, String param, String ref, boolean allowMultiple) Constructor.
- Method SummaryModifier and TypeMethodDescriptionCreates the operation node for presentation in the link wizard main page.- booleanChecks if two operations are equal.Executes the operation.The add annotation operation is always enabled.- Methods inherited from class java.lang.Object- clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait- Methods inherited from interface com.iizigo.link.ILinkOperation- addPages, getDependentOperations, isOperationEnabled, isPrecondition, isSelected, isWizardDialogRequired, validateOperations
- Constructor Details- AddAnnotationPreconditionpublic AddAnnotationPrecondition- (IJavaElement element, String fqnAnnotation, String param, String ref, boolean allowMultiple) Constructor.- Parameters:
- element- The Java element: method or type.
- fqnAnnotation- The annotation fully qualified name.
- param- The parameter in the annotation for the reference (relative reference for methods).
- ref- The reference.
- allowMultiple- Flag to allow multiple annotations.
 
 
- Method Details- isOperationEnabledThe add annotation operation is always enabled.- Specified by:
- isOperationEnabledin interface- ILinkOperation
- Returns:
- OK_STATUS.
 
- executeOperationExecutes the operation.- Specified by:
- executeOperationin interface- ILinkOperation
- Parameters:
- op- The complex operation.
- Returns:
- The status of the operation. A complex operation would have a MultiStatusreturn code.
- Throws:
- CoreException- If annotation failed to be added.
 
- equalsOpChecks if two operations are equal.- Specified by:
- equalsOpin interface- ILinkOperation
- Parameters:
- op- Operation to compare with.
- Returns:
- true if they produce the same result, false otherwise.