Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkhussey2009-01-14 19:58:32 +0000
committerkhussey2009-01-14 19:58:32 +0000
commit2f443ef960c6f33c65093b04130d064e85e161ef (patch)
treeb4a658d5d8f6ad2a43beb8c82891845b53eb88bf /plugins/org.eclipse.uml2.uml
parent91910afaae553cd8fbfa9267ec69130c912d710c (diff)
downloadorg.eclipse.uml2.test-2f443ef960c6f33c65093b04130d064e85e161ef.tar.gz
org.eclipse.uml2.test-2f443ef960c6f33c65093b04130d064e85e161ef.tar.xz
org.eclipse.uml2.test-2f443ef960c6f33c65093b04130d064e85e161ef.zip
[260120] Updating package merger to return a traceability map from resulting elements to merged elements.
Diffstat (limited to 'plugins/org.eclipse.uml2.uml')
-rw-r--r--plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/util/UMLUtil.java28
1 files changed, 19 insertions, 9 deletions
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/util/UMLUtil.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/util/UMLUtil.java
index dea6025a..6f2b2183 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/util/UMLUtil.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/util/UMLUtil.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2008 IBM Corporation, Embarcadero Technologies, and others.
+ * Copyright (c) 2005, 2009 IBM Corporation, Embarcadero Technologies, and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,8 +8,9 @@
* Contributors:
* IBM - initial API and implementation
* Kenn Hussey (Embarcadero Technologies) - 199624, 184249, 204406, 208125, 204200, 213218, 213903, 220669, 208016, 226396
+ * Nicolas Rouquette (JPL) - 260120
*
- * $Id: UMLUtil.java,v 1.77 2008/10/02 20:57:04 jbruck Exp $
+ * $Id: UMLUtil.java,v 1.78 2009/01/14 19:58:32 khussey Exp $
*/
package org.eclipse.uml2.uml.util;
@@ -1897,8 +1898,11 @@ public class UMLUtil
* appended.
* @param context
* The cache of context-specific information.
+ *
+ * @return A traceability map from resulting elements to merged elements.
*/
- public void merge(org.eclipse.uml2.uml.Package package_,
+ public Map<EObject, List<EObject>> merge(
+ org.eclipse.uml2.uml.Package package_,
Map<String, String> options, DiagnosticChain diagnostics,
Map<Object, Object> context) {
receivingPackage = package_;
@@ -1913,6 +1917,8 @@ public class UMLUtil
if (options != null) {
processOptions(options, diagnostics, context);
}
+
+ return resultingToMergedEObjectMap;
}
}
@@ -3096,7 +3102,7 @@ public class UMLUtil
elementToEModelElementMap.put(property, eAttribute);
String default_ = property.getDefault();
-
+
if (default_ != null) {
if (type instanceof PrimitiveType
@@ -3110,7 +3116,7 @@ public class UMLUtil
}
eAttribute.setDefaultValueLiteral(default_);
- }
+ }
}
EClass eClass = (EClass) doSwitch(namespace);
@@ -9329,8 +9335,10 @@ public class UMLUtil
* The receiving package.
* @param options
* The options to use.
+ * @return A traceability map from resulting elements to merged elements.
*/
- public static void merge(org.eclipse.uml2.uml.Package package_,
+ public static Map<EObject, List<EObject>> merge(
+ org.eclipse.uml2.uml.Package package_,
Map<String, String> options) {
if (options == null) {
@@ -9387,7 +9395,7 @@ public class UMLUtil
options.put(PackageMerger.OPTION__CAPABILITIES, OPTION__IGNORE);
}
- merge(package_, options, null, null);
+ return merge(package_, options, null, null);
}
/**
@@ -9404,8 +9412,10 @@ public class UMLUtil
* The chain of diagnostics to which problems are to be appended.
* @param context
* The cache of context-specific information.
+ * @return A traceability map from resulting elements to merged elements.
*/
- public static void merge(org.eclipse.uml2.uml.Package package_,
+ public static Map<EObject, List<EObject>> merge(
+ org.eclipse.uml2.uml.Package package_,
Map<String, String> options, DiagnosticChain diagnostics,
Map<Object, Object> context) {
@@ -9463,7 +9473,7 @@ public class UMLUtil
options.put(PackageMerger.OPTION__CAPABILITIES, OPTION__REPORT);
}
- new PackageMerger().merge(package_, options, diagnostics, context);
+ return new PackageMerger().merge(package_, options, diagnostics, context);
}
/**

Back to the top