org.eclipse.xtend.lib.macro.Active Java Examples
The following examples show how to use
org.eclipse.xtend.lib.macro.Active.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XtendHighlightingCalculator.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
protected void highlightElement(XtendAnnotationType xtendType, IHighlightedPositionAcceptor acceptor, CancelIndicator cancelIndicator) { for(XAnnotation annotation: xtendType.getAnnotations()) { JvmType annotationType = annotation.getAnnotationType(); if (annotationType != null && !annotationType.eIsProxy() && Active.class.getName().equals(annotationType.getIdentifier())) { highlightFeature(acceptor, annotation, XtendPackage.Literals.XTEND_TYPE_DECLARATION__NAME, ACTIVE_ANNOTATION); break; } } }
Example #2
Source File: XtendHighlightingCalculator.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Override protected void highlightAnnotation(XAnnotation annotation, IHighlightedPositionAcceptor acceptor) { JvmType annotationType = annotation.getAnnotationType(); if (annotationType instanceof JvmAnnotationTarget) { for(JvmAnnotationReference annotationReference: ((JvmAnnotationTarget) annotationType).getAnnotations()) { JvmAnnotationType otherAnnotation = annotationReference.getAnnotation(); if (otherAnnotation != null && !otherAnnotation.eIsProxy() && Active.class.getName().equals(otherAnnotation.getIdentifier())) { highlightAnnotation(annotation, acceptor, ACTIVE_ANNOTATION); return; } } } super.highlightAnnotation(annotation, acceptor); }
Example #3
Source File: XAnnotationExtensions.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
protected boolean isActiveAnnotation(final JvmAnnotationType annotationType) { EList<JvmAnnotationReference> _annotations = annotationType.getAnnotations(); for (final JvmAnnotationReference anno : _annotations) { String _identifier = anno.getAnnotation().getIdentifier(); String _name = Active.class.getName(); boolean _equals = Objects.equal(_identifier, _name); if (_equals) { return true; } } return false; }