From 6927e5eec8f4197bf92098d16df8ba9e7dde1cf5 Mon Sep 17 00:00:00 2001 From: Christian Dietrich Date: Mon, 19 Jul 2021 12:28:16 +0200 Subject: [PATCH] [eclipse/xtext-extras#704] mark JvmMember.identifier non derived + settable Signed-off-by: Christian Dietrich --- .../eclipse/xtext/common/types/JvmMember.java | 13 +++++++++++- .../common/types/impl/JvmMemberImpl.java | 20 +++++++++++++++++++ .../common/types/impl/TypesPackageImpl.java | 2 +- .../model/JavaVMTypes.ecore | 2 +- 4 files changed, 34 insertions(+), 3 deletions(-) diff --git a/org.eclipse.xtext.common.types/emf-gen/org/eclipse/xtext/common/types/JvmMember.java b/org.eclipse.xtext.common.types/emf-gen/org/eclipse/xtext/common/types/JvmMember.java index 6d275e7bc4..4830bf95ff 100644 --- a/org.eclipse.xtext.common.types/emf-gen/org/eclipse/xtext/common/types/JvmMember.java +++ b/org.eclipse.xtext.common.types/emf-gen/org/eclipse/xtext/common/types/JvmMember.java @@ -107,12 +107,23 @@ public interface JvmMember extends JvmAnnotationTarget * * * @return the value of the 'Identifier' 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 Identifier}' attribute. + * + * + * @param value the new value of the 'Identifier' attribute. + * @see #getIdentifier() + * @generated + */ + void setIdentifier(String value); + /** * Returns the value of the 'Deprecated' attribute. * diff --git a/org.eclipse.xtext.common.types/emf-gen/org/eclipse/xtext/common/types/impl/JvmMemberImpl.java b/org.eclipse.xtext.common.types/emf-gen/org/eclipse/xtext/common/types/impl/JvmMemberImpl.java index 5b45acaad4..fe77d661ee 100644 --- a/org.eclipse.xtext.common.types/emf-gen/org/eclipse/xtext/common/types/impl/JvmMemberImpl.java +++ b/org.eclipse.xtext.common.types/emf-gen/org/eclipse/xtext/common/types/impl/JvmMemberImpl.java @@ -260,6 +260,20 @@ public String getIdentifier() return identifier; } + /** + * + * + * @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)); + } + /** * * @@ -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; @@ -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; diff --git a/org.eclipse.xtext.common.types/emf-gen/org/eclipse/xtext/common/types/impl/TypesPackageImpl.java b/org.eclipse.xtext.common.types/emf-gen/org/eclipse/xtext/common/types/impl/TypesPackageImpl.java index a47f1f236f..01285f4702 100644 --- a/org.eclipse.xtext.common.types/emf-gen/org/eclipse/xtext/common/types/impl/TypesPackageImpl.java +++ b/org.eclipse.xtext.common.types/emf-gen/org/eclipse/xtext/common/types/impl/TypesPackageImpl.java @@ -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); diff --git a/org.eclipse.xtext.common.types/model/JavaVMTypes.ecore b/org.eclipse.xtext.common.types/model/JavaVMTypes.ecore index f57db6a1c8..942d3a33ab 100644 --- a/org.eclipse.xtext.common.types/model/JavaVMTypes.ecore +++ b/org.eclipse.xtext.common.types/model/JavaVMTypes.ecore @@ -211,7 +211,7 @@ + transient="true"/>