@Override public boolean apply(Annotation annotation) { return name.equals(annotation.getName()); } }
public String getDescription(Annotation annotation) { return getDescription(annotation.getName()); }
public boolean isDeprecated(Annotation annotation) { return isDeprecated(annotation.getName()); }
protected void buildAnnotations(Pattern pattern, InitializablePQuery query) throws IncQueryException { for (Annotation annotation : pattern.getAnnotations()) { PAnnotation pAnnotation = new PAnnotation(annotation.getName()); for (Entry<String, Object> attribute : CorePatternLanguageHelper.evaluateAnnotationParameters(annotation).entrySet()) { pAnnotation.addAttribute(attribute.getKey(), attribute.getValue()); } query.addAnnotation(pAnnotation); } }
public boolean isDeprecated(AnnotationParameter parameter) { Annotation annotation = (Annotation) parameter.eContainer(); return isDeprecated(annotation.getName(), parameter.getName()); }
public String getDescription(AnnotationParameter parameter) { Annotation annotation = (Annotation) parameter.eContainer(); return getDescription(annotation.getName(), parameter.getName()); }
@Override public QualifiedName getFullyQualifiedName(EObject obj) { if (obj instanceof Annotation) { Annotation annotation = (Annotation) obj; String name = annotation.getName(); return nameConverter.toQualifiedName("annotation." + name); } else if (obj instanceof AnnotationParameter) { AnnotationParameter parameter = (AnnotationParameter) obj; Annotation annotation = (Annotation) parameter.eContainer(); return getFullyQualifiedName(annotation).append(parameter.getName()); } return super.getFullyQualifiedName(obj); }
@Check(CheckType.NORMAL) public void checkAnnotation(Annotation annotation) { if (annotationProvider.hasValidator(annotation.getName())) { IPatternAnnotationValidator validator = annotationProvider.getValidator(annotation.getName()); warning("Unknown annotation " + annotation.getName(), PatternLanguagePackage.Literals.ANNOTATION__NAME, IssueCodes.UNKNOWN_ANNOTATION);
_builder.append(PAnnotation.class, "\t"); _builder.append("(\""); String _name = annotation.getName(); _builder.append(_name, "\t"); _builder.append("\");");