public boolean reconcile() { EStructuralFeature eFeature = getEcoreFeature(); if (eFeature == null || eFeature.eIsProxy() || eFeature.eResource() == null) { return false; } else { return true; } }
public boolean reconcile() { EStructuralFeature eFeature = getEcoreFeature(); if (eFeature == null || eFeature.eIsProxy() || eFeature.eResource() == null) { return false; } else { return true; } }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EStructuralFeature getFeature() { if (feature != null && feature.eIsProxy()) { EStructuralFeature oldFeature = feature; feature = (EStructuralFeature)eResolveProxy((InternalEObject)feature); if (feature != oldFeature) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, InstantiationPackage.IMPLICIT_ALLOCATION__FEATURE, oldFeature, feature)); } } return feature; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public void setFeature(EStructuralFeature newFeature) { EStructuralFeature oldFeature = basicGetFeature(); feature = newFeature; featureName = null; if (feature != null && feature.eIsProxy()) eFlags |= EPROXY_FEATURECHANGE; else eFlags &= ~EPROXY_FEATURECHANGE; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ChangePackage.FEATURE_CHANGE__FEATURE, oldFeature, newFeature)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public void setFeature(EStructuralFeature newFeature) { EStructuralFeature oldFeature = basicGetFeature(); feature = newFeature; featureName = null; if (feature != null && feature.eIsProxy()) eFlags |= EPROXY_FEATURECHANGE; else eFlags &= ~EPROXY_FEATURECHANGE; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ChangePackage.FEATURE_CHANGE__FEATURE, oldFeature, newFeature)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EStructuralFeature getFeatureGen() { if (feature != null && feature.eIsProxy()) { InternalEObject oldFeature = (InternalEObject)feature; feature = (EStructuralFeature)eResolveProxy(oldFeature); if (feature != oldFeature) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangePackage.LIST_CHANGE__FEATURE, oldFeature, feature)); } } return feature; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public void setFeature(EStructuralFeature newFeature) { EStructuralFeature oldFeature = basicGetFeature(); feature = newFeature; featureName = null; if (feature != null && feature.eIsProxy()) eFlags |= EPROXY_FEATURECHANGE; else eFlags &= ~EPROXY_FEATURECHANGE; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ChangePackage.FEATURE_CHANGE__FEATURE, oldFeature, newFeature)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public void setFeature(EStructuralFeature newFeature) { EStructuralFeature oldFeature = basicGetFeature(); feature = newFeature; featureName = null; if (feature != null && feature.eIsProxy()) eFlags |= EPROXY_FEATURECHANGE; else eFlags &= ~EPROXY_FEATURECHANGE; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ChangePackage.FEATURE_CHANGE__FEATURE, oldFeature, newFeature)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EStructuralFeature getRefname() { if (refname != null && refname.eIsProxy()) { InternalEObject oldRefname = (InternalEObject)refname; refname = (EStructuralFeature)eResolveProxy(oldRefname); if (refname != oldRefname) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, PatternLanguagePackage.REFERENCE_TYPE__REFNAME, oldRefname, refname)); } } return refname; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EStructuralFeature getEcoreFeature() { if (ecoreFeature != null && ecoreFeature.eIsProxy()) { InternalEObject oldEcoreFeature = (InternalEObject)ecoreFeature; ecoreFeature = (EStructuralFeature)eResolveProxy(oldEcoreFeature); if (ecoreFeature != oldEcoreFeature) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, GenModelPackage.GEN_FEATURE__ECORE_FEATURE, oldEcoreFeature, ecoreFeature)); } } return ecoreFeature; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EStructuralFeature getFeatureGen() { if (feature != null && feature.eIsProxy()) { InternalEObject oldFeature = (InternalEObject)feature; feature = (EStructuralFeature)eResolveProxy(oldFeature); if (feature != oldFeature) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangePackage.LIST_CHANGE__FEATURE, oldFeature, feature)); } } return feature; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EStructuralFeature getEcoreFeature() { if (ecoreFeature != null && ecoreFeature.eIsProxy()) { InternalEObject oldEcoreFeature = (InternalEObject)ecoreFeature; ecoreFeature = (EStructuralFeature)eResolveProxy(oldEcoreFeature); if (ecoreFeature != oldEcoreFeature) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, GenModelPackage.GEN_FEATURE__ECORE_FEATURE, oldEcoreFeature, ecoreFeature)); } } return ecoreFeature; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EStructuralFeature getRefname() { if (refname != null && refname.eIsProxy()) { InternalEObject oldRefname = (InternalEObject)refname; refname = (EStructuralFeature)eResolveProxy(oldRefname); if (refname != oldRefname) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, EMFPatternLanguagePackage.REFERENCE_TYPE__REFNAME, oldRefname, refname)); } } return refname; }
@Override public boolean isValidType(final Type type) { boolean _xblockexpression = false; { if ((type instanceof ClassType)) { final EClassifier classifier = ((ClassType)type).getClassname(); return ((classifier != null) && (!classifier.eIsProxy())); } else { if ((type instanceof ReferenceType)) { final EStructuralFeature feature = ((ReferenceType)type).getRefname(); return ((feature != null) && (!feature.eIsProxy())); } } _xblockexpression = super.isValidType(type); } return _xblockexpression; } }
@Check public void checkReferredPackages(ReferenceType type) { if (type.getRefname() == null || type.getRefname().eIsProxy()) { //If reference name is not set, do not check package return; } final EClass referredType = type.getRefname().getEContainingClass(); final EPackage referredPackage = referredType.getEPackage(); final String nsUri = Strings.emptyIfNull(referredPackage.getNsURI()); final EObject rootContainer = EcoreUtil2.getRootContainer(type); if (rootContainer instanceof PatternModel) { PatternModel model = (PatternModel) rootContainer; if (model.getImportPackages() != null && !Iterables.any(model.getImportPackages().getPackageImport(), new SamePackageUri(nsUri))) { error(String.format("Reference to an EClass %s that is not imported from EPackage %s.", referredType.getName(), nsUri), type, EMFPatternLanguagePackage.Literals.REFERENCE_TYPE__REFNAME, EMFIssueCodes.MISSING_PACKAGE_IMPORT, nsUri); } } }
@Check public void checkReferredPackages(ReferenceType type) { if (type.getRefname() == null || type.getRefname().eIsProxy()) { // If reference name is not set, do not check package return; } final EClass referredType = type.getRefname().getEContainingClass(); final EPackage referredPackage = referredType.getEPackage(); final String nsUri = Strings.emptyIfNull(referredPackage.getNsURI()); final EObject rootContainer = EcoreUtil2.getRootContainer(type); if (rootContainer instanceof PatternModel) { PatternModel model = (PatternModel) rootContainer; if (model.getImportPackages() != null && !Iterables.any(model.getImportPackages().getPackageImport(), new SamePackageUri(nsUri))) { error(String.format("Reference to an EClass %s that is not imported from EPackage %s.", referredType.getName(), nsUri), type, PatternLanguagePackage.Literals.REFERENCE_TYPE__REFNAME, IssueCodes.MISSING_PACKAGE_IMPORT, nsUri); } } }
private IInputKey extractColumnDescriptor(final EStructuralFeature feature, final int columnIndex) { if (((feature == null) || feature.eIsProxy())) { return BottomTypeKey.INSTANCE; } if ((0 == columnIndex)) { EClass _eContainingClass = feature.getEContainingClass(); return new EClassTransitiveInstancesKey(_eContainingClass); } else { if ((feature instanceof EReference)) { EClass _eReferenceType = ((EReference)feature).getEReferenceType(); return new EClassTransitiveInstancesKey(_eReferenceType); } else { EDataType _eAttributeType = ((EAttribute) feature).getEAttributeType(); return new EDataTypeInSlotsKey(_eAttributeType); } } }
for (int i = 0; i < edgeTypes.size(); i++) { EStructuralFeature feature = edgeTypes.get(i).getRefname(); if (feature != null && !feature.eIsProxy() && !comprehension.representable(feature)) { final EStructuralFeatureInstancesKey featureInputKey = new EStructuralFeatureInstancesKey(feature); if (SurrogateQueryRegistry.instance().hasSurrogateQueryFQN(featureInputKey)) {