Java Code Examples for org.eclipse.emf.ecore.util.FeatureMapUtil

The following are top voted examples for showing how to use org.eclipse.emf.ecore.util.FeatureMapUtil. 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: neoscada   File: AbstractHiveFactory.java   Source Code and License 6 votes vote down vote up
protected Object getConfigurationData ( final HiveConfigurationType configuration )
{
    for ( FeatureMap.Entry entry : configuration.getAny () )
    {
        if ( entry.getValue () instanceof EObject )
        {
            return entry.getValue ();
        }
        else if ( FeatureMapUtil.isText ( entry ) )
        {
            return entry.getValue ();
        }
        else if ( FeatureMapUtil.isCDATA ( entry ) )
        {
            return entry.getValue ();
        }
    }
    return null;
}
 
Example 2
Project: dawn-marketplace-server   File: MarketplaceDAO.java   Source Code and License 6 votes vote down vote up
/**
 * Creates and returns the catalog representing this particular marketplace
 * instance.
 *
 * @return this marketplace's catalog
 */
private Catalog getCatalog() {
	Catalog catalog = MarketplaceFactory.eINSTANCE.createCatalog();
	catalog.setTitle(environment.getProperty("marketplace.title"));
	catalog.setUrl(marketplaceBaseUrl+"/mpc");
	catalog.setIcon(environment.getProperty("marketplace.catalog-icon"));
	catalog.setDescription(environment.getProperty("marketplace.description"));
	Wizard wizard = MarketplaceFactory.eINSTANCE.createWizard();
	wizard.setTitle(environment.getProperty("marketplace.wizard-title"));
	wizard.setIcon(environment.getProperty("marketplace.wizard-icon"));
	SearchTab st = MarketplaceFactory.eINSTANCE.createSearchTab();
	FeatureMapUtil.addText(st.getMixed(), "Search");
	st.setEnabled(1);
	wizard.setSearchtab(st);
	catalog.setWizard(wizard);
	return catalog;
}
 
Example 3
Project: hybris-commerce-eclipse-plugin   File: AbstractPojosItemProvider.java   Source Code and License 6 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(BeansPackage.Literals.ABSTRACT_POJOS__GROUP,
			 FeatureMapUtil.createEntry
				(BeansPackage.Literals.ABSTRACT_POJOS__BEAN,
				 BeansFactory.eINSTANCE.createBean())));

	newChildDescriptors.add
		(createChildParameter
			(BeansPackage.Literals.ABSTRACT_POJOS__GROUP,
			 FeatureMapUtil.createEntry
				(BeansPackage.Literals.ABSTRACT_POJOS__ENUM,
				 BeansFactory.eINSTANCE.createEnum())));
}
 
Example 4
Project: statecharts   File: DerivedEObjectEList.java   Source Code and License 6 votes vote down vote up
protected boolean scanNext(EStructuralFeature nextFeature,
		ListIterator<Object> nextValuesIterator) {
	boolean isFeatureMap = FeatureMapUtil.isFeatureMap(nextFeature);

	while (nextValuesIterator.hasNext()) {
		Object nextValue = nextValuesIterator.next();

		if (isFeatureMap) {
			FeatureMap.Entry entry = (FeatureMap.Entry) nextValue;
			nextFeature = entry.getEStructuralFeature();
			nextValue = entry.getValue();
		}

		if ((isIncluded(nextFeature) ? nextValue != null
				: isIncluded(nextValue))
				&& ((index < preparedValues.size() && nextValue == preparedValues
						.get(index)) || preparedValues.add(nextValue))) {

			valuesIterator = nextValuesIterator;
			preparedFeature = nextFeature;
			return true;
		}
	}

	return false;
}
 
Example 5
Project: statecharts   File: DerivedEObjectEList.java   Source Code and License 6 votes vote down vote up
protected boolean scanPrevious(EStructuralFeature previousFeature,
		ListIterator<Object> previousValuesIterator) {
	boolean isFeatureMap = FeatureMapUtil.isFeatureMap(previousFeature);

	while (previousValuesIterator.hasPrevious()) {
		Object previousValue = previousValuesIterator.previous();

		if (isFeatureMap) {
			FeatureMap.Entry entry = (FeatureMap.Entry) previousValue;
			previousFeature = entry.getEStructuralFeature();
			previousValue = entry.getValue();
		}

		if (index > 0 && previousValue == preparedValues.get(index - 1)) {
			valuesIterator = previousValuesIterator;
			preparedFeature = previousFeature;
			return true;
		}
	}

	return false;
}
 
Example 6
Project: eclipse-avro   File: BasicEObjectImpl.java   Source Code and License 6 votes vote down vote up
public Object eOpenGet(EStructuralFeature eFeature, boolean resolve)
{
  EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature);
  if (openFeature != null)
  {
    if (!FeatureMapUtil.isFeatureMap(openFeature))
    {
      openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature);
    }
    FeatureMap featureMap = (FeatureMap)eGet(openFeature);
    return ((FeatureMap.Internal)featureMap).get(eFeature, resolve);
  }
  else
  {
    throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid feature");
  }
}
 
Example 7
Project: eclipse-avro   File: BasicEObjectImpl.java   Source Code and License 6 votes vote down vote up
public void eOpenSet(EStructuralFeature eFeature, Object newValue) 
{
  EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature);
  if (openFeature != null)
  {
    if (!FeatureMapUtil.isFeatureMap(openFeature))
    {
      openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature);
    }
    FeatureMap featureMap = (FeatureMap)eGet(openFeature);
    ((FeatureMap.Internal)featureMap).set(eFeature, newValue);
  }
  else
  {
    throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid changeable feature");
  }
}
 
Example 8
Project: eclipse-avro   File: BasicEObjectImpl.java   Source Code and License 6 votes vote down vote up
public void eOpenUnset(EStructuralFeature eFeature) 
{
  EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature);
  if (openFeature != null)
  {
    if (!FeatureMapUtil.isFeatureMap(openFeature))
    {
      openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature);
    }
    FeatureMap featureMap = (FeatureMap)eGet(openFeature);
    ((FeatureMap.Internal)featureMap).unset(eFeature);
  }
  else
  {
    throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid changeable feature");
  }
}
 
Example 9
Project: eclipse-avro   File: BasicEObjectImpl.java   Source Code and License 6 votes vote down vote up
public boolean eOpenIsSet(EStructuralFeature eFeature) 
{
  EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature);
  if (openFeature != null)
  {
    if (!FeatureMapUtil.isFeatureMap(openFeature))
    {
      openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature);
    }
    FeatureMap featureMap = (FeatureMap)eGet(openFeature);
    return ((FeatureMap.Internal)featureMap).isSet(eFeature);
  }
  else
  {
    throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid feature");
  }
}
 
Example 10
Project: clickwatch   File: BasicEObjectImpl.java   Source Code and License 6 votes vote down vote up
public void eOpenSet(EStructuralFeature eFeature, Object newValue) 
{
  EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature);
  if (openFeature != null)
  {
    if (!FeatureMapUtil.isFeatureMap(openFeature))
    {
      openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature);
    }
    FeatureMap featureMap = (FeatureMap)eGet(openFeature);
    ((FeatureMap.Internal)featureMap).set(eFeature, newValue);
  }
  else
  {
    throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid changeable feature");
  }
}
 
Example 11
Project: citygml4emf   File: CoverageFunctionTypeItemProvider.java   Source Code and License 6 votes vote down vote up
/**
 * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) {
	Object childFeature = feature;
	Object childObject = child;

	if (childFeature instanceof EStructuralFeature && FeatureMapUtil.isFeatureMap((EStructuralFeature)childFeature)) {
		FeatureMap.Entry entry = (FeatureMap.Entry)childObject;
		childFeature = entry.getEStructuralFeature();
		childObject = entry.getValue();
	}

	boolean qualify =
		childFeature == GmlPackage.eINSTANCE.getCoverageFunctionType_GridFunction() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_IndexMap();

	if (qualify) {
		return getString
			("_UI_CreateChild_text2",
			 new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
	}
	return super.getCreateChildText(owner, feature, child, selection);
}
 
Example 12
Project: citygml4emf   File: SurfaceDataPropertyTypeItemProvider.java   Source Code and License 6 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(AppearancePackage.Literals.SURFACE_DATA_PROPERTY_TYPE__SURFACE_DATA_GROUP,
			 FeatureMapUtil.createEntry
				(AppearancePackage.Literals.DOCUMENT_ROOT__GEOREFERENCED_TEXTURE,
				 AppearanceFactory.eINSTANCE.createGeoreferencedTextureType())));

	newChildDescriptors.add
		(createChildParameter
			(AppearancePackage.Literals.SURFACE_DATA_PROPERTY_TYPE__SURFACE_DATA_GROUP,
			 FeatureMapUtil.createEntry
				(AppearancePackage.Literals.DOCUMENT_ROOT__PARAMETERIZED_TEXTURE,
				 AppearanceFactory.eINSTANCE.createParameterizedTextureType())));

	newChildDescriptors.add
		(createChildParameter
			(AppearancePackage.Literals.SURFACE_DATA_PROPERTY_TYPE__SURFACE_DATA_GROUP,
			 FeatureMapUtil.createEntry
				(AppearancePackage.Literals.DOCUMENT_ROOT__X3_DMATERIAL,
				 AppearanceFactory.eINSTANCE.createX3DMaterialType())));
}
 
Example 13
Project: citygml4emf   File: ControlPointTypeItemProvider.java   Source Code and License 6 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(GmlPackage.eINSTANCE.getControlPointType_PosList(),
			 GmlFactory.eINSTANCE.createDirectPositionListType()));

	newChildDescriptors.add
		(createChildParameter
			(GmlPackage.eINSTANCE.getControlPointType_GeometricPositionGroup(),
			 FeatureMapUtil.createEntry
				(GmlPackage.eINSTANCE.getControlPointType_Pos(),
				 GmlFactory.eINSTANCE.createDirectPositionType())));

	newChildDescriptors.add
		(createChildParameter
			(GmlPackage.eINSTANCE.getControlPointType_GeometricPositionGroup(),
			 FeatureMapUtil.createEntry
				(GmlPackage.eINSTANCE.getControlPointType_PointProperty(),
				 GmlFactory.eINSTANCE.createPointPropertyType())));
}
 
Example 14
Project: citygml4emf   File: OperationRefTypeItemProvider.java   Source Code and License 6 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(GmlPackage.eINSTANCE.getOperationRefType_OperationGroup(),
			 FeatureMapUtil.createEntry
				(GmlPackage.eINSTANCE.getDocumentRoot_Conversion(),
				 GmlFactory.eINSTANCE.createConversionType())));

	newChildDescriptors.add
		(createChildParameter
			(GmlPackage.eINSTANCE.getOperationRefType_OperationGroup(),
			 FeatureMapUtil.createEntry
				(GmlPackage.eINSTANCE.getDocumentRoot_Transformation(),
				 GmlFactory.eINSTANCE.createTransformationType())));
}
 
Example 15
Project: citygml4emf   File: TriangleTypeItemProvider.java   Source Code and License 6 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(GmlPackage.eINSTANCE.getTriangleType_ExteriorGroup(),
			 FeatureMapUtil.createEntry
				(GmlPackage.eINSTANCE.getTriangleType_Exterior(),
				 GmlFactory.eINSTANCE.createAbstractRingPropertyType())));

	newChildDescriptors.add
		(createChildParameter
			(GmlPackage.eINSTANCE.getTriangleType_ExteriorGroup(),
			 FeatureMapUtil.createEntry
				(GmlPackage.eINSTANCE.getDocumentRoot_OuterBoundaryIs(),
				 GmlFactory.eINSTANCE.createAbstractRingPropertyType())));
}
 
Example 16
Project: citygml4emf   File: AppearancePropertyTypeItemProvider.java   Source Code and License 6 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(TexturedsurfacePackage.Literals.APPEARANCE_PROPERTY_TYPE__APPEARANCE_GROUP,
			 FeatureMapUtil.createEntry
				(TexturedsurfacePackage.Literals.DOCUMENT_ROOT__MATERIAL,
				 TexturedsurfaceFactory.eINSTANCE.createMaterialType())));

	newChildDescriptors.add
		(createChildParameter
			(TexturedsurfacePackage.Literals.APPEARANCE_PROPERTY_TYPE__APPEARANCE_GROUP,
			 FeatureMapUtil.createEntry
				(TexturedsurfacePackage.Literals.DOCUMENT_ROOT__SIMPLE_TEXTURE,
				 TexturedsurfaceFactory.eINSTANCE.createSimpleTextureType())));
}
 
Example 17
Project: citygml4emf   File: AbstractGeneralOperationParameterRefTypeItemProvider.java   Source Code and License 6 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(GmlPackage.eINSTANCE.getAbstractGeneralOperationParameterRefType_GeneralOperationParameterGroup(),
			 FeatureMapUtil.createEntry
				(GmlPackage.eINSTANCE.getDocumentRoot_OperationParameter(),
				 GmlFactory.eINSTANCE.createOperationParameterType())));

	newChildDescriptors.add
		(createChildParameter
			(GmlPackage.eINSTANCE.getAbstractGeneralOperationParameterRefType_GeneralOperationParameterGroup(),
			 FeatureMapUtil.createEntry
				(GmlPackage.eINSTANCE.getDocumentRoot_OperationParameterGroup(),
				 GmlFactory.eINSTANCE.createOperationParameterGroupType())));
}
 
Example 18
Project: citygml4emf   File: LineStringSegmentTypeItemProvider.java   Source Code and License 6 votes vote down vote up
/**
 * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) {
	Object childFeature = feature;
	Object childObject = child;

	if (childFeature instanceof EStructuralFeature && FeatureMapUtil.isFeatureMap((EStructuralFeature)childFeature)) {
		FeatureMap.Entry entry = (FeatureMap.Entry)childObject;
		childFeature = entry.getEStructuralFeature();
		childObject = entry.getValue();
	}

	boolean qualify =
		childFeature == GmlPackage.eINSTANCE.getLineStringSegmentType_PointProperty() ||
		childFeature == GmlPackage.eINSTANCE.getLineStringSegmentType_PointRep();

	if (qualify) {
		return getString
			("_UI_CreateChild_text2",
			 new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
	}
	return super.getCreateChildText(owner, feature, child, selection);
}
 
Example 19
Project: citygml4emf   File: BoundingShapeTypeItemProvider.java   Source Code and License 6 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(GmlPackage.eINSTANCE.getBoundingShapeType_EnvelopeGroup(),
			 FeatureMapUtil.createEntry
				(GmlPackage.eINSTANCE.getBoundingShapeType_Envelope(),
				 GmlFactory.eINSTANCE.createEnvelopeType())));

	newChildDescriptors.add
		(createChildParameter
			(GmlPackage.eINSTANCE.getBoundingShapeType_EnvelopeGroup(),
			 FeatureMapUtil.createEntry
				(GmlPackage.eINSTANCE.getBoundingShapeType_Envelope(),
				 GmlFactory.eINSTANCE.createEnvelopeWithTimePeriodType())));

	newChildDescriptors.add
		(createChildParameter
			(GmlPackage.eINSTANCE.getBoundingShapeType_EnvelopeGroup(),
			 FeatureMapUtil.createEntry
				(GmlPackage.eINSTANCE.getDocumentRoot_EnvelopeWithTimePeriod(),
				 GmlFactory.eINSTANCE.createEnvelopeWithTimePeriodType())));
}
 
Example 20
Project: citygml4emf   File: OpeningPropertyTypeItemProvider.java   Source Code and License 6 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(BuildingPackage.Literals.OPENING_PROPERTY_TYPE__OPENING_GROUP,
			 FeatureMapUtil.createEntry
				(BuildingPackage.Literals.DOCUMENT_ROOT__DOOR,
				 BuildingFactory.eINSTANCE.createDoorType())));

	newChildDescriptors.add
		(createChildParameter
			(BuildingPackage.Literals.OPENING_PROPERTY_TYPE__OPENING_GROUP,
			 FeatureMapUtil.createEntry
				(BuildingPackage.Literals.DOCUMENT_ROOT__WINDOW,
				 BuildingFactory.eINSTANCE.createWindowType())));
}
 
Example 21
Project: neoscada   File: CustomExtractorTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors ( Collection<Object> newChildDescriptors, Object object )
{
    super.collectNewChildDescriptors ( newChildDescriptors, object );

    newChildDescriptors.add
            ( createChildParameter
            ( ConfigurationPackage.Literals.CUSTOM_EXTRACTOR_TYPE__ANY,
                    FeatureMapUtil.createEntry
                            ( ConfigurationPackage.Literals.DOCUMENT_ROOT__ROOT,
                                    ConfigurationFactory.eINSTANCE.createRootType () ) ) );
}
 
Example 22
Project: neoscada   File: RootTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors ( Collection<Object> newChildDescriptors, Object object )
{
    super.collectNewChildDescriptors ( newChildDescriptors, object );

    newChildDescriptors.add
            ( createChildParameter
            ( ConfigurationPackage.Literals.ROOT_TYPE__GROUP,
                    FeatureMapUtil.createEntry
                            ( ConfigurationPackage.Literals.ROOT_TYPE__QUEUE,
                                    ConfigurationFactory.eINSTANCE.createQueueType () ) ) );

    newChildDescriptors.add
            ( createChildParameter
            ( ConfigurationPackage.Literals.ROOT_TYPE__GROUP,
                    FeatureMapUtil.createEntry
                            ( ConfigurationPackage.Literals.ROOT_TYPE__COMMAND,
                                    ConfigurationFactory.eINSTANCE.createSplitContinuousCommandType () ) ) );

    newChildDescriptors.add
            ( createChildParameter
            ( ConfigurationPackage.Literals.ROOT_TYPE__GROUP,
                    FeatureMapUtil.createEntry
                            ( ConfigurationPackage.Literals.ROOT_TYPE__HIVE_PROCESS,
                                    ConfigurationFactory.eINSTANCE.createHiveProcessCommandType () ) ) );

    newChildDescriptors.add
            ( createChildParameter
            ( ConfigurationPackage.Literals.ROOT_TYPE__GROUP,
                    FeatureMapUtil.createEntry
                            ( ConfigurationPackage.Literals.ROOT_TYPE__TRIGGER,
                                    ConfigurationFactory.eINSTANCE.createTriggerCommandType () ) ) );

    newChildDescriptors.add
            ( createChildParameter
            ( ConfigurationPackage.Literals.ROOT_TYPE__GROUP,
                    FeatureMapUtil.createEntry
                            ( ConfigurationPackage.Literals.ROOT_TYPE__ADDITIONAL_CONFIGURATION_DIRECTORY, "" ) ) ); //$NON-NLS-1$
}
 
Example 23
Project: Saturn   File: SaturnDocLoadSaveUtil.java   Source Code and License 5 votes vote down vote up
private static void textElementToTextNode(SaturnResourceImpl saturnResourceImpl_, Map<Entry, Entry> textNodes_)
{
  DocumentRoot o = (DocumentRoot) saturnResourceImpl_.getContents().get(0);
  Saturn saturn = (Saturn) o.eContents().get(0);
  TreeIterator<EObject> ee = saturn.eAllContents();
  while (ee.hasNext())
  {
    EObject e = ee.next();
    if (e == null) continue;
    EClass ec = e.eClass();
    if (!ValuesPackage.eINSTANCE.getComplexValue().isSuperTypeOf(ec)) continue;

    ComplexValue cv = (ComplexValue) e;

    for (int i = 0; i < cv.getMixed().size(); i++)
    {
      FeatureMap.Entry entry = cv.getMixed().get(i);
      Object value = entry.getValue();
      if (value instanceof TextComplexValue)
      {
        FeatureMap.Entry newEntry = FeatureMapUtil.createTextEntry(((TextComplexValue) value).getText());
        cv.getMixed().set(i, newEntry);
        textNodes_.put(newEntry, entry);
      }
    }
  }
}
 
Example 24
Project: Saturn   File: SaturnDocLoadSaveUtil.java   Source Code and License 5 votes vote down vote up
private static void textNodeToTextElement(SaturnResourceImpl saturnResourceImpl_)
{
  DocumentRoot o = (DocumentRoot) saturnResourceImpl_.getContents().get(0);
  Saturn saturn = (Saturn) o.eContents().get(0);
  TreeIterator<EObject> ee = saturn.eAllContents();
  while (ee.hasNext())
  {
    EObject e = ee.next();
    if (e == null) continue;
    EClass ec = e.eClass();
    if (!ValuesPackage.eINSTANCE.getComplexValue().isSuperTypeOf(ec)) continue;

    ComplexValue cv = (ComplexValue) e;
    for (int i = 0; i < cv.getMixed().size(); i++)
    {
      FeatureMap.Entry entry = cv.getMixed().get(i);
      Object value = entry.getValue();
      if (value instanceof String)
      {
        TextComplexValue textComplexValue = ValuesPackage.eINSTANCE.getValuesFactory().createTextComplexValue();
        textComplexValue.setText((String) value);
        FeatureMap.Entry newEntry = FeatureMapUtil.createEntry(ValuesPackage.eINSTANCE.getComplexValue_Text(),
            textComplexValue);
        cv.getMixed().set(i, newEntry);
      }
    }
  }
}
 
Example 25
Project: dawn-marketplace-server   File: NodeProxy.java   Source Code and License 5 votes vote down vote up
public void setMainFeature(String id){
	if (node.getIus() == null) {
		Ius createIus = MarketplaceFactory.eINSTANCE.createIus();
		node.setIus(createIus);
	}
	node.getIus().getItems().clear();
	Iu createIu = MarketplaceFactory.eINSTANCE.createIu();
	FeatureMapUtil.addText(createIu.getMixed(), id);
	createIu.setRequired(true);
	node.getIus().getItems().add(createIu);
}
 
Example 26
Project: dawn-marketplace-server   File: FeatureSection.java   Source Code and License 5 votes vote down vote up
@Override
public Object convert(Object input) {
	Ius iusCollection = MarketplaceFactory.eINSTANCE.createIus();
	String[] ius = ((String)input).split(",");
	for (String string : ius) {
		Iu iu = MarketplaceFactory.eINSTANCE.createIu();
		iu.setRequired(true);
		FeatureMapUtil.addText(iu.getMixed(), string.trim());
		iusCollection.getItems().add(iu);
	}
	return iusCollection;
}
 
Example 27
Project: statecharts   File: StatechartEqualityHelper.java   Source Code and License 5 votes vote down vote up
@Override
protected boolean haveEqualAttribute(EObject eObject1, EObject eObject2,
		EAttribute attribute) {
	
	Object value1 = eObject1.eGet(attribute);
	Object value2 = eObject2.eGet(attribute);

	// If the first value is null, the second value must be null.
	//
	if (value1 == null) {
		return value2 == null;
	}
	
	// Since the first value isn't null, if the second one is, they aren't equal.
	//
	if (value2 == null) {
		return false;
	}

	// If this is a feature map...
	//
	if (FeatureMapUtil.isFeatureMap(attribute)) {
		// The feature maps must be equal.
		//
		FeatureMap featureMap1 = (FeatureMap)value1;
		FeatureMap featureMap2 = (FeatureMap)value2;
		return equalFeatureMaps(featureMap1, featureMap2);
	}
	else {
		if (value1 instanceof String && value2 instanceof String) {
			String wsFreeValue1 = removeWhitespaces((String)value1);
			String wsFreeValue2 = removeWhitespaces((String)value2);
			return wsFreeValue1.equals(wsFreeValue2);
		}
		
		return value1.equals(value2);
	}
}
 
Example 28
Project: statecharts   File: DerivedSubsetEObjectEList.java   Source Code and License 5 votes vote down vote up
public DerivedSubsetEObjectEList(Class<?> dataClass, InternalEObject owner,
		int featureID, int[] sourceFeatureIDs) {
	super(dataClass, owner, featureID, sourceFeatureIDs);

	EStructuralFeature feature = sourceFeatureIDs.length == 1 ? getEStructuralFeature(sourceFeatureIDs[0])
			: null;

	if (feature == null || !feature.isMany()
			|| FeatureMapUtil.isFeatureMap(feature)) {

		throw new IllegalArgumentException(String.valueOf(sourceFeatureIDs));
	}
}
 
Example 29
Project: LiquibaseEditor   File: ParamType1ItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getParamType1_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getParamType1_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getParamType1_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION,
				 XMLTypeFactory.eINSTANCE.createProcessingInstruction())));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getParamType1_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
				 "")));
}
 
Example 30
Project: LiquibaseEditor   File: SqlCheckTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getSqlCheckType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getSqlCheckType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getSqlCheckType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION,
				 XMLTypeFactory.eINSTANCE.createProcessingInstruction())));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getSqlCheckType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
				 "")));
}
 
Example 31
Project: LiquibaseEditor   File: CreateProcedureTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getCreateProcedureType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getCreateProcedureType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getCreateProcedureType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION,
				 XMLTypeFactory.eINSTANCE.createProcessingInstruction())));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getCreateProcedureType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getCreateProcedureType_Mixed(),
			 FeatureMapUtil.createEntry
				(DbchangelogPackage.eINSTANCE.getCreateProcedureType_Comment(),
				 "")));
}
 
Example 32
Project: LiquibaseEditor   File: LoadUpdateDataTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getLoadUpdateDataType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getLoadUpdateDataType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getLoadUpdateDataType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION,
				 XMLTypeFactory.eINSTANCE.createProcessingInstruction())));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getLoadUpdateDataType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getLoadUpdateDataType_Mixed(),
			 FeatureMapUtil.createEntry
				(DbchangelogPackage.eINSTANCE.getLoadUpdateDataType_Column(),
				 DbchangelogFactory.eINSTANCE.createColumnType1())));
}
 
Example 33
Project: LiquibaseEditor   File: ColumnTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getColumnType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getColumnType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getColumnType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION,
				 XMLTypeFactory.eINSTANCE.createProcessingInstruction())));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getColumnType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getColumnType_Mixed(),
			 FeatureMapUtil.createEntry
				(DbchangelogPackage.eINSTANCE.getColumnType_Constraints(),
				 DbchangelogFactory.eINSTANCE.createConstraintsType())));
}
 
Example 34
Project: LiquibaseEditor   File: WhereParamsTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getWhereParamsType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getWhereParamsType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getWhereParamsType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION,
				 XMLTypeFactory.eINSTANCE.createProcessingInstruction())));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getWhereParamsType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getWhereParamsType_Mixed(),
			 FeatureMapUtil.createEntry
				(DbchangelogPackage.eINSTANCE.getWhereParamsType_Param(),
				 DbchangelogFactory.eINSTANCE.createParamType())));
}
 
Example 35
Project: LiquibaseEditor   File: DatabaseChangeLogTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getDatabaseChangeLogType_Property(),
			 DbchangelogFactory.eINSTANCE.createPropertyType()));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getDatabaseChangeLogType_PreConditions(),
			 DbchangelogFactory.eINSTANCE.createPreConditionsType1()));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getDatabaseChangeLogType_Group(),
			 FeatureMapUtil.createEntry
				(DbchangelogPackage.eINSTANCE.getDatabaseChangeLogType_ChangeSet(),
				 DbchangelogFactory.eINSTANCE.createChangeSetType())));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getDatabaseChangeLogType_Group(),
			 FeatureMapUtil.createEntry
				(DbchangelogPackage.eINSTANCE.getDatabaseChangeLogType_Include(),
				 DbchangelogFactory.eINSTANCE.createIncludeType())));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getDatabaseChangeLogType_Group(),
			 FeatureMapUtil.createEntry
				(DbchangelogPackage.eINSTANCE.getDatabaseChangeLogType_IncludeAll(),
				 DbchangelogFactory.eINSTANCE.createIncludeAllType())));
}
 
Example 36
Project: LiquibaseEditor   File: SqlTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getSqlType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getSqlType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getSqlType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION,
				 XMLTypeFactory.eINSTANCE.createProcessingInstruction())));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getSqlType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getSqlType_Mixed(),
			 FeatureMapUtil.createEntry
				(DbchangelogPackage.eINSTANCE.getSqlType_Comment(),
				 "")));
}
 
Example 37
Project: LiquibaseEditor   File: ColumnType2ItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getColumnType2_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getColumnType2_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getColumnType2_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION,
				 XMLTypeFactory.eINSTANCE.createProcessingInstruction())));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getColumnType2_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getColumnType2_Mixed(),
			 FeatureMapUtil.createEntry
				(DbchangelogPackage.eINSTANCE.getColumnType2_Constraints(),
				 DbchangelogFactory.eINSTANCE.createConstraintsType())));
}
 
Example 38
Project: LiquibaseEditor   File: StopTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getStopType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getStopType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getStopType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION,
				 XMLTypeFactory.eINSTANCE.createProcessingInstruction())));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getStopType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
				 "")));
}
 
Example 39
Project: LiquibaseEditor   File: LoadDataTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getLoadDataType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getLoadDataType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getLoadDataType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION,
				 XMLTypeFactory.eINSTANCE.createProcessingInstruction())));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getLoadDataType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getLoadDataType_Mixed(),
			 FeatureMapUtil.createEntry
				(DbchangelogPackage.eINSTANCE.getLoadDataType_Column(),
				 DbchangelogFactory.eINSTANCE.createColumnType3())));
}
 
Example 40
Project: LiquibaseEditor   File: ModifySqlTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getModifySqlType_ModifySqlChildren(),
			 FeatureMapUtil.createEntry
				(DbchangelogPackage.eINSTANCE.getModifySqlType_Replace(),
				 DbchangelogFactory.eINSTANCE.createReplaceType())));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getModifySqlType_ModifySqlChildren(),
			 FeatureMapUtil.createEntry
				(DbchangelogPackage.eINSTANCE.getModifySqlType_RegExpReplace(),
				 DbchangelogFactory.eINSTANCE.createRegExpReplaceType())));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getModifySqlType_ModifySqlChildren(),
			 FeatureMapUtil.createEntry
				(DbchangelogPackage.eINSTANCE.getModifySqlType_Prepend(),
				 DbchangelogFactory.eINSTANCE.createPrependType())));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getModifySqlType_ModifySqlChildren(),
			 FeatureMapUtil.createEntry
				(DbchangelogPackage.eINSTANCE.getModifySqlType_Append(),
				 DbchangelogFactory.eINSTANCE.createAppendType())));
}
 
Example 41
Project: LiquibaseEditor   File: ValidCheckSumTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getValidCheckSumType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getValidCheckSumType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getValidCheckSumType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION,
				 XMLTypeFactory.eINSTANCE.createProcessingInstruction())));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getValidCheckSumType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(DbchangelogPackage.eINSTANCE.getValidCheckSumType_Mixed(),
			 FeatureMapUtil.createEntry
				(DbchangelogPackage.eINSTANCE.getValidCheckSumType_Comment(),
				 "")));
}
 
Example 42
Project: reqiftools   File: XhtmlUlDTO.java   Source Code and License 5 votes vote down vote up
public void add(XhtmlUlDTO dto) {
	if (dto.getTitle() != null) {
		XhtmlLiType li = XhtmlFactory.eINSTANCE.createXhtmlLiType();
		li.getXhtmlFlowMix().add(
				FeatureMapUtil.createTextEntry(dto.getTitle()));
		li.getUl().add(dto.getUl());
		getUl().getLi().add(li);
	}
}
 
Example 43
Project: reqiftools   File: XhtmlBuilder.java   Source Code and License 5 votes vote down vote up
public XhtmlBuilder append(final TextDTO txt) {
	XhtmlDivType d = XhtmlFactory.eINSTANCE.createXhtmlDivType();
	XhtmlPType p = XhtmlFactory.eINSTANCE.createXhtmlPType();
	final String[] lines = txt.getText().split("\n");
	for (int i = 0; i < lines.length; i++) {
		p.getXhtmlInlineMix().add(FeatureMapUtil.createTextEntry(lines[i]));
		if (i < lines.length - 1)
			p.getBr().add(XhtmlFactory.eINSTANCE.createXhtmlBrType());
	}
	d.getP().add(p);
	this.collection.add(d);
	return this;
}
 
Example 44
Project: eclipse-avro   File: DynamicEStoreEObjectImpl.java   Source Code and License 5 votes vote down vote up
@Override
public Object dynamicGet(int dynamicFeatureID)
{
  Object result = eSettings[dynamicFeatureID];
  if (result == null)
  {
    EStructuralFeature eStructuralFeature = eDynamicFeature(dynamicFeatureID);
    if (!eStructuralFeature.isTransient())
    {
      if (FeatureMapUtil.isFeatureMap(eStructuralFeature))
      {
        eSettings[dynamicFeatureID] = result = createFeatureMap(eStructuralFeature);
      }
      else if (eStructuralFeature.isMany())
      {
        eSettings[dynamicFeatureID] = result = createList(eStructuralFeature);
      }
      else
      {
        result = eStore().get(this, eStructuralFeature, InternalEObject.EStore.NO_INDEX);
        if (eIsCaching())
        {
          eSettings[dynamicFeatureID] = result;
        }
      }
    }
  }
  return result;
}
 
Example 45
Project: eclipse-avro   File: EStoreEObjectImpl.java   Source Code and License 5 votes vote down vote up
public Object dynamicGet(int dynamicFeatureID)
{
  Object result = eSettings[dynamicFeatureID];
  if (result == null)
  {
    EStructuralFeature eStructuralFeature = eDynamicFeature(dynamicFeatureID);
    if (!eStructuralFeature.isTransient())
    {
      if (FeatureMapUtil.isFeatureMap(eStructuralFeature))
      {
        eSettings[dynamicFeatureID] = result = createFeatureMap(eStructuralFeature);
      }
      else if (eStructuralFeature.isMany())
      {
        eSettings[dynamicFeatureID] = result = createList(eStructuralFeature);
      }
      else
      {
        result = eStore().get(this, eStructuralFeature, InternalEObject.EStore.NO_INDEX);
        if (eIsCaching())
        {
          eSettings[dynamicFeatureID] = result;
        }
      }
    }
  }
  return result;
}
 
Example 46
Project: eclipse-avro   File: MinimalEStoreEObjectImpl.java   Source Code and License 5 votes vote down vote up
@Override
public Object dynamicGet(int dynamicFeatureID)
{
  Object[] eSettings = eDynamicSettings();
  Object result = eSettings[dynamicFeatureID];
  if (result == null)
  {
    EStructuralFeature eStructuralFeature = eDynamicFeature(dynamicFeatureID);
    if (!eStructuralFeature.isTransient())
    {
      if (FeatureMapUtil.isFeatureMap(eStructuralFeature))
      {
        eSettings[dynamicFeatureID] = result = createFeatureMap(eStructuralFeature);
      }
      else if (eStructuralFeature.isMany())
      {
        eSettings[dynamicFeatureID] = result = createList(eStructuralFeature);
      }
      else
      {
        result = eStore().get(this, eStructuralFeature, InternalEObject.EStore.NO_INDEX);
        if (eIsCaching())
        {
          eSettings[dynamicFeatureID] = result;
        }
      }
    }
  }
  return result;
}
 
Example 47
Project: eclipse-avro   File: EAttributeImpl.java   Source Code and License 5 votes vote down vote up
@Override
public boolean isMany()
{
  switch (effectiveIsMany)
  {
    case -1:
    {
      return true;
    }
    case 0:
    {
      int upper = getUpperBound();
      if (upper > 1 || upper == UNBOUNDED_MULTIPLICITY)
      {
        effectiveIsMany = -1;
        return true;
      }
      else 
      {
        EClassifier eType = getEType();
        if (eType != null && FeatureMapUtil.isFeatureMapEntry(eType))
        {
          effectiveIsMany = -1;
          return true;
        }
        else
        {
          effectiveIsMany = 1;
          return false;
        }
      }
    }
    default:
    case 1:
    {
      return false;
    }
  }
}
 
Example 48
Project: citygml4emf   File: FirmNameTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(XALPackage.eINSTANCE.getFirmNameType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(XALPackage.eINSTANCE.getFirmNameType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(XALPackage.eINSTANCE.getFirmNameType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION,
				 XMLTypeFactory.eINSTANCE.createProcessingInstruction())));

	newChildDescriptors.add
		(createChildParameter
			(XALPackage.eINSTANCE.getFirmNameType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
				 "")));
}
 
Example 49
Project: citygml4emf   File: AbstractGeneralConversionTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) {
	Object childFeature = feature;
	Object childObject = child;

	if (childFeature instanceof EStructuralFeature && FeatureMapUtil.isFeatureMap((EStructuralFeature)childFeature)) {
		FeatureMap.Entry entry = (FeatureMap.Entry)childObject;
		childFeature = entry.getEStructuralFeature();
		childObject = entry.getValue();
	}

	boolean qualify =
		childFeature == GmlPackage.eINSTANCE.getAbstractGMLType_Description() ||
		childFeature == GmlPackage.eINSTANCE.getAbstractCoordinateOperationType_Remarks() ||
		childFeature == GmlPackage.eINSTANCE.getAbstractGMLType_Name() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_CoordinateOperationName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_CsName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_DatumName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_EllipsoidName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_GroupName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_MeridianName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_MethodName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_ParameterName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_SrsName() ||
		childFeature == GmlPackage.eINSTANCE.getAbstractCoordinateOperationBaseType_CoordinateOperationName() ||
		childFeature == GmlPackage.eINSTANCE.getAbstractCoordinateOperationType_SourceCRS() ||
		childFeature == GmlPackage.eINSTANCE.getAbstractCoordinateOperationType_TargetCRS();

	if (qualify) {
		return getString
			("_UI_CreateChild_text2",
			 new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
	}
	return super.getCreateChildText(owner, feature, child, selection);
}
 
Example 50
Project: citygml4emf   File: VerticalCRSTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) {
	Object childFeature = feature;
	Object childObject = child;

	if (childFeature instanceof EStructuralFeature && FeatureMapUtil.isFeatureMap((EStructuralFeature)childFeature)) {
		FeatureMap.Entry entry = (FeatureMap.Entry)childObject;
		childFeature = entry.getEStructuralFeature();
		childObject = entry.getValue();
	}

	boolean qualify =
		childFeature == GmlPackage.eINSTANCE.getAbstractGMLType_Description() ||
		childFeature == GmlPackage.eINSTANCE.getAbstractReferenceSystemType_Remarks() ||
		childFeature == GmlPackage.eINSTANCE.getAbstractGMLType_Name() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_CoordinateOperationName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_CsName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_DatumName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_EllipsoidName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_GroupName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_MeridianName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_MethodName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_ParameterName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_SrsName() ||
		childFeature == GmlPackage.eINSTANCE.getAbstractReferenceSystemBaseType_SrsName();

	if (qualify) {
		return getString
			("_UI_CreateChild_text2",
			 new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
	}
	return super.getCreateChildText(owner, feature, child, selection);
}
 
Example 51
Project: citygml4emf   File: LargeMailUserNameTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(XALPackage.eINSTANCE.getLargeMailUserNameType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(XALPackage.eINSTANCE.getLargeMailUserNameType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(XALPackage.eINSTANCE.getLargeMailUserNameType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION,
				 XMLTypeFactory.eINSTANCE.createProcessingInstruction())));

	newChildDescriptors.add
		(createChildParameter
			(XALPackage.eINSTANCE.getLargeMailUserNameType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
				 "")));
}
 
Example 52
Project: citygml4emf   File: TimeCoordinateSystemTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) {
	Object childFeature = feature;
	Object childObject = child;

	if (childFeature instanceof EStructuralFeature && FeatureMapUtil.isFeatureMap((EStructuralFeature)childFeature)) {
		FeatureMap.Entry entry = (FeatureMap.Entry)childObject;
		childFeature = entry.getEStructuralFeature();
		childObject = entry.getValue();
	}

	boolean qualify =
		childFeature == GmlPackage.eINSTANCE.getAbstractGMLType_Name() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_CoordinateOperationName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_CsName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_DatumName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_EllipsoidName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_GroupName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_MeridianName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_MethodName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_ParameterName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_SrsName();

	if (qualify) {
		return getString
			("_UI_CreateChild_text2",
			 new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
	}
	return super.getCreateChildText(owner, feature, child, selection);
}
 
Example 53
Project: citygml4emf   File: PremiseNumberSuffixTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(XALPackage.eINSTANCE.getPremiseNumberSuffixType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(XALPackage.eINSTANCE.getPremiseNumberSuffixType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(XALPackage.eINSTANCE.getPremiseNumberSuffixType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION,
				 XMLTypeFactory.eINSTANCE.createProcessingInstruction())));

	newChildDescriptors.add
		(createChildParameter
			(XALPackage.eINSTANCE.getPremiseNumberSuffixType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
				 "")));
}
 
Example 54
Project: citygml4emf   File: PolarCSTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) {
	Object childFeature = feature;
	Object childObject = child;

	if (childFeature instanceof EStructuralFeature && FeatureMapUtil.isFeatureMap((EStructuralFeature)childFeature)) {
		FeatureMap.Entry entry = (FeatureMap.Entry)childObject;
		childFeature = entry.getEStructuralFeature();
		childObject = entry.getValue();
	}

	boolean qualify =
		childFeature == GmlPackage.eINSTANCE.getAbstractGMLType_Description() ||
		childFeature == GmlPackage.eINSTANCE.getAbstractCoordinateSystemType_Remarks() ||
		childFeature == GmlPackage.eINSTANCE.getAbstractGMLType_Name() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_CoordinateOperationName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_CsName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_DatumName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_EllipsoidName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_GroupName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_MeridianName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_MethodName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_ParameterName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_SrsName() ||
		childFeature == GmlPackage.eINSTANCE.getAbstractCoordinateSystemBaseType_CsName();

	if (qualify) {
		return getString
			("_UI_CreateChild_text2",
			 new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
	}
	return super.getCreateChildText(owner, feature, child, selection);
}
 
Example 55
Project: citygml4emf   File: AbstractReferenceSystemBaseTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) {
	Object childFeature = feature;
	Object childObject = child;

	if (childFeature instanceof EStructuralFeature && FeatureMapUtil.isFeatureMap((EStructuralFeature)childFeature)) {
		FeatureMap.Entry entry = (FeatureMap.Entry)childObject;
		childFeature = entry.getEStructuralFeature();
		childObject = entry.getValue();
	}

	boolean qualify =
		childFeature == GmlPackage.eINSTANCE.getAbstractGMLType_Name() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_CoordinateOperationName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_CsName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_DatumName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_EllipsoidName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_GroupName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_MeridianName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_MethodName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_ParameterName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_SrsName() ||
		childFeature == GmlPackage.eINSTANCE.getAbstractReferenceSystemBaseType_SrsName();

	if (qualify) {
		return getString
			("_UI_CreateChild_text2",
			 new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
	}
	return super.getCreateChildText(owner, feature, child, selection);
}
 
Example 56
Project: citygml4emf   File: LocationPropertyTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) {
	Object childFeature = feature;
	Object childObject = child;

	if (childFeature instanceof EStructuralFeature && FeatureMapUtil.isFeatureMap((EStructuralFeature)childFeature)) {
		FeatureMap.Entry entry = (FeatureMap.Entry)childObject;
		childFeature = entry.getEStructuralFeature();
		childObject = entry.getValue();
	}

	boolean qualify =
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_Grid() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_RectifiedGrid() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_OrientableSurface() ||
		childFeature == TexturedsurfacePackage.Literals.DOCUMENT_ROOT__TEXTURED_SURFACE ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_PolyhedralSurface() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_Surface1() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_TriangulatedSurface() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_Tin();

	if (qualify) {
		return getString
			("_UI_CreateChild_text2",
			 new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
	}
	return super.getCreateChildText(owner, feature, child, selection);
}
 
Example 57
Project: citygml4emf   File: AbstractTextureParameterizationTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) {
	Object childFeature = feature;
	Object childObject = child;

	if (childFeature instanceof EStructuralFeature && FeatureMapUtil.isFeatureMap((EStructuralFeature)childFeature)) {
		FeatureMap.Entry entry = (FeatureMap.Entry)childObject;
		childFeature = entry.getEStructuralFeature();
		childObject = entry.getValue();
	}

	boolean qualify =
		childFeature == GmlPackage.eINSTANCE.getAbstractGMLType_Name() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_CoordinateOperationName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_CsName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_DatumName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_EllipsoidName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_GroupName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_MeridianName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_MethodName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_ParameterName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_SrsName();

	if (qualify) {
		return getString
			("_UI_CreateChild_text2",
			 new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
	}
	return super.getCreateChildText(owner, feature, child, selection);
}
 
Example 58
Project: citygml4emf   File: GeneralConversionRefTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(GmlPackage.eINSTANCE.getGeneralConversionRefType_GeneralConversionGroup(),
			 FeatureMapUtil.createEntry
				(GmlPackage.eINSTANCE.getDocumentRoot_Conversion(),
				 GmlFactory.eINSTANCE.createConversionType())));
}
 
Example 59
Project: citygml4emf   File: SubPremiseNumberSuffixTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
 * that can be created under this object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
	super.collectNewChildDescriptors(newChildDescriptors, object);

	newChildDescriptors.add
		(createChildParameter
			(XALPackage.eINSTANCE.getSubPremiseNumberSuffixType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(XALPackage.eINSTANCE.getSubPremiseNumberSuffixType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
				 "")));

	newChildDescriptors.add
		(createChildParameter
			(XALPackage.eINSTANCE.getSubPremiseNumberSuffixType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION,
				 XMLTypeFactory.eINSTANCE.createProcessingInstruction())));

	newChildDescriptors.add
		(createChildParameter
			(XALPackage.eINSTANCE.getSubPremiseNumberSuffixType_Mixed(),
			 FeatureMapUtil.createEntry
				(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
				 "")));
}
 
Example 60
Project: citygml4emf   File: AbstractWaterObjectTypeItemProvider.java   Source Code and License 5 votes vote down vote up
/**
 * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) {
	Object childFeature = feature;
	Object childObject = child;

	if (childFeature instanceof EStructuralFeature && FeatureMapUtil.isFeatureMap((EStructuralFeature)childFeature)) {
		FeatureMap.Entry entry = (FeatureMap.Entry)childObject;
		childFeature = entry.getEStructuralFeature();
		childObject = entry.getValue();
	}

	boolean qualify =
		childFeature == GmlPackage.eINSTANCE.getAbstractGMLType_Name() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_CoordinateOperationName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_CsName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_DatumName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_EllipsoidName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_GroupName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_MeridianName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_MethodName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_ParameterName() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_SrsName() ||
		childFeature == GmlPackage.eINSTANCE.getAbstractFeatureType_Location() ||
		childFeature == GmlPackage.eINSTANCE.getDocumentRoot_PriorityLocation();

	if (qualify) {
		return getString
			("_UI_CreateChild_text2",
			 new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
	}
	return super.getCreateChildText(owner, feature, child, selection);
}