[454400] Making PackageableElement::visibility unsettable.
diff --git a/plugins/org.eclipse.uml2.uml.resources/META-INF/MANIFEST.MF b/plugins/org.eclipse.uml2.uml.resources/META-INF/MANIFEST.MF
index 12438d2..7d6de8b 100644
--- a/plugins/org.eclipse.uml2.uml.resources/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.uml2.uml.resources/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.uml2.uml.resources; singleton:=true
-Bundle-Version: 5.0.0.qualifier
+Bundle-Version: 5.0.100.qualifier
 Bundle-ClassPath: .
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.uml2.uml.resources/metamodels/UML.metamodel.uml b/plugins/org.eclipse.uml2.uml.resources/metamodels/UML.metamodel.uml
index 6154a53..3a177c7 100644
--- a/plugins/org.eclipse.uml2.uml.resources/metamodels/UML.metamodel.uml
+++ b/plugins/org.eclipse.uml2.uml.resources/metamodels/UML.metamodel.uml
@@ -17780,6 +17780,7 @@
   <Ecore:EOperation xmi:id="_64Y1cIPZEeOyLuI0bir0Bg" base_Operation="Property-isSetDefault" visibility="None"/>
   <Ecore:EOperation xmi:id="_GwdPoIPaEeOyLuI0bir0Bg" base_Operation="Property-unsetDefault" visibility="None"/>
   <Ecore:EOperation xmi:id="_6p4ogIRfEeOrzvVsV3Q4sA" base_Operation="NamedElement-clientDependency.1" operationName="getClientDependencies" visibility="None"/>
+  <Ecore:EAttribute xmi:id="_nyeDgH2aEeSVK_cyXH-KWw" isUnsettable="true" base_Property="PackageableElement-visibility"/>
   <standard:Metamodel xmi:id="_blzWQIx_EeOumeDJYV0ScA" base_Model="_0"/>
   <standard:Metaclass xmi:id="_bmO0EIx_EeOumeDJYV0ScA" base_Class="ValueSpecificationAction"/>
   <standard:Metaclass xmi:id="_bmO0EYx_EeOumeDJYV0ScA" base_Class="VariableAction"/>
diff --git a/plugins/org.eclipse.uml2.uml/model/UML.ecore b/plugins/org.eclipse.uml2.uml/model/UML.ecore
index 523c3da..ee33ded 100644
--- a/plugins/org.eclipse.uml2.uml/model/UML.ecore
+++ b/plugins/org.eclipse.uml2.uml/model/UML.ecore
@@ -2325,7 +2325,7 @@
     </eAnnotations>
     <eAnnotations source="duplicates">
       <contents xsi:type="ecore:EAttribute" name="visibility" ordered="false" eType="#//VisibilityKind"
-          defaultValueLiteral="public">
+          defaultValueLiteral="public" unsettable="true">
         <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
           <details key="documentation" value="A PackageableElement must have a visibility specified if it is owned by a Namespace. The default visibility is public.&#xA;&lt;p>From package UML::CommonStructure.&lt;/p>"/>
         </eAnnotations>
diff --git a/plugins/org.eclipse.uml2.uml/model/UML.merged.uml b/plugins/org.eclipse.uml2.uml/model/UML.merged.uml
index 31f335c..d59e2fd 100644
--- a/plugins/org.eclipse.uml2.uml/model/UML.merged.uml
+++ b/plugins/org.eclipse.uml2.uml/model/UML.merged.uml
@@ -17774,4 +17774,5 @@
   <Ecore:EOperation xmi:id="_64Y1cIPZEeOyLuI0bir0Bg" base_Operation="_f-9wMGXCEdqEJs8umHJc9g" visibility="None"/>
   <Ecore:EOperation xmi:id="_GwdPoIPaEeOyLuI0bir0Bg" base_Operation="_kGtosGXCEdqEJs8umHJc9g" visibility="None"/>
   <Ecore:EOperation xmi:id="_6p4ogIRfEeOrzvVsV3Q4sA" base_Operation="_uR4xEIRfEeOrzvVsV3Q4sA" operationName="getClientDependencies" visibility="None"/>
+  <Ecore:EAttribute xmi:id="_nyeDgH2aEeSVK_cyXH-KWw" isUnsettable="true" base_Property="_MNSdlokxEeOMQ5AKLd10lA"/>
 </xmi:XMI>
diff --git a/plugins/org.eclipse.uml2.uml/model/UML.uml b/plugins/org.eclipse.uml2.uml/model/UML.uml
index c4efe6b..f895cad 100644
--- a/plugins/org.eclipse.uml2.uml/model/UML.uml
+++ b/plugins/org.eclipse.uml2.uml/model/UML.uml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Ecore="http://www.eclipse.org/uml2/schemas/Ecore/5" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Ecore/5 pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA">
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Ecore="http://www.eclipse.org/uml2/schemas/Ecore/5" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Ecore/5 pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA">
   <uml:Model xmi:id="_o8I_sGvaEdq4DLWZOhbdEA" name="UML">
     <packageImport xmi:id="__as3cGvaEdq4DLWZOhbdEA">
       <importedPackage xmi:type="uml:Model" href="Ecore.uml#_SeWiQMX_EduPJbEsMYXjUQ"/>
@@ -1965,7 +1965,12 @@
       </ownedOperation>
     </packagedElement>
     <packagedElement xmi:type="uml:Class" xmi:id="_SnNPIGwIEdq7X4sGURiZYA" name="PackageImport"/>
-    <packagedElement xmi:type="uml:Class" xmi:id="_jKxnwGwLEdq7X4sGURiZYA" name="PackageableElement" isAbstract="true"/>
+    <packagedElement xmi:type="uml:Class" xmi:id="_jKxnwGwLEdq7X4sGURiZYA" name="PackageableElement" isAbstract="true">
+      <ownedAttribute xmi:id="_nxsncH2aEeSVK_cyXH-KWw" name="visibility" type="_AyM_oGwMEdq7X4sGURiZYA">
+        <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_nxsncX2aEeSVK_cyXH-KWw"/>
+        <defaultValue xmi:type="uml:InstanceValue" xmi:id="_CjSaoH2bEeSVK_cyXH-KWw" instance="_6pIAcH2aEeSVK_cyXH-KWw"/>
+      </ownedAttribute>
+    </packagedElement>
     <packagedElement xmi:type="uml:Class" xmi:id="_KyaPMGveEdq4DLWZOhbdEA" name="Parameter">
       <ownedAttribute xmi:id="_ZSw9sLG1EeCDe8CO90iVKQ" name="default" isDerived="true">
         <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
@@ -2760,7 +2765,9 @@
         </ownedComment>
       </ownedLiteral>
     </packagedElement>
-    <packagedElement xmi:type="uml:Enumeration" xmi:id="_AyM_oGwMEdq7X4sGURiZYA" name="VisibilityKind" visibility="private"/>
+    <packagedElement xmi:type="uml:Enumeration" xmi:id="_AyM_oGwMEdq7X4sGURiZYA" name="VisibilityKind" visibility="private">
+      <ownedLiteral xmi:id="_6pIAcH2aEeSVK_cyXH-KWw" name="public"/>
+    </packagedElement>
     <profileApplication xmi:id="_0TBYYGvaEdq4DLWZOhbdEA">
       <eAnnotations xmi:id="_0TBYYWvaEdq4DLWZOhbdEA" source="http://www.eclipse.org/uml2/2.0.0/UML">
         <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"/>
@@ -2863,4 +2870,5 @@
   <Ecore:EOperation xmi:id="_64Y1cIPZEeOyLuI0bir0Bg" base_Operation="_f-9wMGXCEdqEJs8umHJc9g" visibility="None"/>
   <Ecore:EOperation xmi:id="_GwdPoIPaEeOyLuI0bir0Bg" base_Operation="_kGtosGXCEdqEJs8umHJc9g" visibility="None"/>
   <Ecore:EOperation xmi:id="_6p4ogIRfEeOrzvVsV3Q4sA" base_Operation="_uR4xEIRfEeOrzvVsV3Q4sA" operationName="getClientDependencies" visibility="None"/>
+  <Ecore:EAttribute xmi:id="_nyeDgH2aEeSVK_cyXH-KWw" isUnsettable="true" base_Property="_nxsncH2aEeSVK_cyXH-KWw"/>
 </xmi:XMI>
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ClassifierImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ClassifierImpl.java
index c679727..654f3b4 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ClassifierImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ClassifierImpl.java
@@ -9,7 +9,7 @@
  *   IBM - initial API and implementation
  *   Kenn Hussey (Embarcadero Technologies) - 204200
  *   Kenn Hussey - 286329, 323181
- *   Kenn Hussey (CEA) - 327039, 351774, 212765, 418466
+ *   Kenn Hussey (CEA) - 327039, 351774, 212765, 418466, 454400
  *
  */
 package org.eclipse.uml2.uml.internal.impl;
@@ -692,9 +692,12 @@
 			newVisibility = VISIBILITY_EDEFAULT;
 		eFlags = eFlags & ~VISIBILITY_EFLAG
 			| newVisibility.ordinal() << VISIBILITY_EFLAG_OFFSET;
+		boolean oldVisibilityESet = (eFlags & VISIBILITY_ESETFLAG) != 0;
+		eFlags |= VISIBILITY_ESETFLAG;
 		if (eNotificationRequired())
 			eNotify(new ENotificationImpl(this, Notification.SET,
-				UMLPackage.CLASSIFIER__VISIBILITY, oldVisibility, newVisibility));
+				UMLPackage.CLASSIFIER__VISIBILITY, oldVisibility,
+				newVisibility, !oldVisibilityESet));
 	}
 
 	/**
@@ -702,8 +705,26 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	@Override
+	public void unsetVisibility() {
+		VisibilityKind oldVisibility = VISIBILITY_EFLAG_VALUES[(eFlags & VISIBILITY_EFLAG) >>> VISIBILITY_EFLAG_OFFSET];
+		boolean oldVisibilityESet = (eFlags & VISIBILITY_ESETFLAG) != 0;
+		eFlags = eFlags & ~VISIBILITY_EFLAG | VISIBILITY_EFLAG_DEFAULT;
+		eFlags &= ~VISIBILITY_ESETFLAG;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.UNSET,
+				UMLPackage.CLASSIFIER__VISIBILITY, oldVisibility,
+				VISIBILITY_EDEFAULT, oldVisibilityESet));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
 	public boolean isSetVisibility() {
-		return (eFlags & VISIBILITY_EFLAG) != VISIBILITY_EFLAG_DEFAULT;
+		return (eFlags & VISIBILITY_ESETFLAG) != 0;
 	}
 
 	/**
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InstanceSpecificationImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InstanceSpecificationImpl.java
index 9f33def..ef5cc2d 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InstanceSpecificationImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InstanceSpecificationImpl.java
@@ -9,7 +9,7 @@
  *   IBM - initial API and implementation
  *   Kenn Hussey (Embarcadero Technologies) - 204200
  *   Kenn Hussey - 286329, 323181
- *   Kenn Hussey (CEA) - 327039, 351774, 418466
+ *   Kenn Hussey (CEA) - 327039, 351774, 418466, 454400
  *
  */
 package org.eclipse.uml2.uml.internal.impl;
@@ -338,10 +338,12 @@
 			newVisibility = VISIBILITY_EDEFAULT;
 		eFlags = eFlags & ~VISIBILITY_EFLAG
 			| newVisibility.ordinal() << VISIBILITY_EFLAG_OFFSET;
+		boolean oldVisibilityESet = (eFlags & VISIBILITY_ESETFLAG) != 0;
+		eFlags |= VISIBILITY_ESETFLAG;
 		if (eNotificationRequired())
 			eNotify(new ENotificationImpl(this, Notification.SET,
 				UMLPackage.INSTANCE_SPECIFICATION__VISIBILITY, oldVisibility,
-				newVisibility));
+				newVisibility, !oldVisibilityESet));
 	}
 
 	/**
@@ -349,8 +351,26 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	@Override
+	public void unsetVisibility() {
+		VisibilityKind oldVisibility = VISIBILITY_EFLAG_VALUES[(eFlags & VISIBILITY_EFLAG) >>> VISIBILITY_EFLAG_OFFSET];
+		boolean oldVisibilityESet = (eFlags & VISIBILITY_ESETFLAG) != 0;
+		eFlags = eFlags & ~VISIBILITY_EFLAG | VISIBILITY_EFLAG_DEFAULT;
+		eFlags &= ~VISIBILITY_ESETFLAG;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.UNSET,
+				UMLPackage.INSTANCE_SPECIFICATION__VISIBILITY, oldVisibility,
+				VISIBILITY_EDEFAULT, oldVisibilityESet));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
 	public boolean isSetVisibility() {
-		return (eFlags & VISIBILITY_EFLAG) != VISIBILITY_EFLAG_DEFAULT;
+		return (eFlags & VISIBILITY_ESETFLAG) != 0;
 	}
 
 	/**
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageImpl.java
index c3b2347..221112b 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageImpl.java
@@ -9,7 +9,7 @@
  *   IBM - initial API and implementation
  *   Kenn Hussey (Embarcadero Technologies) - 204200
  *   Kenn Hussey - 286329, 323181
- *   Kenn Hussey (CEA) - 327039, 351774, 418466
+ *   Kenn Hussey (CEA) - 327039, 351774, 418466, 454400
  *
  */
 package org.eclipse.uml2.uml.internal.impl;
@@ -394,9 +394,12 @@
 			newVisibility = VISIBILITY_EDEFAULT;
 		eFlags = eFlags & ~VISIBILITY_EFLAG
 			| newVisibility.ordinal() << VISIBILITY_EFLAG_OFFSET;
+		boolean oldVisibilityESet = (eFlags & VISIBILITY_ESETFLAG) != 0;
+		eFlags |= VISIBILITY_ESETFLAG;
 		if (eNotificationRequired())
 			eNotify(new ENotificationImpl(this, Notification.SET,
-				UMLPackage.PACKAGE__VISIBILITY, oldVisibility, newVisibility));
+				UMLPackage.PACKAGE__VISIBILITY, oldVisibility, newVisibility,
+				!oldVisibilityESet));
 	}
 
 	/**
@@ -404,8 +407,26 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	@Override
+	public void unsetVisibility() {
+		VisibilityKind oldVisibility = VISIBILITY_EFLAG_VALUES[(eFlags & VISIBILITY_EFLAG) >>> VISIBILITY_EFLAG_OFFSET];
+		boolean oldVisibilityESet = (eFlags & VISIBILITY_ESETFLAG) != 0;
+		eFlags = eFlags & ~VISIBILITY_EFLAG | VISIBILITY_EFLAG_DEFAULT;
+		eFlags &= ~VISIBILITY_ESETFLAG;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.UNSET,
+				UMLPackage.PACKAGE__VISIBILITY, oldVisibility,
+				VISIBILITY_EDEFAULT, oldVisibilityESet));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
 	public boolean isSetVisibility() {
-		return (eFlags & VISIBILITY_EFLAG) != VISIBILITY_EFLAG_DEFAULT;
+		return (eFlags & VISIBILITY_ESETFLAG) != 0;
 	}
 
 	/**
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageableElementImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageableElementImpl.java
index 3b8c2f7..173c0b8 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageableElementImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageableElementImpl.java
@@ -9,7 +9,7 @@
  *   IBM - initial API and implementation
  *   Kenn Hussey (Embarcadero Technologies) - 204200
  *   Kenn Hussey - 286329, 323181
- *   Kenn Hussey (CEA) - 327039, 351774, 418466
+ *   Kenn Hussey (CEA) - 327039, 351774, 418466, 454400
  *
  */
 package org.eclipse.uml2.uml.internal.impl;
@@ -288,10 +288,12 @@
 			newVisibility = VISIBILITY_EDEFAULT;
 		eFlags = eFlags & ~VISIBILITY_EFLAG
 			| newVisibility.ordinal() << VISIBILITY_EFLAG_OFFSET;
+		boolean oldVisibilityESet = (eFlags & VISIBILITY_ESETFLAG) != 0;
+		eFlags |= VISIBILITY_ESETFLAG;
 		if (eNotificationRequired())
 			eNotify(new ENotificationImpl(this, Notification.SET,
 				UMLPackage.PACKAGEABLE_ELEMENT__VISIBILITY, oldVisibility,
-				newVisibility));
+				newVisibility, !oldVisibilityESet));
 	}
 
 	/**
@@ -299,8 +301,26 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	@Override
+	public void unsetVisibility() {
+		VisibilityKind oldVisibility = VISIBILITY_EFLAG_VALUES[(eFlags & VISIBILITY_EFLAG) >>> VISIBILITY_EFLAG_OFFSET];
+		boolean oldVisibilityESet = (eFlags & VISIBILITY_ESETFLAG) != 0;
+		eFlags = eFlags & ~VISIBILITY_EFLAG | VISIBILITY_EFLAG_DEFAULT;
+		eFlags &= ~VISIBILITY_ESETFLAG;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.UNSET,
+				UMLPackage.PACKAGEABLE_ELEMENT__VISIBILITY, oldVisibility,
+				VISIBILITY_EDEFAULT, oldVisibilityESet));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
 	public boolean isSetVisibility() {
-		return (eFlags & VISIBILITY_EFLAG) != VISIBILITY_EFLAG_DEFAULT;
+		return (eFlags & VISIBILITY_ESETFLAG) != 0;
 	}
 
 	/**
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/uml.ecore b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/uml.ecore
index 422680a..6a4e4c0 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/uml.ecore
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/uml.ecore
@@ -991,7 +991,7 @@
       eSuperTypes="#//NamedElement #//ParameterableElement">
     <eAnnotations source="duplicates">
       <contents xsi:type="ecore:EAttribute" name="visibility" ordered="false" eType="#//VisibilityKind"
-          defaultValueLiteral="public">
+          defaultValueLiteral="public" unsettable="true">
         <eAnnotations source="redefines" references="#//NamedElement/visibility"/>
       </contents>
     </eAnnotations>