[129964] Removing null guard for subset set commands.
diff --git a/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SubsetAddCommand.java b/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SubsetAddCommand.java
index 6520558..8557bb7 100644
--- a/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SubsetAddCommand.java
+++ b/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SubsetAddCommand.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM - initial API and implementation
*
- * $Id: SubsetAddCommand.java,v 1.2 2006/01/05 13:49:51 khussey Exp $
+ * $Id: SubsetAddCommand.java,v 1.3 2006/03/01 17:11:12 khussey Exp $
*/
package org.eclipse.uml2.common.edit.command;
@@ -60,6 +60,7 @@
if (!((EList) owner.eGet(supersetFeatures[i]))
.contains(element)) {
+
appendAndExecute(AddCommand.create(domain, owner,
supersetFeatures[i], Collections
.singleton(element),
diff --git a/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SubsetReplaceCommand.java b/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SubsetReplaceCommand.java
index 7ee4838..da51c9a 100644
--- a/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SubsetReplaceCommand.java
+++ b/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SubsetReplaceCommand.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM - initial API and implementation
*
- * $Id: SubsetReplaceCommand.java,v 1.2 2006/01/05 13:49:51 khussey Exp $
+ * $Id: SubsetReplaceCommand.java,v 1.3 2006/03/01 17:11:12 khussey Exp $
*/
package org.eclipse.uml2.common.edit.command;
@@ -61,6 +61,7 @@
if (!((EList) owner.eGet(supersetFeatures[i]))
.contains(element)) {
+
appendAndExecute(AddCommand.create(domain, owner,
supersetFeatures[i], Collections
.singleton(element),
diff --git a/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SubsetSetCommand.java b/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SubsetSetCommand.java
index 8c1d358..c2d7d12 100644
--- a/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SubsetSetCommand.java
+++ b/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SubsetSetCommand.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM - initial API and implementation
*
- * $Id: SubsetSetCommand.java,v 1.2 2006/01/05 13:49:51 khussey Exp $
+ * $Id: SubsetSetCommand.java,v 1.3 2006/03/01 17:11:12 khussey Exp $
*/
package org.eclipse.uml2.common.edit.command;
@@ -46,7 +46,7 @@
if (supersetFeatures != null) {
- if (null != value) {
+ if (value != null) {
for (int i = 0; i < supersetFeatures.length; i++) {
@@ -54,6 +54,7 @@
if (!((EList) owner.eGet(supersetFeatures[i]))
.contains(value)) {
+
appendAndExecute(AddCommand.create(domain, owner,
supersetFeatures[i], Collections
.singleton(value),
@@ -61,8 +62,7 @@
}
} else {
- if (null == owner.eGet(feature)
- && value != owner.eGet(supersetFeatures[i])) {
+ if (value != owner.eGet(supersetFeatures[i])) {
appendAndExecute(SetCommand.create(domain, owner,
supersetFeatures[i], value));
}
diff --git a/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SubsetSupersetReplaceCommand.java b/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SubsetSupersetReplaceCommand.java
index 49d6a59..9229ef5 100644
--- a/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SubsetSupersetReplaceCommand.java
+++ b/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SubsetSupersetReplaceCommand.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM - initial API and implementation
*
- * $Id: SubsetSupersetReplaceCommand.java,v 1.1 2006/01/05 13:49:51 khussey Exp $
+ * $Id: SubsetSupersetReplaceCommand.java,v 1.2 2006/03/01 17:11:12 khussey Exp $
*/
package org.eclipse.uml2.common.edit.command;
@@ -59,6 +59,7 @@
if (!((EList) owner.eGet(supersetFeatures[i]))
.contains(element)) {
+
appendAndExecute(AddCommand.create(domain, owner,
supersetFeatures[i], Collections
.singleton(element),
diff --git a/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SubsetSupersetSetCommand.java b/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SubsetSupersetSetCommand.java
index fb91e00..5a323d2 100644
--- a/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SubsetSupersetSetCommand.java
+++ b/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SubsetSupersetSetCommand.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM - initial API and implementation
*
- * $Id: SubsetSupersetSetCommand.java,v 1.1 2006/01/05 13:49:51 khussey Exp $
+ * $Id: SubsetSupersetSetCommand.java,v 1.2 2006/03/01 17:11:12 khussey Exp $
*/
package org.eclipse.uml2.common.edit.command;
@@ -41,7 +41,7 @@
if (supersetFeatures != null) {
- if (null != value) {
+ if (value != null) {
for (int i = 0; i < supersetFeatures.length; i++) {
@@ -49,6 +49,7 @@
if (!((EList) owner.eGet(supersetFeatures[i]))
.contains(value)) {
+
appendAndExecute(AddCommand.create(domain, owner,
supersetFeatures[i], Collections
.singleton(value),
@@ -56,8 +57,7 @@
}
} else {
- if (null == owner.eGet(feature)
- && value != owner.eGet(supersetFeatures[i])) {
+ if (value != owner.eGet(supersetFeatures[i])) {
appendAndExecute(SetCommand.create(domain, owner,
supersetFeatures[i], value));
}
@@ -71,7 +71,7 @@
for (int i = 0; i < subsetFeatures.length; i++) {
Object object = owner.eGet(subsetFeatures[i]);
- if (null != object && value != object) {
+ if (object != null && object != value) {
EReference subsetReference = (EReference) subsetFeatures[i];
appendAndExecute(subsetReference.isContainer()
diff --git a/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SupersetRemoveCommand.java b/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SupersetRemoveCommand.java
index 0f26902..69d6273 100644
--- a/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SupersetRemoveCommand.java
+++ b/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SupersetRemoveCommand.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM - initial API and implementation
*
- * $Id: SupersetRemoveCommand.java,v 1.2 2006/01/05 13:49:51 khussey Exp $
+ * $Id: SupersetRemoveCommand.java,v 1.3 2006/03/01 17:11:12 khussey Exp $
*/
package org.eclipse.uml2.common.edit.command;
@@ -57,6 +57,7 @@
if (((EList) owner.eGet(subsetFeatures[i]))
.contains(element)) {
+
appendAndExecute(RemoveCommand.create(domain,
owner, subsetFeatures[i], Collections
.singleton(element)));
diff --git a/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SupersetSetCommand.java b/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SupersetSetCommand.java
index 1163a6c..2544e72 100644
--- a/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SupersetSetCommand.java
+++ b/plugins/org.eclipse.uml2.common.edit/src/org/eclipse/uml2/common/edit/command/SupersetSetCommand.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM - initial API and implementation
*
- * $Id: SupersetSetCommand.java,v 1.2 2006/01/05 13:49:51 khussey Exp $
+ * $Id: SupersetSetCommand.java,v 1.3 2006/03/01 17:11:12 khussey Exp $
*/
package org.eclipse.uml2.common.edit.command;
@@ -45,7 +45,7 @@
for (int i = 0; i < subsetFeatures.length; i++) {
Object object = owner.eGet(subsetFeatures[i]);
- if (null != object && value != object) {
+ if (object != null && object != value) {
EReference subsetReference = (EReference) subsetFeatures[i];
appendAndExecute(subsetReference.isContainer()