Java Code Examples for org.eclipse.emf.ecore.EStructuralFeature

The following are top voted examples for showing how to use org.eclipse.emf.ecore.EStructuralFeature. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: Saturn   File: DocumentRootImpl.java   Source Code and License 7 votes vote down vote up
/**
 * <!-- 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);
}
 
Example 2
Project: gemoc-studio   File: EMFResource.java   Source Code and License 6 votes vote down vote up
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;
}
 
Example 3
Project: SimQRI   File: BatchProcessPropertiesEditionComponent.java   Source Code and License 6 votes vote down vote up
/**
 * {@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);
}
 
Example 4
Project: neoscada   File: ScriptModuleItemProvider.java   Source Code and License 6 votes vote down vote up
/**
 * 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;
}
 
Example 5
Project: time4sys   File: HardwareCacheTimingPropertiesEditionComponent.java   Source Code and License 6 votes vote down vote up
/**
 * {@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);
}
 
Example 6
Project: SimQRI   File: OrderOnStockThresholdPropertiesEditionComponent.java   Source Code and License 6 votes vote down vote up
/**
 * {@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);
}
 
Example 7
Project: neoscada   File: HttpServiceValidator.java   Source Code and License 6 votes vote down vote up
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." );
    }
}
 
Example 8
Project: BIMplatform   File: DatabaseReadingStackFrame.java   Source Code and License 6 votes vote down vote up
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));
	}
 
Example 9
Project: BIMplatform   File: IfcStepSerializer.java   Source Code and License 6 votes vote down vote up
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);
			}
		}
	}
}
 
Example 10
Project: neoscada   File: RoundedRectangleItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * <!-- 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 );
}
 
Example 11
Project: gemoc-studio-modeldebugging   File: CurrentSessionItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * <!-- 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);
}
 
Example 12
Project: time4sys   File: ResourceItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * 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;
}
 
Example 13
Project: neoscada   File: ProfileItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * <!-- 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 );
}
 
Example 14
Project: neoscada   File: FigureContainerItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * 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;
}
 
Example 15
Project: neoscada   File: CommonDriverItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * 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;
}
 
Example 16
Project: OCCI-Studio   File: FSMItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * 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;
}
 
Example 17
Project: time4sys   File: ResourceInterfacePropertiesEditionComponent.java   Source Code and License 5 votes vote down vote up
/**
 * {@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);
}
 
Example 18
Project: neoscada   File: CompositeComponentItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * <!-- 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 );
}
 
Example 19
Project: neoscada   File: DaveCommunicationProcessorItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * <!-- 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 );
}
 
Example 20
Project: time4sys   File: MappingItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * <!-- 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);
}
 
Example 21
Project: time4sys   File: SporadicPatternGeneralPropertiesEditionComponent.java   Source Code and License 5 votes vote down vote up
/**
 * {@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);
}
 
Example 22
Project: OCCI-Studio   File: OCCICustomLegacyTransientValueService.java   Source Code and License 5 votes vote down vote up
@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);
}
 
Example 23
Project: neoscada   File: LevelItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * 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;
}
 
Example 24
Project: BIMplatform   File: PackageMetaData.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 25
Project: time4sys   File: SchedulerItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * <!-- 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);
}
 
Example 26
Project: BIMplatform   File: IfcStepStreamingSerializer.java   Source Code and License 5 votes vote down vote up
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);
		}
	}
}
 
Example 27
Project: time4sys   File: HardwareDeviceTimingPropertiesEditionComponent.java   Source Code and License 5 votes vote down vote up
/**
 * {@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);
}
 
Example 28
Project: neoscada   File: JdbcUserServiceItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * 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;
}
 
Example 29
Project: neoscada   File: WorldItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * <!-- 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 );
}
 
Example 30
Project: gemoc-studio   File: GProgramItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * 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;
}
 
Example 31
Project: time4sys   File: SynchResourceOtherPropertiesEditionComponent.java   Source Code and License 5 votes vote down vote up
/**
 * {@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);
}
 
Example 32
Project: neoscada   File: ComponentItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * 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;
}
 
Example 33
Project: neoscada   File: FormulaModuleItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * <!-- 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 );
}
 
Example 34
Project: neoscada   File: ArchiveSeriesItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * <!-- 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 );
}
 
Example 35
Project: time4sys   File: DeadlineMonotonicSchedulingPolicyPropertiesEditionComponent.java   Source Code and License 5 votes vote down vote up
/**
 * {@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);
}
 
Example 36
Project: neoscada   File: FieldExtractorTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * 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;
}
 
Example 37
Project: xmontiarc   File: ClassDiagramItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * <!-- 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);
}
 
Example 38
Project: neoscada   File: ComponentItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * <!-- 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 );
}
 
Example 39
Project: time4sys   File: ConstraintContainerItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * <!-- 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);
}
 
Example 40
Project: time4sys   File: SoftwareInterfaceGeneralPropertiesEditionComponent.java   Source Code and License 5 votes vote down vote up
/**
 * {@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);
}