public IScope scope_Reference_type(Attribute attribute, EReference eReference) { return super.getScope(attribute.eContainer(), eReference); }
public IScope classOrDelegateScope(EObject context, EReference reference) { IScope scope = polymorphicFindScopeForClassName(context, reference); if (scope == null) { scope = delegateGetScope(context, reference); } return scope; }
return new SimpleScope(scopedElementsFor(parameterDefs)); return classOrDelegateScope(parameterValue, eReference);
public IScope scope_ExecuteStatement_operation(ExecuteStatement executeStatement, EReference eReference) { Service service = executeStatement.getService(); if (service != null) { List<Operation> elements = service.getOperations(); List<DelegateOperation> delegateOperations= service.getDelegateOperations(); List<EObject> allOperations = new ArrayList<EObject>(); allOperations.addAll(elements); allOperations.addAll(delegateOperations); return new SimpleScope(Scopes.scopedElementsFor(allOperations, new com.google.common.base.Function<EObject, QualifiedName>() { public QualifiedName apply(EObject eObject) { if (eObject instanceof Operation) { Operation op = (Operation)eObject; return QualifiedName.create(op.getName()); } else if (eObject instanceof DelegateOperation) { DelegateOperation delOp = (DelegateOperation)eObject; if (delOp.getOperation() != null) { return QualifiedName.create(delOp.getOperation().getName()); } } return QualifiedName.create("crud"); } })); } return super.getScope(executeStatement, eReference); }
public IScope scope_XmaVariable_reference(XmaVariable xmaVariableRef, EReference eReference) { Page page = EcoreUtil2.getContainerOfType(xmaVariableRef, Page.class); if (page instanceof ReferencedXMAPage) { ReferencedXMAPage refXMAPage = (ReferencedXMAPage)page; if (refXMAPage.getXmaPage() != null) { XMAPage xmaPage = refXMAPage.getXmaPage(); List<IExpVariable> elements = EcoreUtil2.getAllContentsOfType(refXMAPage.getXmaPage(),IExpVariable.class); elements.add(xmaPage); addComponentPropertiesTo(elements,xmaPage.getComponent()); return new SimpleScope(Scopes.scopedElementsFor(elements,guiDesignNameFunction)); } else { return super.getScope(xmaVariableRef, eReference); } } Component component = EcoreUtil2.getContainerOfType(xmaVariableRef, Component.class); if (component != null) { List<IExpVariable> elements = new ArrayList<IExpVariable>(); addComponentPropertiesTo(elements,component.getXmaComponent()); return new SimpleScope(Scopes.scopedElementsFor(elements,guiDesignNameFunction)); } return super.getScope(xmaVariableRef, eReference); }