protected void computeFeatureCallHighlighting( XAbstractFeatureCall featureCall, IHighlightedPositionAcceptor acceptor) { JvmIdentifiableElement feature = featureCall.getFeature(); if (feature != null && !feature.eIsProxy()) { if (feature instanceof JvmField) { if (((JvmField) feature).isStatic()) { highlightFeatureCall(featureCall, acceptor, STATIC_FIELD); } else { highlightFeatureCall(featureCall, acceptor, FIELD); } } else if (feature instanceof JvmOperation && !featureCall.isOperation()) { JvmOperation jvmOperation = (JvmOperation) feature; if (jvmOperation.isStatic()) highlightFeatureCall(featureCall, acceptor, STATIC_METHOD_INVOCATION); } if (!(featureCall instanceof XBinaryOperation || featureCall instanceof XUnaryOperation || featureCall instanceof XPostfixOperation)) { if (featureCall.isExtension()) { highlightFeatureCall(featureCall, acceptor, EXTENSION_METHOD_INVOCATION); } else { // Extensions without implicit first argument XExpression implicitReceiver = featureCall.getImplicitReceiver(); if (implicitReceiver != null && implicitReceiver instanceof XAbstractFeatureCall) { if (isExtension(((XAbstractFeatureCall) implicitReceiver).getFeature())) highlightFeatureCall(featureCall, acceptor, EXTENSION_METHOD_INVOCATION); } } } if (feature instanceof JvmAnnotationTarget && DeprecationUtil.isDeprecated((JvmAnnotationTarget) feature)) { highlightFeatureCall(featureCall, acceptor, DEPRECATED_MEMBERS); } } }
protected void highlightDeprecation( IHighlightedPositionAcceptor acceptor, EObject referencer, EReference reference, EObject resolvedReferencedObject) { if (resolvedReferencedObject instanceof JvmAnnotationTarget) { JvmAnnotationTarget annoTarget = (JvmAnnotationTarget) resolvedReferencedObject; if (DeprecationUtil.isDeprecated(annoTarget)) highlightFeature(acceptor, referencer, reference, DEPRECATED_MEMBERS); } }