@Override public String getLegacyImportSyntax(XImportDeclaration importDeclaration) { List<INode> list = NodeModelUtils.findNodesForFeature(importDeclaration, XtypePackage.Literals.XIMPORT_DECLARATION__IMPORTED_TYPE); if (list.isEmpty()) { return null; } INode singleNode = list.get(0); if (singleNode.getText().indexOf('$') < 0) { return null; } StringBuilder sb = new StringBuilder(); for(ILeafNode node: singleNode.getLeafNodes()) { if (!node.isHidden()) { sb.append(node.getText().replace("^", "")); } } return sb.toString(); }
protected boolean internalFindPathToImportSection(LinkedList<EObject> pathToImportSection, Set<ParserRule> seenRules, EObject ruleOrRuleCall) { ParserRule rule = null; EClassifier returnType = null; if(ruleOrRuleCall instanceof ParserRule) rule = (ParserRule) ruleOrRuleCall; else rule = (ParserRule) ((RuleCall) ruleOrRuleCall).getRule(); if(seenRules.contains(rule)) return false; seenRules.add(rule); pathToImportSection.addLast(ruleOrRuleCall); returnType = rule.getType().getClassifier(); if(returnType instanceof EClass && XtypePackage.Literals.XIMPORT_SECTION.isSuperTypeOf((EClass) returnType)) { return true; } for(RuleCall containedRuleCall: GrammarUtil.containedRuleCalls(rule)) { if(containedRuleCall.getRule() instanceof ParserRule) if(internalFindPathToImportSection(pathToImportSection, seenRules, containedRuleCall)) { return true; } } pathToImportSection.removeLast(); return false; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setReturnType(JvmTypeReference newReturnType) { if (newReturnType != returnType) { NotificationChain msgs = null; if (returnType != null) msgs = ((InternalEObject)returnType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - XtypePackage.XFUNCTION_TYPE_REF__RETURN_TYPE, null, msgs); if (newReturnType != null) msgs = ((InternalEObject)newReturnType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - XtypePackage.XFUNCTION_TYPE_REF__RETURN_TYPE, null, msgs); msgs = basicSetReturnType(newReturnType, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, XtypePackage.XFUNCTION_TYPE_REF__RETURN_TYPE, newReturnType, newReturnType)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case XtypePackage.XFUNCTION_TYPE_REF__PARAM_TYPES: return getParamTypes(); case XtypePackage.XFUNCTION_TYPE_REF__RETURN_TYPE: return getReturnType(); case XtypePackage.XFUNCTION_TYPE_REF__TYPE: if (resolve) return getType(); return basicGetType(); case XtypePackage.XFUNCTION_TYPE_REF__INSTANCE_CONTEXT: return isInstanceContext(); } return super.eGet(featureID, resolve, coreType); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case XtypePackage.XFUNCTION_TYPE_REF__PARAM_TYPES: getParamTypes().clear(); getParamTypes().addAll((Collection<? extends JvmTypeReference>)newValue); return; case XtypePackage.XFUNCTION_TYPE_REF__RETURN_TYPE: setReturnType((JvmTypeReference)newValue); return; case XtypePackage.XFUNCTION_TYPE_REF__TYPE: setType((JvmType)newValue); return; case XtypePackage.XFUNCTION_TYPE_REF__INSTANCE_CONTEXT: setInstanceContext((Boolean)newValue); return; } super.eSet(featureID, newValue); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case XtypePackage.XFUNCTION_TYPE_REF__PARAM_TYPES: getParamTypes().clear(); return; case XtypePackage.XFUNCTION_TYPE_REF__RETURN_TYPE: setReturnType((JvmTypeReference)null); return; case XtypePackage.XFUNCTION_TYPE_REF__TYPE: setType((JvmType)null); return; case XtypePackage.XFUNCTION_TYPE_REF__INSTANCE_CONTEXT: setInstanceContext(INSTANCE_CONTEXT_EDEFAULT); return; } super.eUnset(featureID); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case XtypePackage.XFUNCTION_TYPE_REF__PARAM_TYPES: return paramTypes != null && !paramTypes.isEmpty(); case XtypePackage.XFUNCTION_TYPE_REF__RETURN_TYPE: return returnType != null; case XtypePackage.XFUNCTION_TYPE_REF__TYPE: return type != null; case XtypePackage.XFUNCTION_TYPE_REF__INSTANCE_CONTEXT: return instanceContext != INSTANCE_CONTEXT_EDEFAULT; } return super.eIsSet(featureID); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case XtypePackage.XIMPORT_DECLARATION__WILDCARD: return isWildcard(); case XtypePackage.XIMPORT_DECLARATION__EXTENSION: return isExtension(); case XtypePackage.XIMPORT_DECLARATION__STATIC: return isStatic(); case XtypePackage.XIMPORT_DECLARATION__IMPORTED_TYPE: if (resolve) return getImportedType(); return basicGetImportedType(); case XtypePackage.XIMPORT_DECLARATION__MEMBER_NAME: return getMemberName(); case XtypePackage.XIMPORT_DECLARATION__IMPORTED_NAMESPACE: return getImportedNamespace(); } return super.eGet(featureID, resolve, coreType); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case XtypePackage.XIMPORT_DECLARATION__WILDCARD: return wildcard != WILDCARD_EDEFAULT; case XtypePackage.XIMPORT_DECLARATION__EXTENSION: return extension != EXTENSION_EDEFAULT; case XtypePackage.XIMPORT_DECLARATION__STATIC: return static_ != STATIC_EDEFAULT; case XtypePackage.XIMPORT_DECLARATION__IMPORTED_TYPE: return importedType != null; case XtypePackage.XIMPORT_DECLARATION__MEMBER_NAME: return MEMBER_NAME_EDEFAULT == null ? memberName != null : !MEMBER_NAME_EDEFAULT.equals(memberName); case XtypePackage.XIMPORT_DECLARATION__IMPORTED_NAMESPACE: return IMPORTED_NAMESPACE_EDEFAULT == null ? importedNamespace != null : !IMPORTED_NAMESPACE_EDEFAULT.equals(importedNamespace); } return super.eIsSet(featureID); }
/** * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. * * <p>This method is used to initialize {@link PureXbasePackage#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() * @generated */ public static PureXbasePackage init() { if (isInited) return (PureXbasePackage)EPackage.Registry.INSTANCE.getEPackage(PureXbasePackage.eNS_URI); // Obtain or create and register package PureXbasePackageImpl thePureXbasePackage = (PureXbasePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PureXbasePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new PureXbasePackageImpl()); isInited = true; // Initialize simple dependencies XbasePackage.eINSTANCE.eClass(); XtypePackage.eINSTANCE.eClass(); // Create package meta-data objects thePureXbasePackage.createPackageContents(); // Initialize created meta-data thePureXbasePackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed thePureXbasePackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(PureXbasePackage.eNS_URI, thePureXbasePackage); return thePureXbasePackage; }
/** * Complete the initialization of the package and its meta-model. This * method is guarded to have no affect on any invocation but its first. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void initializePackageContents() { if (isInitialized) return; isInitialized = true; // Initialize package setName(eNAME); setNsPrefix(eNS_PREFIX); setNsURI(eNS_URI); // Obtain other dependent packages XtypePackage theXtypePackage = (XtypePackage)EPackage.Registry.INSTANCE.getEPackage(XtypePackage.eNS_URI); XbasePackage theXbasePackage = (XbasePackage)EPackage.Registry.INSTANCE.getEPackage(XbasePackage.eNS_URI); // Create type parameters // Set bounds for type parameters // Add supertypes to classes // Initialize classes and features; add operations and parameters initEClass(modelEClass, Model.class, "Model", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getModel_ImportSection(), theXtypePackage.getXImportSection(), null, "importSection", null, 0, 1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getModel_Block(), theXbasePackage.getXBlockExpression(), null, "block", null, 0, 1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); // Create resource createResource(eNS_URI); }
@Check public void checkDeprecated(XImportDeclaration decl) { if (!isIgnored(DEPRECATED_MEMBER_REFERENCE)) { JvmType jvmType = decl.getImportedType(); checkDeprecated( jvmType, decl, XtypePackage.Literals.XIMPORT_DECLARATION__IMPORTED_TYPE); } }
@Override public String getImportedTypeName() { String result = getImportedNamespace(); if (result == null) { if (this.eIsSet(XtypePackage.Literals.XIMPORT_DECLARATION__IMPORTED_TYPE)) { JvmType unresolvedType = (JvmType) this.eGet(XtypePackage.Literals.XIMPORT_DECLARATION__IMPORTED_TYPE, false); if(!unresolvedType.eIsProxy()) return unresolvedType.getIdentifier(); List<INode> list = NodeModelUtils.findNodesForFeature(this, XtypePackage.Literals.XIMPORT_DECLARATION__IMPORTED_TYPE); StringBuilder sb = new StringBuilder(); for (INode iNode : list) { sb.append(NodeModelUtils.getTokenText(iNode).replace("^", "")); } result = sb.toString().replace(" ", ""); if (isStatic()) { return trim(result, 1); } return result; } return null; } if (isWildcard()) { return trim(result, 2); } return result; }
/** * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. * * <p>This method is used to initialize {@link XbasePackage#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() * @generated */ public static XbasePackage init() { if (isInited) return (XbasePackage)EPackage.Registry.INSTANCE.getEPackage(XbasePackage.eNS_URI); // Obtain or create and register package XbasePackageImpl theXbasePackage = (XbasePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof XbasePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new XbasePackageImpl()); isInited = true; // Initialize simple dependencies TypesPackage.eINSTANCE.eClass(); // Obtain or create and register interdependencies XAnnotationsPackageImpl theXAnnotationsPackage = (XAnnotationsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(XAnnotationsPackage.eNS_URI) instanceof XAnnotationsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(XAnnotationsPackage.eNS_URI) : XAnnotationsPackage.eINSTANCE); XtypePackageImpl theXtypePackage = (XtypePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(XtypePackage.eNS_URI) instanceof XtypePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(XtypePackage.eNS_URI) : XtypePackage.eINSTANCE); // Create package meta-data objects theXbasePackage.createPackageContents(); theXAnnotationsPackage.createPackageContents(); theXtypePackage.createPackageContents(); // Initialize created meta-data theXbasePackage.initializePackageContents(); theXAnnotationsPackage.initializePackageContents(); theXtypePackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed theXbasePackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(XbasePackage.eNS_URI, theXbasePackage); return theXbasePackage; }
/** * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. * * <p>This method is used to initialize {@link XAnnotationsPackage#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() * @generated */ public static XAnnotationsPackage init() { if (isInited) return (XAnnotationsPackage)EPackage.Registry.INSTANCE.getEPackage(XAnnotationsPackage.eNS_URI); // Obtain or create and register package XAnnotationsPackageImpl theXAnnotationsPackage = (XAnnotationsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof XAnnotationsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new XAnnotationsPackageImpl()); isInited = true; // Initialize simple dependencies TypesPackage.eINSTANCE.eClass(); // Obtain or create and register interdependencies XtypePackageImpl theXtypePackage = (XtypePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(XtypePackage.eNS_URI) instanceof XtypePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(XtypePackage.eNS_URI) : XtypePackage.eINSTANCE); XbasePackageImpl theXbasePackage = (XbasePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(XbasePackage.eNS_URI) instanceof XbasePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(XbasePackage.eNS_URI) : XbasePackage.eINSTANCE); // Create package meta-data objects theXAnnotationsPackage.createPackageContents(); theXtypePackage.createPackageContents(); theXbasePackage.createPackageContents(); // Initialize created meta-data theXAnnotationsPackage.initializePackageContents(); theXtypePackage.initializePackageContents(); theXbasePackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed theXAnnotationsPackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(XAnnotationsPackage.eNS_URI, theXAnnotationsPackage); return theXAnnotationsPackage; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<JvmTypeReference> getParamTypes() { if (paramTypes == null) { paramTypes = new EObjectContainmentEList<JvmTypeReference>(JvmTypeReference.class, this, XtypePackage.XFUNCTION_TYPE_REF__PARAM_TYPES); } return paramTypes; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetReturnType(JvmTypeReference newReturnType, NotificationChain msgs) { JvmTypeReference oldReturnType = returnType; returnType = newReturnType; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, XtypePackage.XFUNCTION_TYPE_REF__RETURN_TYPE, oldReturnType, newReturnType); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setType(JvmType newType) { JvmType oldType = type; type = newType; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, XtypePackage.XFUNCTION_TYPE_REF__TYPE, oldType, type)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setInstanceContext(boolean newInstanceContext) { boolean oldInstanceContext = instanceContext; instanceContext = newInstanceContext; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, XtypePackage.XFUNCTION_TYPE_REF__INSTANCE_CONTEXT, oldInstanceContext, instanceContext)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case XtypePackage.XFUNCTION_TYPE_REF__PARAM_TYPES: return ((InternalEList<?>)getParamTypes()).basicRemove(otherEnd, msgs); case XtypePackage.XFUNCTION_TYPE_REF__RETURN_TYPE: return basicSetReturnType(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<XImportDeclaration> getImportDeclarations() { if (importDeclarations == null) { importDeclarations = new EObjectContainmentEList<XImportDeclaration>(XImportDeclaration.class, this, XtypePackage.XIMPORT_SECTION__IMPORT_DECLARATIONS); } return importDeclarations; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case XtypePackage.XIMPORT_SECTION__IMPORT_DECLARATIONS: return ((InternalEList<?>)getImportDeclarations()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case XtypePackage.XIMPORT_SECTION__IMPORT_DECLARATIONS: return getImportDeclarations(); } return super.eGet(featureID, resolve, coreType); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case XtypePackage.XIMPORT_SECTION__IMPORT_DECLARATIONS: getImportDeclarations().clear(); getImportDeclarations().addAll((Collection<? extends XImportDeclaration>)newValue); return; } super.eSet(featureID, newValue); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case XtypePackage.XIMPORT_SECTION__IMPORT_DECLARATIONS: getImportDeclarations().clear(); return; } super.eUnset(featureID); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case XtypePackage.XIMPORT_SECTION__IMPORT_DECLARATIONS: return importDeclarations != null && !importDeclarations.isEmpty(); } return super.eIsSet(featureID); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setTypeProvider(IJvmTypeReferenceProvider newTypeProvider) { IJvmTypeReferenceProvider oldTypeProvider = typeProvider; typeProvider = newTypeProvider; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, XtypePackage.XCOMPUTED_TYPE_REFERENCE__TYPE_PROVIDER, oldTypeProvider, typeProvider)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case XtypePackage.XCOMPUTED_TYPE_REFERENCE__TYPE_PROVIDER: return getTypeProvider(); } return super.eGet(featureID, resolve, coreType); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case XtypePackage.XCOMPUTED_TYPE_REFERENCE__TYPE_PROVIDER: setTypeProvider((IJvmTypeReferenceProvider)newValue); return; } super.eSet(featureID, newValue); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case XtypePackage.XCOMPUTED_TYPE_REFERENCE__TYPE_PROVIDER: setTypeProvider(TYPE_PROVIDER_EDEFAULT); return; } super.eUnset(featureID); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case XtypePackage.XCOMPUTED_TYPE_REFERENCE__TYPE_PROVIDER: return TYPE_PROVIDER_EDEFAULT == null ? typeProvider != null : !TYPE_PROVIDER_EDEFAULT.equals(typeProvider); } return super.eIsSet(featureID); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setWildcard(boolean newWildcard) { boolean oldWildcard = wildcard; wildcard = newWildcard; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, XtypePackage.XIMPORT_DECLARATION__WILDCARD, oldWildcard, wildcard)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setExtension(boolean newExtension) { boolean oldExtension = extension; extension = newExtension; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, XtypePackage.XIMPORT_DECLARATION__EXTENSION, oldExtension, extension)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setStatic(boolean newStatic) { boolean oldStatic = static_; static_ = newStatic; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, XtypePackage.XIMPORT_DECLARATION__STATIC, oldStatic, static_)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setImportedType(JvmDeclaredType newImportedType) { JvmDeclaredType oldImportedType = importedType; importedType = newImportedType; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, XtypePackage.XIMPORT_DECLARATION__IMPORTED_TYPE, oldImportedType, importedType)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setMemberName(String newMemberName) { String oldMemberName = memberName; memberName = newMemberName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, XtypePackage.XIMPORT_DECLARATION__MEMBER_NAME, oldMemberName, memberName)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setImportedNamespace(String newImportedNamespace) { String oldImportedNamespace = importedNamespace; importedNamespace = newImportedNamespace; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, XtypePackage.XIMPORT_DECLARATION__IMPORTED_NAMESPACE, oldImportedNamespace, importedNamespace)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case XtypePackage.XIMPORT_DECLARATION__WILDCARD: setWildcard((Boolean)newValue); return; case XtypePackage.XIMPORT_DECLARATION__EXTENSION: setExtension((Boolean)newValue); return; case XtypePackage.XIMPORT_DECLARATION__STATIC: setStatic((Boolean)newValue); return; case XtypePackage.XIMPORT_DECLARATION__IMPORTED_TYPE: setImportedType((JvmDeclaredType)newValue); return; case XtypePackage.XIMPORT_DECLARATION__MEMBER_NAME: setMemberName((String)newValue); return; case XtypePackage.XIMPORT_DECLARATION__IMPORTED_NAMESPACE: setImportedNamespace((String)newValue); return; } super.eSet(featureID, newValue); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case XtypePackage.XIMPORT_DECLARATION__WILDCARD: setWildcard(WILDCARD_EDEFAULT); return; case XtypePackage.XIMPORT_DECLARATION__EXTENSION: setExtension(EXTENSION_EDEFAULT); return; case XtypePackage.XIMPORT_DECLARATION__STATIC: setStatic(STATIC_EDEFAULT); return; case XtypePackage.XIMPORT_DECLARATION__IMPORTED_TYPE: setImportedType((JvmDeclaredType)null); return; case XtypePackage.XIMPORT_DECLARATION__MEMBER_NAME: setMemberName(MEMBER_NAME_EDEFAULT); return; case XtypePackage.XIMPORT_DECLARATION__IMPORTED_NAMESPACE: setImportedNamespace(IMPORTED_NAMESPACE_EDEFAULT); return; } super.eUnset(featureID); }
/** * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. * * <p>This method is used to initialize {@link XtypePackage#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() * @generated */ public static XtypePackage init() { if (isInited) return (XtypePackage)EPackage.Registry.INSTANCE.getEPackage(XtypePackage.eNS_URI); // Obtain or create and register package XtypePackageImpl theXtypePackage = (XtypePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof XtypePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new XtypePackageImpl()); isInited = true; // Initialize simple dependencies TypesPackage.eINSTANCE.eClass(); // Obtain or create and register interdependencies XAnnotationsPackageImpl theXAnnotationsPackage = (XAnnotationsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(XAnnotationsPackage.eNS_URI) instanceof XAnnotationsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(XAnnotationsPackage.eNS_URI) : XAnnotationsPackage.eINSTANCE); XbasePackageImpl theXbasePackage = (XbasePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(XbasePackage.eNS_URI) instanceof XbasePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(XbasePackage.eNS_URI) : XbasePackage.eINSTANCE); // Create package meta-data objects theXtypePackage.createPackageContents(); theXAnnotationsPackage.createPackageContents(); theXbasePackage.createPackageContents(); // Initialize created meta-data theXtypePackage.initializePackageContents(); theXAnnotationsPackage.initializePackageContents(); theXbasePackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed theXtypePackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(XtypePackage.eNS_URI, theXtypePackage); return theXtypePackage; }