本文整理汇总了Java中org.eclipse.emf.ecore.util.FeatureMapUtil.isFeatureMap方法的典型用法代码示例。如果您正苦于以下问题:Java FeatureMapUtil.isFeatureMap方法的具体用法?Java FeatureMapUtil.isFeatureMap怎么用?Java FeatureMapUtil.isFeatureMap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.emf.ecore.util.FeatureMapUtil
的用法示例。
在下文中一共展示了FeatureMapUtil.isFeatureMap方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: scanNext
import org.eclipse.emf.ecore.util.FeatureMapUtil; //导入方法依赖的package包/类
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;
}
示例2: scanPrevious
import org.eclipse.emf.ecore.util.FeatureMapUtil; //导入方法依赖的package包/类
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;
}
示例3: eOpenGet
import org.eclipse.emf.ecore.util.FeatureMapUtil; //导入方法依赖的package包/类
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");
}
}
示例4: eOpenSet
import org.eclipse.emf.ecore.util.FeatureMapUtil; //导入方法依赖的package包/类
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");
}
}
示例5: eOpenUnset
import org.eclipse.emf.ecore.util.FeatureMapUtil; //导入方法依赖的package包/类
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");
}
}
示例6: eOpenIsSet
import org.eclipse.emf.ecore.util.FeatureMapUtil; //导入方法依赖的package包/类
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");
}
}
示例7: getCreateChildText
import org.eclipse.emf.ecore.util.FeatureMapUtil; //导入方法依赖的package包/类
/**
* 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.getArcStringByBulgeType_PointProperty() ||
childFeature == GmlPackage.eINSTANCE.getArcStringByBulgeType_PointRep();
if (qualify) {
return getString
("_UI_CreateChild_text2",
new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
}
return super.getCreateChildText(owner, feature, child, selection);
}
示例8: getCreateChildText
import org.eclipse.emf.ecore.util.FeatureMapUtil; //导入方法依赖的package包/类
/**
* 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.getArcStringType_PointProperty() ||
childFeature == GmlPackage.eINSTANCE.getArcStringType_PointRep();
if (qualify) {
return getString
("_UI_CreateChild_text2",
new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
}
return super.getCreateChildText(owner, feature, child, selection);
}
示例9: getCreateChildText
import org.eclipse.emf.ecore.util.FeatureMapUtil; //导入方法依赖的package包/类
/**
* 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.getBoundingShapeType_Envelope() ||
childFeature == GmlPackage.eINSTANCE.getDocumentRoot_EnvelopeWithTimePeriod();
if (qualify) {
return getString
("_UI_CreateChild_text2",
new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
}
return super.getCreateChildText(owner, feature, child, selection);
}
示例10: haveEqualAttribute
import org.eclipse.emf.ecore.util.FeatureMapUtil; //导入方法依赖的package包/类
@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);
}
}
示例11: DerivedSubsetEObjectEList
import org.eclipse.emf.ecore.util.FeatureMapUtil; //导入方法依赖的package包/类
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));
}
}
示例12: dynamicGet
import org.eclipse.emf.ecore.util.FeatureMapUtil; //导入方法依赖的package包/类
@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;
}
示例13: dynamicGet
import org.eclipse.emf.ecore.util.FeatureMapUtil; //导入方法依赖的package包/类
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;
}
示例14: dynamicGet
import org.eclipse.emf.ecore.util.FeatureMapUtil; //导入方法依赖的package包/类
@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;
}
示例15: getCreateChildText
import org.eclipse.emf.ecore.util.FeatureMapUtil; //导入方法依赖的package包/类
/**
* 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);
}