Search in sources :

Example 1 with Import

use of com.avaloq.tools.ddk.xtext.scope.scope.Import in project dsl-devkit by dsldevkit.

the class ScopeScopeProvider method scope_EClass.

/**
 * Create a scope containing all EClasses of all visible imported EPackages.
 *
 * @param context
 *          scope model
 * @param reference
 *          The EReference
 * @return The scope
 */
// CHECKSTYLE:OFF
public IScope scope_EClass(final ScopeModel context, final EReference reference) {
    // CHECKSTYLE:ON
    IScope result = IScope.NULLSCOPE;
    final Iterable<Import> importedPackages = Lists.reverse(context.getImports());
    for (final Import importedPackage : importedPackages) {
        result = createEClassScope(result, importedPackage);
    }
    return result;
}
Also used : Import(com.avaloq.tools.ddk.xtext.scope.scope.Import) IScope(org.eclipse.xtext.scoping.IScope)

Aggregations

Import (com.avaloq.tools.ddk.xtext.scope.scope.Import)1 IScope (org.eclipse.xtext.scoping.IScope)1