org.eclipse.emf.ecore.EReference Java Examples
The following examples show how to use
org.eclipse.emf.ecore.EReference.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: xtext-eclipse Author: eclipse File: AbstractJavaBasedContentProposalProvider.java License: Eclipse Public License 2.0 | 5 votes |
public void lookupCrossReference(IScope scope, EObject model, EReference reference, ICompletionProposalAcceptor acceptor, Predicate<IEObjectDescription> filter, Function<IEObjectDescription, ICompletionProposal> proposalFactory) { Function<IEObjectDescription, ICompletionProposal> wrappedFactory = getWrappedFactory(model, reference, proposalFactory); Iterable<IEObjectDescription> candidates = queryScope(scope, model, reference, filter); for (IEObjectDescription candidate : candidates) { if (!acceptor.canAcceptMoreProposals()) return; if (filter.apply(candidate)) { acceptor.accept(wrappedFactory.apply(candidate)); } } }
Example #2
Source Project: BIMserver Author: opensourceBIM File: HashMapVirtualObject.java License: GNU Affero General Public License v3.0 | 5 votes |
private int getWrappedValueSize(Object val, EReference eReference) { if (val == null) { return 2; } if (val instanceof VirtualObject) { VirtualObject eObject = (VirtualObject) val; if (eReference.getEAnnotation("twodimensionalarray") != null) { int refSize = 6; EStructuralFeature eStructuralFeature = eObject.eClass().getEStructuralFeature("List"); List<?> l = (List<?>)eObject.eGet(eStructuralFeature); for (Object o : l) { if (o instanceof VirtualObject) { refSize += 8; } else if (o instanceof WrappedVirtualObject) { refSize += ((WrappedVirtualObject)o).getSize(); } else { refSize += getPrimitiveSize((EDataType) eStructuralFeature.getEType(), o); } } return refSize; } else if (eObject.eClass().getEAnnotation("wrapped") != null) { VirtualObject wrappedValue = (VirtualObject) val; EStructuralFeature wrappedValueFeature = wrappedValue.eClass().getEStructuralFeature("wrappedValue"); Object wrappedVal = eObject.eGet(wrappedValueFeature); return 2 + getPrimitiveSize((EDataType) wrappedValueFeature.getEType(), wrappedVal); } else { return 8; } } else if (val instanceof WrappedVirtualObject) { WrappedVirtualObject wrappedVirtualObject = (WrappedVirtualObject)val; return wrappedVirtualObject.getSize(); } else if (val instanceof Long) { return 8; } else { throw new RuntimeException("Programming error, should not happen " + val); } }
Example #3
Source Project: xtext-core Author: eclipse File: DelegatingScopeProviderTest.java License: Eclipse Public License 2.0 | 5 votes |
TestableDelegatingScopeProvider() { this(new IScopeProvider() { @Override public IScope getScope(EObject context, EReference reference) { return IScope.NULLSCOPE; } }); }
Example #4
Source Project: xtext-eclipse Author: eclipse File: Bug291022TestLanguagePackageImpl.java License: Eclipse Public License 2.0 | 4 votes |
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EReference getAttribute_Feature() { return (EReference)attributeEClass.getEStructuralFeatures().get(0); }
Example #5
Source Project: xtext-web Author: eclipse File: DomainmodelPackageImpl.java License: Eclipse Public License 2.0 | 4 votes |
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EReference getOperation_Body() { return (EReference)operationEClass.getEStructuralFeatures().get(1); }
Example #6
Source Project: birt Author: eclipse File: TypePackageImpl.java License: Eclipse Public License 1.0 | 4 votes |
/** * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ public EReference getBarSeries_RiserOutline( ) { return (EReference) barSeriesEClass.getEStructuralFeatures( ).get( 1 ); }
Example #7
Source Project: xtext-core Author: eclipse File: SyntacticsequencertestPackageImpl.java License: Eclipse Public License 2.0 | 4 votes |
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EReference getModel_X5() { return (EReference)modelEClass.getEStructuralFeatures().get(4); }
Example #8
Source Project: xtext-core Author: eclipse File: CommentAssociationPackageImpl.java License: Eclipse Public License 2.0 | 4 votes |
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EReference getElement_Child() { return (EReference)elementEClass.getEStructuralFeatures().get(1); }
Example #9
Source Project: xtext-core Author: eclipse File: XtextTestPackageImpl.java License: Eclipse Public License 2.0 | 4 votes |
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EReference getTypeRef_Classifier() { return (EReference)typeRefEClass.getEStructuralFeatures().get(1); }
Example #10
Source Project: neoscada Author: eclipse File: ConfigurationPackageImpl.java License: Eclipse Public License 1.0 | 4 votes |
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EReference getRootType_Trigger () { return (EReference)rootTypeEClass.getEStructuralFeatures ().get ( 4 ); }
Example #11
Source Project: xtext-extras Author: eclipse File: TypesPackageImpl.java License: Eclipse Public License 2.0 | 4 votes |
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EReference getJvmArrayType_ComponentType() { return (EReference)jvmArrayTypeEClass.getEStructuralFeatures().get(0); }
Example #12
Source Project: xtext-core Author: eclipse File: BeeLangTestLanguagePackageImpl.java License: Eclipse Public License 2.0 | 4 votes |
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EReference getUnaryOpExpression_Expr() { return (EReference)unaryOpExpressionEClass.getEStructuralFeatures().get(1); }
Example #13
Source Project: sarl Author: sarl File: SarlPackageImpl.java License: Apache License 2.0 | 4 votes |
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EReference getSarlAction_FiredEvents() { return (EReference)sarlActionEClass.getEStructuralFeatures().get(0); }
Example #14
Source Project: birt Author: eclipse File: ComponentPackageImpl.java License: Eclipse Public License 1.0 | 4 votes |
/** * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ public EReference getMarkerLine_Value( ) { return (EReference) markerLineEClass.getEStructuralFeatures( ).get( 1 ); }
Example #15
Source Project: birt Author: eclipse File: ComponentPackageImpl.java License: Eclipse Public License 1.0 | 4 votes |
/** * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ public EReference getMarkerRange_Outline( ) { return (EReference) markerRangeEClass.getEStructuralFeatures( ).get( 0 ); }
Example #16
Source Project: xtext-extras Author: eclipse File: TypesPackageImpl.java License: Eclipse Public License 2.0 | 4 votes |
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EReference getJvmCustomAnnotationValue_Values() { return (EReference)jvmCustomAnnotationValueEClass.getEStructuralFeatures().get(0); }
Example #17
Source Project: xtext-core Author: eclipse File: AbstractLiveContainerTest.java License: Eclipse Public License 2.0 | 4 votes |
private EReference createRefToRoot() { EReference ref = EcoreFactory.eINSTANCE.createEReference(); EcoreFactory.eINSTANCE.createEClass().getEStructuralFeatures().add(ref); ref.setEType(getModelRootType()); return ref; }
Example #18
Source Project: xtext-core Author: eclipse File: ContextFinderTestPackageImpl.java License: Eclipse Public License 2.0 | 4 votes |
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EReference getModel_QuantityExclusion() { return (EReference)modelEClass.getEStructuralFeatures().get(5); }
Example #19
Source Project: neoscada Author: eclipse File: ItemPropertyDescriptor2.java License: Eclipse Public License 1.0 | 4 votes |
public ItemPropertyDescriptor2 ( final AdapterFactory adapterFactory, final ResourceLocator resourceLocator, final String displayName, final String description, final EReference[] parentReferences, final boolean isSettable, final String category, final String[] filterFlags ) { super ( adapterFactory, resourceLocator, displayName, description, parentReferences, isSettable, category, filterFlags ); }
Example #20
Source Project: neoscada Author: eclipse File: ParserPackageImpl.java License: Eclipse Public License 1.0 | 4 votes |
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EReference getParserDriver_Components () { return (EReference)parserDriverEClass.getEStructuralFeatures ().get ( 0 ); }
Example #21
Source Project: xtext-core Author: eclipse File: RegionaccesstestlanguagePackageImpl.java License: Eclipse Public License 2.0 | 4 votes |
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EReference getDelegation_Delegate() { return (EReference)delegationEClass.getEStructuralFeatures().get(0); }
Example #22
Source Project: xtext-core Author: eclipse File: XtextTestPackageImpl.java License: Eclipse Public License 2.0 | 4 votes |
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EReference getEnumLiteralDeclaration_Literal() { return (EReference)enumLiteralDeclarationEClass.getEStructuralFeatures().get(1); }
Example #23
Source Project: xtext-core Author: eclipse File: AbstractSemanticRegionsFinder.java License: Eclipse Public License 2.0 | 4 votes |
protected void assertNoContainment(EStructuralFeature feat) { if (!(feat instanceof EAttribute) && !(feat instanceof EReference && !((EReference) feat).isContainment())) throw new IllegalStateException("Only EAttributes and CrossReferences allowed."); }
Example #24
Source Project: xtext-eclipse Author: eclipse File: Bug303200TestLanguagePackageImpl.java License: Eclipse Public License 2.0 | 4 votes |
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EReference getFunctionDefinition_Params() { return (EReference)functionDefinitionEClass.getEStructuralFeatures().get(2); }
Example #25
Source Project: xtext-extras Author: eclipse File: XbaseBatchScopeProvider.java License: Eclipse Public License 2.0 | 4 votes |
protected IScope delegateGetScope(EObject context, EReference reference) { return getDelegate().getScope(context, reference); }
Example #26
Source Project: bonita-studio Author: bonitasoft File: OrganizationPackageImpl.java License: GNU General Public License v2.0 | 2 votes |
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getOrganization_CustomUserInfoDefinitions() { return (EReference)organizationEClass.getEStructuralFeatures().get(0); }
Example #27
Source Project: M2Doc Author: ObeoNetwork File: TemplatePackage.java License: Eclipse Public License 1.0 | 2 votes |
/** * Returns the meta object for the containment reference '{@link org.obeonetwork.m2doc.template.Conditional#getElse <em>Else</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @return the meta object for the containment reference '<em>Else</em>'. * @see org.obeonetwork.m2doc.template.Conditional#getElse() * @see #getConditional() * @generated */ EReference getConditional_Else();
Example #28
Source Project: bonita-studio Author: bonitasoft File: DiPackageImpl.java License: GNU General Public License v2.0 | 2 votes |
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getDocumentRoot_BPMNDiagram() { return (EReference)documentRootEClass.getEStructuralFeatures().get(3); }
Example #29
Source Project: n4js Author: eclipse File: TypeRefsPackageImpl.java License: Eclipse Public License 1.0 | 2 votes |
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EReference getFunctionTypeExpression_ReturnTypeRef() { return (EReference)functionTypeExpressionEClass.getEStructuralFeatures().get(8); }
Example #30
Source Project: kieker Author: kieker-monitoring File: DeploymentPackageImpl.java License: Apache License 2.0 | 2 votes |
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getDeploymentModel_DeploymentContexts() { return (EReference)deploymentModelEClass.getEStructuralFeatures().get(0); }