Search in sources :

Example 1 with UnknownType

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

the class TypeReferenceImpl method getType.

@Override
public Type getType() {
    Type _switchResult = null;
    LightweightTypeReference _delegate = this.getDelegate();
    final LightweightTypeReference it = _delegate;
    boolean _matched = false;
    boolean _isUnknown = it.isUnknown();
    if (_isUnknown) {
        _matched = true;
        CompilationUnitImpl _compilationUnit = this.getCompilationUnit();
        String _packageName = this.getCompilationUnit().getPackageName();
        String _plus = (_packageName + ".");
        String _simpleName = it.getSimpleName();
        String _plus_1 = (_plus + _simpleName);
        _switchResult = new UnknownType(_compilationUnit, _plus_1);
    }
    if (!_matched) {
        _switchResult = this.getCompilationUnit().toType(it.getType());
    }
    return _switchResult;
}
Also used : UnknownType(org.eclipse.xtend.core.macro.declaration.UnknownType) UnknownType(org.eclipse.xtend.core.macro.declaration.UnknownType) Type(org.eclipse.xtend.lib.macro.declaration.Type) LightweightTypeReference(org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference) CompilationUnitImpl(org.eclipse.xtend.core.macro.declaration.CompilationUnitImpl)

Aggregations

CompilationUnitImpl (org.eclipse.xtend.core.macro.declaration.CompilationUnitImpl)1 UnknownType (org.eclipse.xtend.core.macro.declaration.UnknownType)1 Type (org.eclipse.xtend.lib.macro.declaration.Type)1 LightweightTypeReference (org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference)1