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 File: HashMapVirtualObject.java From BIMserver with 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 #2
Source File: AbstractJavaBasedContentProposalProvider.java From xtext-eclipse with 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 #3
Source File: DelegatingScopeProviderTest.java From xtext-core with 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 File: TypesPackageImpl.java From xtext-extras with 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 #5
Source File: TypePackageImpl.java From birt with 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 #6
Source File: AbstractSemanticRegionsFinder.java From xtext-core with 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 #7
Source File: DomainmodelPackageImpl.java From xtext-web with 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 #8
Source File: Bug303200TestLanguagePackageImpl.java From xtext-eclipse with 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 #9
Source File: XtextTestPackageImpl.java From xtext-core with 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 #10
Source File: XbaseBatchScopeProvider.java From xtext-extras with Eclipse Public License 2.0 | 4 votes |
protected IScope delegateGetScope(EObject context, EReference reference) { return getDelegate().getScope(context, reference); }
Example #11
Source File: SyntacticsequencertestPackageImpl.java From xtext-core with 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 #12
Source File: RegionaccesstestlanguagePackageImpl.java From xtext-core with 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 #13
Source File: CommentAssociationPackageImpl.java From xtext-core with 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 #14
Source File: ParserPackageImpl.java From neoscada with 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 #15
Source File: XtextTestPackageImpl.java From xtext-core with 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 #16
Source File: ItemPropertyDescriptor2.java From neoscada with 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 #17
Source File: ConfigurationPackageImpl.java From neoscada with 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 #18
Source File: TypesPackageImpl.java From xtext-extras with 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 #19
Source File: BeeLangTestLanguagePackageImpl.java From xtext-core with 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 #20
Source File: ContextFinderTestPackageImpl.java From xtext-core with 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 #21
Source File: SarlPackageImpl.java From sarl with 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 #22
Source File: ComponentPackageImpl.java From birt with 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 #23
Source File: AbstractLiveContainerTest.java From xtext-core with 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 #24
Source File: ComponentPackageImpl.java From birt with 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 #25
Source File: Bug291022TestLanguagePackageImpl.java From xtext-eclipse with 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 #26
Source File: LayoutPackage.java From birt with Eclipse Public License 1.0 | 2 votes |
/** * Returns the meta object for the containment reference '{@link org.eclipse.birt.chart.model.layout.Legend#getFormatSpecifier <em>Format Specifier</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Format Specifier</em>'. * @see org.eclipse.birt.chart.model.layout.Legend#getFormatSpecifier() * @see #getLegend() * @generated */ EReference getLegend_FormatSpecifier( );
Example #27
Source File: AttributePackageImpl.java From birt with Eclipse Public License 1.0 | 2 votes |
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getStyle_Font( ) { return (EReference) styleEClass.getEStructuralFeatures( ).get( 0 ); }
Example #28
Source File: SexecPackage.java From statecharts with Eclipse Public License 1.0 | 2 votes |
/** * Returns the meta object for the reference list '{@link org.yakindu.sct.model.sexec.ExecutionScope#getSubScopes <em>Sub Scopes</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference list '<em>Sub Scopes</em>'. * @see org.yakindu.sct.model.sexec.ExecutionScope#getSubScopes() * @see #getExecutionScope() * @generated */ EReference getExecutionScope_SubScopes();
Example #29
Source File: GeometryPackageImpl.java From BIMserver with GNU Affero General Public License v3.0 | 2 votes |
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EReference getGeometryData_MostUsedColor() { return (EReference) getGeometryData().getEStructuralFeatures().get(14); }
Example #30
Source File: ModelPackageImpl.java From bonita-studio with GNU General Public License v2.0 | 2 votes |
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getDocumentRoot_Operation() { return (EReference)getDocumentRoot().getEStructuralFeatures().get(100); }