/** * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case XmlManipModulePackage.DOCUMENT_ROOT__MIXED: ((FeatureMap.Internal)getMixed()).set(newValue); return; case XmlManipModulePackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: ((EStructuralFeature.Setting)getXMLNSPrefixMap()).set(newValue); return; case XmlManipModulePackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: ((EStructuralFeature.Setting)getXSISchemaLocation()).set(newValue); return; case XmlManipModulePackage.DOCUMENT_ROOT__XML_MANIP_CONFIGURATION: setXmlManipConfiguration((XmlManipConfiguration)newValue); return; } super.eSet(featureID, newValue); }
protected static Set<Resource> getRelatedResources(Resource res, Set<Resource> result) { if (result.contains(res)) return result; result.add(res); Map<EObject, Collection<EStructuralFeature.Setting>> crossRefs = EcoreUtil.ExternalCrossReferencer .find(res); for (Map.Entry<EObject, Collection<EStructuralFeature.Setting>> entry : crossRefs .entrySet()) { EObject proxyEObject = entry.getKey(); result.addAll(getRelatedResources(proxyEObject.eResource(), result)); } return result; }
/** * {@inheritDoc} * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object) */ public EStructuralFeature associatedFeature(Object editorKey) { if (editorKey == MetamodelViewsRepository.BatchProcess.Properties.name) { return MetamodelPackage.eINSTANCE.getComponent_Name(); } if (editorKey == MetamodelViewsRepository.BatchProcess.Properties.duration) { return MetamodelPackage.eINSTANCE.getProcess_Duration(); } if (editorKey == MetamodelViewsRepository.BatchProcess.Properties.storageOutputFlow) { return MetamodelPackage.eINSTANCE.getProcess_StorageOutputFlow(); } if (editorKey == MetamodelViewsRepository.BatchProcess.Properties.percentageOfSuccess) { return MetamodelPackage.eINSTANCE.getBatchProcess_PercentageOfSuccess(); } if (editorKey == MetamodelViewsRepository.BatchProcess.Properties.numberOfLines) { return MetamodelPackage.eINSTANCE.getBatchProcess_NumberOfChains(); } if (editorKey == MetamodelViewsRepository.BatchProcess.Properties.outputs) { return MetamodelPackage.eINSTANCE.getBatchProcess_Outputs(); } return super.associatedFeature(editorKey); }
/** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Collection<? extends EStructuralFeature> getChildrenFeatures ( Object object ) { if ( childrenFeatures == null ) { super.getChildrenFeatures ( object ); childrenFeatures.add ( ComponentPackage.Literals.CALCULATION_MODULE__KNOWN_INPUTS ); childrenFeatures.add ( ComponentPackage.Literals.CALCULATION_MODULE__KNOWN_OUTPUTS ); childrenFeatures.add ( ComponentPackage.Literals.SCRIPT_MODULE__INIT_SCRIPT ); childrenFeatures.add ( ComponentPackage.Literals.SCRIPT_MODULE__UPDATE_SCRIPT ); childrenFeatures.add ( ComponentPackage.Literals.SCRIPT_MODULE__WRITE_COMMAND_SCRIPT ); childrenFeatures.add ( ComponentPackage.Literals.SCRIPT_MODULE__TIMER_SCRIPT ); } return childrenFeatures; }
/** * {@inheritDoc} * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object) */ public EStructuralFeature associatedFeature(Object editorKey) { if (editorKey == HrmViewsRepository.Timing.TimingProperties.clock) { return HrmPackage.eINSTANCE.getHardwareResource_Clock(); } if (editorKey == HrmViewsRepository.Timing.TimingProperties.timings) { return HrmPackage.eINSTANCE.getHardwareMemory_Timings(); } if (editorKey == HrmViewsRepository.Timing.TimingProperties.replPolicy) { return HrmPackage.eINSTANCE.getHardwareProcessingMemory_ReplPolicy(); } if (editorKey == HrmViewsRepository.Timing.TimingProperties.writePolicy) { return HrmPackage.eINSTANCE.getHardwareProcessingMemory_WritePolicy(); } return super.associatedFeature(editorKey); }
/** * {@inheritDoc} * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object) */ public EStructuralFeature associatedFeature(Object editorKey) { if (editorKey == MetamodelViewsRepository.OrderOnStockThreshold.Properties.period) { return MetamodelPackage.eINSTANCE.getOrderOnStockThreshold_Period(); } if (editorKey == MetamodelViewsRepository.OrderOnStockThreshold.Properties.threshold) { return MetamodelPackage.eINSTANCE.getOrderOnStockThreshold_Threshold(); } if (editorKey == MetamodelViewsRepository.OrderOnStockThreshold.Properties.name) { return MetamodelPackage.eINSTANCE.getOrderOnStockThreshold_Name(); } if (editorKey == MetamodelViewsRepository.OrderOnStockThreshold.Properties.orderQuantity) { return MetamodelPackage.eINSTANCE.getOrderOnStockThreshold_OrderQuantity(); } if (editorKey == MetamodelViewsRepository.OrderOnStockThreshold.Properties.orderType) { return MetamodelPackage.eINSTANCE.getOrderOnStockThreshold_OrderType(); } if (editorKey == MetamodelViewsRepository.OrderOnStockThreshold.Properties.supplier) { return MetamodelPackage.eINSTANCE.getOrderOnStockThreshold_Supplier(); } if (editorKey == MetamodelViewsRepository.OrderOnStockThreshold.Properties.storage) { return MetamodelPackage.eINSTANCE.getOrderOnStockThreshold_Storage(); } return super.associatedFeature(editorKey); }
protected void performValidation ( final EObject target, final EStructuralFeature feature, final ValidationContext ctx ) { final Object service = target.eGet ( feature ); if ( service == null ) { return; } if ( ! ( service instanceof HttpServiceModule ) ) { throw new IllegalStateException ( String.format ( "Validator can only handle %s", HttpServiceModule.class.getName () ) ); } if ( !HttpServices.isValid ( target, (HttpServiceModule)service ) ) { ctx.add ( feature, "Selected HTTP Service is not present in the target application setup. The selected service must be either a module in the same application or in the selected configuration of the application." ); } }
protected void processPossibleInclude(CanInclude previousInclude, Include include) throws QueryException, DatabaseException { if (include.hasTypes()) { for (EClass filterClass : include.getTypes()) { if (!filterClass.isSuperTypeOf(currentObject.eClass())) { // System.out.println(filterClass.getName() + " / " + currentObject.eClass().getName()); return; } } } if (include.hasFields()) { for (EStructuralFeature eStructuralFeature : include.getFields()) { currentObject.addUseForSerialization(eStructuralFeature); } } getQueryObjectProvider().push(new QueryIncludeStackFrame(getQueryObjectProvider(), getReusable(), previousInclude, include, currentObject, queryPart)); }
private void writeEnum(EObject object, EStructuralFeature feature) throws SerializerException, IOException { Object val = object.eGet(feature); if (feature.getEType().getName().equals("Tristate")) { IfcParserWriterUtils.writePrimitive(val, outputStream); } else { if (val == null) { print(DOLLAR); } else { if (((Enum<?>) val).toString().equals(NULL)) { print(DOLLAR); } else { print(DOT); print(val.toString()); print(DOT); } } } }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EStructuralFeature getChildFeature ( Object object, Object child ) { // Check the type of the specified child object and return the proper feature to use for // adding (see {@link AddCommand}) it as a child. return super.getChildFeature ( object, child ); }
/** * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ @Override protected EStructuralFeature getChildFeature(Object object, Object child) { // Check the type of the specified child object and return the proper feature to use for // adding (see {@link AddCommand}) it as a child. return super.getChildFeature(object, child); }
/** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(GrmPackage.Literals.RESOURCE__OWNED_RESOURCE); childrenFeatures.add(GrmPackage.Literals.RESOURCE__PSERVICES); childrenFeatures.add(GrmPackage.Literals.RESOURCE__OWNED_PORT); childrenFeatures.add(GrmPackage.Literals.RESOURCE__OWNED_CONNECTOR); } return childrenFeatures; }
/** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Collection<? extends EStructuralFeature> getChildrenFeatures ( Object object ) { if ( childrenFeatures == null ) { super.getChildrenFeatures ( object ); childrenFeatures.add ( VisualInterfacePackage.Literals.FIGURE_CONTAINER__CONTENT ); } return childrenFeatures; }
/** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Collection<? extends EStructuralFeature> getChildrenFeatures ( Object object ) { if ( childrenFeatures == null ) { super.getChildrenFeatures ( object ); childrenFeatures.add ( WorldPackage.Literals.COMMON_DRIVER__PASSWORD ); } return childrenFeatures; }
/** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(OCCIPackage.Literals.FSM__OWNED_STATE); } return childrenFeatures; }
/** * {@inheritDoc} * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object) */ public EStructuralFeature associatedFeature(Object editorKey) { if (editorKey == GrmViewsRepository.General.Properties.name) { return GrmPackage.eINSTANCE.getNamedElement_Name(); } if (editorKey == GrmViewsRepository.General.Properties.ownedService) { return GrmPackage.eINSTANCE.getResourceInterface_OwnedService(); } return super.associatedFeature(editorKey); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EStructuralFeature getChildFeature(Object object, Object child) { // Check the type of the specified child object and return the proper feature to use for // adding (see {@link AddCommand}) it as a child. return super.getChildFeature(object, child); }
/** * {@inheritDoc} * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object) */ public EStructuralFeature associatedFeature(Object editorKey) { if (editorKey == GqamViewsRepository.General.Properties.parent_) { return GqamPackage.eINSTANCE.getArrivalPattern_Parent(); } return super.associatedFeature(editorKey); }
@Override public ValueTransient isValueTransient(EObject semanticObject, EStructuralFeature feature) { if (feature == OCCIPackage.Literals.ATTRIBUTE__MUTABLE) { if (semanticObject.eContainer() instanceof Type || semanticObject.eContainer() instanceof RecordType) { if ((boolean)semanticObject.eGet(feature)) { return ValueTransient.NO; } } } if (feature == OCCIPackage.Literals.RESOURCE__RLINKS) { return ValueTransient.YES; } return super.isValueTransient(semanticObject, feature); }
/** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Collection<? extends EStructuralFeature> getChildrenFeatures ( Object object ) { if ( childrenFeatures == null ) { super.getChildrenFeatures ( object ); childrenFeatures.add ( ComponentPackage.Literals.LEVEL__COMPONENTS ); childrenFeatures.add ( ComponentPackage.Literals.LEVEL__LEVELS ); } return childrenFeatures; }
public EReference getEReference(String className, String referenceName) { EClassifier eClassifier = ePackage.getEClassifier(className); if (eClassifier instanceof EClass) { EClass eClass = (EClass)eClassifier; EStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(referenceName); if (eStructuralFeature instanceof EReference) { return (EReference) eStructuralFeature; } } return null; }
private void writeObject(VirtualObject object, EStructuralFeature feature) throws SerializerException, IOException { Object ref = object.eGet(feature); if (ref == null || (feature.isUnsettable() && !object.eIsSet(feature))) { EClassifier type = feature.getEType(); if (type instanceof EClass) { EStructuralFeature structuralFeature = ((EClass) type).getEStructuralFeature(WRAPPED_VALUE); if (structuralFeature != null) { String name = structuralFeature.getEType().getName(); if (name.equals(IFC_BOOLEAN) || name.equals(IFC_LOGICAL) || structuralFeature.getEType() == EcorePackage.eINSTANCE.getEBoolean()) { print(BOOLEAN_UNDEFINED); } else { print(DOLLAR); } } else { print(DOLLAR); } } else { if (type == EcorePackage.eINSTANCE.getEBoolean()) { print(BOOLEAN_UNDEFINED); } else if (feature.isMany()) { print("()"); } else { print(DOLLAR); } } } else { if (ref instanceof WrappedVirtualObject) { writeEmbedded((WrappedVirtualObject) ref); } else if (feature.getEType() == ECORE_PACKAGE_INSTANCE.getEDouble()) { EStructuralFeature asStringFeature = object.eClass().getEStructuralFeature(feature.getName() + "AsString"); String asString = (String) object.eGet(asStringFeature); writeDoubleValue((Double) ref, asString, feature); } else { IfcParserWriterUtils.writePrimitive(ref, printWriter); } } }
/** * {@inheritDoc} * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object) */ public EStructuralFeature associatedFeature(Object editorKey) { if (editorKey == HrmViewsRepository.Timing.TimingProperties.clock) { return HrmPackage.eINSTANCE.getHardwareResource_Clock(); } return super.associatedFeature(editorKey); }
/** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Collection<? extends EStructuralFeature> getChildrenFeatures ( Object object ) { if ( childrenFeatures == null ) { super.getChildrenFeatures ( object ); childrenFeatures.add ( InfrastructurePackage.Literals.JDBC_USER_SERVICE__IMPLEMENTATION ); } return childrenFeatures; }
/** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(GexpressionsPackage.Literals.GPROGRAM__IMPORTS); childrenFeatures.add(GexpressionsPackage.Literals.GPROGRAM__EXPRESSIONS); } return childrenFeatures; }
/** * {@inheritDoc} * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object) */ public EStructuralFeature associatedFeature(Object editorKey) { if (editorKey == GrmViewsRepository.Other.OtherProperties.pServices) { return GrmPackage.eINSTANCE.getResource_PServices(); } if (editorKey == GrmViewsRepository.Other.OtherProperties.rServices) { return GrmPackage.eINSTANCE.getResource_RServices(); } return super.associatedFeature(editorKey); }
/** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Collection<? extends EStructuralFeature> getChildrenFeatures ( Object object ) { if ( childrenFeatures == null ) { super.getChildrenFeatures ( object ); childrenFeatures.add ( ParserPackage.Literals.COMPONENT__INPUT ); childrenFeatures.add ( ParserPackage.Literals.COMPONENT__EXTRACTORS ); } return childrenFeatures; }
/** * {@inheritDoc} * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object) */ public EStructuralFeature associatedFeature(Object editorKey) { if (editorKey == LibraryViewsRepository.General.Properties.name) { return GrmPackage.eINSTANCE.getNamedElement_Name(); } if (editorKey == LibraryViewsRepository.General.Properties.policy) { return GrmPackage.eINSTANCE.getSchedulingPolicy_Policy(); } if (editorKey == LibraryViewsRepository.General.Properties.otherSchedPolicy) { return GrmPackage.eINSTANCE.getSchedulingPolicy_OtherSchedPolicy(); } return super.associatedFeature(editorKey); }
/** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Collection<? extends EStructuralFeature> getChildrenFeatures ( Object object ) { if ( childrenFeatures == null ) { super.getChildrenFeatures ( object ); childrenFeatures.add ( ConfigurationPackage.Literals.FIELD_EXTRACTOR_TYPE__FIELD ); } return childrenFeatures; }
/** * {@inheritDoc} * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object) */ public EStructuralFeature associatedFeature(Object editorKey) { if (editorKey == SrmViewsRepository.General.Properties.name) { return GrmPackage.eINSTANCE.getNamedElement_Name(); } return super.associatedFeature(editorKey); }