Package org.eclipse.xtext.scoping

Examples of org.eclipse.xtext.scoping.IScope


    EList<Mode> modes = new BasicEList<Mode>();

    Grammar grammar = createMock(Grammar.class);
    LexerRule rule = createMock(LexerRule.class);
    LexerRule ref = createMock(LexerRule.class);
    IScope scope = createMock(IScope.class);
    Mode mode = createMock(Mode.class);
    LexerRule modeRule = createMock(LexerRule.class);

    Antlr4ScopeProvider scopeProvider = PowerMock.createPartialMock(Antlr4ScopeProvider.class,
        "scopeFor", PrequelConstruct.class, List.class, Class.class);
View Full Code Here


public class ApplauseDslScopeProvider extends AbstractDeclarativeScopeProvider {
  public IScope scope_RESTMethodCall_restMethod(final RESTMethodCall ctx, final EReference ref) {
    DataSourceCall _datasource = ctx.getDatasource();
    DataSource _datasource_1 = _datasource.getDatasource();
    EList<DataSourceAccessMethod> _methods = _datasource_1.getMethods();
    IScope _scopeFor = Scopes.scopeFor(_methods);
    return _scopeFor;
  }
View Full Code Here

  }
 
  public IScope scope_UIComponentMemberCall_component(final ScreenListItemCell ctx, final EReference ref) {
    ListItemCellDeclaration _type = ctx.getType();
    EList<UIComponentMemberDeclaration> _members = _type.getMembers();
    IScope _scopeFor = Scopes.scopeFor(_members);
    return _scopeFor;
  }
View Full Code Here

    return _xblockexpression;
  }
 
  private IScope _membersScope(final UIComponentDeclaration type) {
    EList<UIComponentMemberDeclaration> _members = type.getMembers();
    IScope _scopeFor = Scopes.scopeFor(_members);
    return _scopeFor;
  }
View Full Code Here

    return null;
  }
 
  private IScope _attributesScope(final Entity entity) {
    EList<Attribute> _attributes = entity.getAttributes();
    IScope _scopeFor = Scopes.scopeFor(_attributes);
    return _scopeFor;
  }
View Full Code Here

  @Override
  public IScope createSimpleFeatureCallScope(EObject context,
      EReference reference, Resource resource,
      boolean includeCurrentBlock, int idx) {
    IScope parent =  super.createSimpleFeatureCallScope(context, reference, resource,
        includeCurrentBlock, idx);
    List<IEObjectDescription> descriptions = new ArrayList<IEObjectDescription>();
    descriptions.addAll(createItemFeatures(resource.getResourceSet()));
    descriptions.addAll(createTypeFeatures(resource.getResourceSet()));
View Full Code Here

      Assignment assignment, ContentAssistContext context,
      ICompletionProposalAcceptor acceptor) {
    super.completeScript_Expressions(model, assignment, context, acceptor);
    if (model == null || model instanceof Rule ) {
      Function<IEObjectDescription, ICompletionProposal> proposalFactory = getProposalFactory(getFeatureCallRuleName(), context);
      IScope scope = getScopeProvider().createSimpleFeatureCallScope(model, XbasePackage.Literals.XABSTRACT_FEATURE_CALL__FEATURE, context.getResource(), false, -1);
      createLocalVariableAndImplicitProposals(model, context, acceptor);
    }
  }
View Full Code Here

 
  @Override
  protected IScope createLocalVarScope(IScope parentScope,
      LocalVariableScopeContext scopeContext) {
    if(scopeContext.getContext() instanceof Rule) {
      IScope parent = super.createLocalVarScope(parentScope, scopeContext);
      List<IEObjectDescription> descriptions = new ArrayList<IEObjectDescription>();
      descriptions.addAll(createVarFeatures(scopeContext.getContext().eResource()));
      descriptions.addAll(createTriggerSpecificVars((Rule) scopeContext.getContext()));
      return MapBasedScope.createScope(parent, descriptions);
    } else {
View Full Code Here

  }
 
  @Override
  protected IScope getScope(Resource resource, boolean ignoreCase,
      EClass type, Predicate<IEObjectDescription> predicate) {
    IScope parentScope = super.getScope(resource, ignoreCase, type, predicate);
    List<IEObjectDescription> descs = Lists.newArrayList();
    for(EObject eObj : res.getContents()) {
      if (eObj instanceof Strategy) {
        Strategy strategy = (Strategy) eObj;
        descs.add(EObjectDescription.create(strategy.getName(), strategy));
View Full Code Here

TOP

Related Classes of org.eclipse.xtext.scoping.IScope

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.