Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Commit

Permalink
[#704] mark JvmMember.identifier non derived + settable
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Dietrich <[email protected]>
  • Loading branch information
cdietrich committed Jul 19, 2021
1 parent d234bd9 commit 6927e5e
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,23 @@ public interface JvmMember extends JvmAnnotationTarget
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Identifier</em>' attribute.
* @see #setIdentifier(String)
* @see org.eclipse.xtext.common.types.TypesPackage#getJvmMember_Identifier()
* @model transient="true" changeable="false" derived="true"
* @model transient="true"
* @generated
*/
String getIdentifier();

/**
* Sets the value of the '{@link org.eclipse.xtext.common.types.JvmMember#getIdentifier <em>Identifier</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Identifier</em>' attribute.
* @see #getIdentifier()
* @generated
*/
void setIdentifier(String value);

/**
* Returns the value of the '<em><b>Deprecated</b></em>' attribute.
* <!-- begin-user-doc -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,20 @@ public String getIdentifier()
return identifier;
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setIdentifier(String newIdentifier)
{
String oldIdentifier = identifier;
identifier = newIdentifier;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.JVM_MEMBER__IDENTIFIER, oldIdentifier, identifier));
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
Expand Down Expand Up @@ -420,6 +434,9 @@ public void eSet(int featureID, Object newValue)
case TypesPackage.JVM_MEMBER__SIMPLE_NAME:
setSimpleName((String)newValue);
return;
case TypesPackage.JVM_MEMBER__IDENTIFIER:
setIdentifier((String)newValue);
return;
case TypesPackage.JVM_MEMBER__DEPRECATED:
setDeprecated((Boolean)newValue);
return;
Expand All @@ -446,6 +463,9 @@ public void eUnset(int featureID)
case TypesPackage.JVM_MEMBER__SIMPLE_NAME:
setSimpleName(SIMPLE_NAME_EDEFAULT);
return;
case TypesPackage.JVM_MEMBER__IDENTIFIER:
setIdentifier(IDENTIFIER_EDEFAULT);
return;
case TypesPackage.JVM_MEMBER__DEPRECATED:
unsetDeprecated();
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2453,7 +2453,7 @@ public void initializePackageContents()
initEReference(getJvmMember_DeclaringType(), this.getJvmDeclaredType(), this.getJvmDeclaredType_Members(), "declaringType", null, 0, 1, JvmMember.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getJvmMember_Visibility(), this.getJvmVisibility(), "visibility", null, 0, 1, JvmMember.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getJvmMember_SimpleName(), ecorePackage.getEString(), "simpleName", null, 0, 1, JvmMember.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getJvmMember_Identifier(), ecorePackage.getEString(), "identifier", null, 0, 1, JvmMember.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
initEAttribute(getJvmMember_Identifier(), ecorePackage.getEString(), "identifier", null, 0, 1, JvmMember.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getJvmMember_Deprecated(), ecorePackage.getEBoolean(), "deprecated", null, 0, 1, JvmMember.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

op = addEOperation(jvmMemberEClass, null, "internalSetIdentifier", 0, 1, IS_UNIQUE, IS_ORDERED);
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.xtext.common.types/model/JavaVMTypes.ecore
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="visibility" eType="#//JvmVisibility"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="simpleName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="identifier" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
changeable="false" transient="true" derived="true"/>
transient="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="deprecated" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
unsettable="true"/>
</eClassifiers>
Expand Down

0 comments on commit 6927e5e

Please sign in to comment.