public class AddAnnotationPrecondition extends Object implements ILinkOperation
Constructor and Description |
---|
AddAnnotationPrecondition(IJavaElement element,
String fqnAnnotation,
String param,
String ref,
boolean allowMultiple)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
ItemNavigatorPresentation |
createOperationNode(ItemNavigatorPresentation parent)
Creates the operation node for presentation in the link wizard
main page.
|
boolean |
equalsOp(ILinkOperation op)
Checks if two operations are equal.
|
IStatus |
executeOperation(ComplexOperation op)
Executes the operation.
|
IStatus |
isOperationEnabled()
The add annotation operation is always enabled.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPages, getDependentOperations, isOperationEnabled, isPrecondition, isSelected, isWizardDialogRequired, validateOperations
public AddAnnotationPrecondition(IJavaElement element, String fqnAnnotation, String param, String ref, boolean allowMultiple)
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.public ItemNavigatorPresentation createOperationNode(ItemNavigatorPresentation parent)
createOperationNode
in interface ILinkOperation
parent
- The parent node.public IStatus isOperationEnabled()
isOperationEnabled
in interface ILinkOperation
public IStatus executeOperation(ComplexOperation op) throws CoreException
executeOperation
in interface ILinkOperation
op
- The complex operation.MultiStatus
return code.CoreException
- If annotation failed to be added.public boolean equalsOp(ILinkOperation op)
equalsOp
in interface ILinkOperation
op
- Operation to compare with.iizi® is a registered trademark of Mindus SARL. © Copyright Mindus SARL, 2020. All rights reserved.