/** * Determines if a particular propety has been set on an eobject. * * @param eobjects The eobject. * @param property The property to check. * @return <code>true</code> if the property has been set, otherwise <code>false</code> */ public static boolean isSet(EObject eobject, String property) { EStructuralFeature feature = feature(eobject, property); return eobject.eIsSet(feature); }
} else { if (!eObject.eIsSet(feature)) { eObject.eSet(feature, value);
public boolean apply(EReference containmentRef) { return modelElement.eIsSet(containmentRef); } });
public boolean isSetMOFValue(EObject emfObject) { return feature != null && emfObject.eIsSet(feature); }
public boolean apply(EReference containmentRef) { return modelElement.eIsSet(containmentRef); } });
if (eObject.eIsSet(eStructuralFeature)) { if (eGet instanceof byte[]) { dataValue.setStringValue(new String(((byte[])eGet), Charsets.UTF_8));
for (EStructuralFeature feature : eClass.getEAllStructuralFeatures()) { String jsonKey = JsonMetadata.getJsonFieldName(feature); if (feature.isUnsettable() && !eObj.eIsSet(feature)) { continue;
/** * Determines if a particular propety has been set on an eobject. * * @param eobjects The eobject. * @param property The property to check. * * @return <code>true</code> if the property has been set, otherwise <code>false</code> */ public static boolean isSet( EObject eobject, String property ) { EStructuralFeature feature = feature( eobject, property ); return eobject.eIsSet( feature ); }
/** * Determines if a particular propety has been set on an eobject. * * @param eobjects The eobject. * @param property The property to check. * * @return <code>true</code> if the property has been set, otherwise <code>false</code> */ public static boolean isSet(EObject eobject, String property) { EStructuralFeature feature = feature(eobject, property); return eobject.eIsSet(feature); }
/** * Determines if a particular propety has been set on an eobject. * * @param eobjects The eobject. * @param property The property to check. * * @return <code>true</code> if the property has been set, otherwise <code>false</code> */ public static boolean isSet(EObject eobject, String property) { EStructuralFeature feature = feature(eobject, property); return eobject.eIsSet(feature); }
protected boolean shouldSaveFeature(EObject o, EStructuralFeature f) { return o.eIsSet(f) || keepDefaults && f.getDefaultValueLiteral() != null; }
protected boolean enumValueChanged(EObject anObject, EStructuralFeature aFeature, Object aValue) { if (!anObject.eIsSet(aFeature)) return true; Enumerator existingEnumerator = (Enumerator) anObject.eGet(aFeature); Enumerator newEnumerator = getEnumerator(aFeature, aValue); return existingEnumerator != newEnumerator; }
@Override public int size() { return eStructuralFeature.isUnsettable() ? eObject.eIsSet(eStructuralFeature) ? 1 : 0 : eObject.eGet(eStructuralFeature, false) == null ? 0 : 1; } };
@Override public int size() { return eStructuralFeature.isUnsettable() ? eObject.eIsSet(eStructuralFeature) ? 1 : 0 : eObject.eGet(eStructuralFeature, false) == null ? 0 : 1; } };
@Override public int size() { return eStructuralFeature.isUnsettable() ? eObject.eIsSet(eStructuralFeature) ? 1 : 0 : eObject.eGet(eStructuralFeature, false) == null ? 0 : 1; } };
@Override protected boolean shouldSaveFeature(EObject o, EStructuralFeature f) { return o.eIsSet(f) || (keepDefaults && f.getDefaultValueLiteral() != null && f.getLowerBound() > 0); }
private void setDefaultValues(EObject obj, Set<EReference> references, IDiagnosticProducer producer) { for (EReference ref : obj.eClass().getEAllReferences()) if (canSetDefaultValues(ref) && !references.contains(ref) && !obj.eIsSet(ref) && !ref.isDerived()) { setDefaultValue(obj, ref, producer); } }
public ValueTransient isValueTransient(EObject semanticObject, EStructuralFeature feature) { if (feature.isTransient() || !semanticObject.eIsSet(feature) || isContainerReferenceInSameResource(semanticObject, feature)) { if (defaultValueIsSerializeable(feature)) return ValueTransient.PREFERABLY; else return ValueTransient.YES; } else return ValueTransient.NO; } }
/** * Performs the command activity required for the effect. The effect of calling * <code>execute</code> when <code>canExecute</code> returns <code>false</code>, or when * <code>canExecute</code> hasn't been called, is undefined. */ public void execute() { oldIsSet_ = eObject_.eIsSet(feature_); oldValue_ = eObject_.eGet(feature_); eObject_.eSet(feature_, newValue_); if (nillable_ && newValue_ == null) eObject_.eUnset(feature_); }
@Override public ValueTransient isValueTransient(EObject semanticObject, EStructuralFeature feature) { if (feature.isTransient()) return ValueTransient.YES; boolean isSet = semanticObject.eIsSet(feature); if (defaultValueIsSerializeable(feature) && !isSet) return ValueTransient.PREFERABLY; if (legacy.isTransient(semanticObject, feature, 0)) return ValueTransient.YES; return isSet ? ValueTransient.NO : ValueTransient.YES; }