Search in sources :

Example 1 with XtendNamedElementImpl

use of org.eclipse.xtend.core.macro.declaration.XtendNamedElementImpl in project xtext-xtend by eclipse.

the class TracabilityImpl method isSource.

@Override
public boolean isSource(final Element element) {
    boolean _switchResult = false;
    boolean _matched = false;
    if (element instanceof XtendNamedElementImpl) {
        _matched = true;
        _switchResult = true;
    }
    if (!_matched) {
        if (element instanceof XtendAnnotationReferenceImpl) {
            _matched = true;
            _switchResult = true;
        }
    }
    if (!_matched) {
        if (element instanceof Expression) {
            _matched = true;
            _switchResult = true;
        }
    }
    if (!_matched) {
        if (element instanceof TypeReferenceImpl) {
            JvmTypeReference _source = ((TypeReferenceImpl) element).getSource();
            boolean _tripleNotEquals = (_source != null);
            if (_tripleNotEquals) {
                _matched = true;
                _switchResult = true;
            }
        }
    }
    if (!_matched) {
        _switchResult = false;
    }
    return _switchResult;
}
Also used : Expression(org.eclipse.xtend.lib.macro.expression.Expression) TypeReferenceImpl(org.eclipse.xtend.core.macro.declaration.TypeReferenceImpl) JvmTypeReference(org.eclipse.xtext.common.types.JvmTypeReference) XtendNamedElementImpl(org.eclipse.xtend.core.macro.declaration.XtendNamedElementImpl) XtendAnnotationReferenceImpl(org.eclipse.xtend.core.macro.declaration.XtendAnnotationReferenceImpl)

Aggregations

TypeReferenceImpl (org.eclipse.xtend.core.macro.declaration.TypeReferenceImpl)1 XtendAnnotationReferenceImpl (org.eclipse.xtend.core.macro.declaration.XtendAnnotationReferenceImpl)1 XtendNamedElementImpl (org.eclipse.xtend.core.macro.declaration.XtendNamedElementImpl)1 Expression (org.eclipse.xtend.lib.macro.expression.Expression)1 JvmTypeReference (org.eclipse.xtext.common.types.JvmTypeReference)1