Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2013-08-28 08:25:43 -0400
committerCamille Letavernier2013-08-28 08:25:43 -0400
commitb2f53d8704f2877dc7675cb210cb687c78203d51 (patch)
treec8f184cd35c07c0373b84771953bd4f950cf523d
parentf5f9a05797f8d8c3c314e421f6708314475cf658 (diff)
downloadorg.eclipse.papyrus-b2f53d8704f2877dc7675cb210cb687c78203d51.tar.gz
org.eclipse.papyrus-b2f53d8704f2877dc7675cb210cb687c78203d51.tar.xz
org.eclipse.papyrus-b2f53d8704f2877dc7675cb210cb687c78203d51.zip
415214: [Profile definition] Cannot define new version of legacy profile
https://bugs.eclipse.org/bugs/show_bug.cgi?id=415214 Use the standard default values for Profile Definition options (Same ones as the Eclipse UML2 editor)
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/DefineProfileCommand.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/DefineProfileCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/DefineProfileCommand.java
index 3f527837e63..28e12c269da 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/DefineProfileCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/DefineProfileCommand.java
@@ -101,8 +101,8 @@ public class DefineProfileCommand extends AbstractTransactionalCommand {
options.put(Profile2EPackageConverter.OPTION__ECORE_TAGGED_VALUES, UMLUtil.OPTION__PROCESS);
options.put(Profile2EPackageConverter.OPTION__DERIVED_FEATURES, UMLUtil.OPTION__REPORT);
- options.put(Profile2EPackageConverter.OPTION__DUPLICATE_FEATURE_INHERITANCE, UMLUtil.OPTION__REPORT);
- options.put(Profile2EPackageConverter.OPTION__DUPLICATE_FEATURES, UMLUtil.OPTION__REPORT);
+ options.put(Profile2EPackageConverter.OPTION__DUPLICATE_FEATURE_INHERITANCE, UMLUtil.OPTION__PROCESS);
+ options.put(Profile2EPackageConverter.OPTION__DUPLICATE_FEATURES, UMLUtil.OPTION__PROCESS);
options.put(Profile2EPackageConverter.OPTION__DUPLICATE_OPERATIONS, UMLUtil.OPTION__REPORT);
options.put(Profile2EPackageConverter.OPTION__DUPLICATE_OPERATION_INHERITANCE, UMLUtil.OPTION__REPORT);
options.put(Profile2EPackageConverter.OPTION__REDEFINING_OPERATIONS, UMLUtil.OPTION__REPORT);
@@ -111,13 +111,15 @@ public class DefineProfileCommand extends AbstractTransactionalCommand {
options.put(Profile2EPackageConverter.OPTION__UNION_PROPERTIES, UMLUtil.OPTION__PROCESS);
options.put(UML2EcoreConverter.OPTION__SUPER_CLASS_ORDER, UMLUtil.OPTION__REPORT);
options.put(Profile2EPackageConverter.OPTION__ANNOTATION_DETAILS, UMLUtil.OPTION__REPORT);
- if(saveConstraintInDef == true) {
- // //for the validation
- options.put(Profile2EPackageConverter.OPTION__INVARIANT_CONSTRAINTS, UMLUtil.OPTION__PROCESS);
- options.put(Profile2EPackageConverter.OPTION__VALIDATION_DELEGATES, UMLUtil.OPTION__PROCESS);
- options.put(Profile2EPackageConverter.OPTION__INVOCATION_DELEGATES, UMLUtil.OPTION__PROCESS);
- options.put(UML2EcoreConverter.OPTION__OPERATION_BODIES, UMLUtil.OPTION__PROCESS);
- }
+
+ //Generate constraints for the validation
+ String handleConstraints = saveConstraintInDef ? UMLUtil.OPTION__PROCESS : UMLUtil.OPTION__IGNORE;
+ options.put(Profile2EPackageConverter.OPTION__INVARIANT_CONSTRAINTS, handleConstraints);
+ options.put(Profile2EPackageConverter.OPTION__VALIDATION_DELEGATES, handleConstraints);
+ options.put(Profile2EPackageConverter.OPTION__INVOCATION_DELEGATES, handleConstraints);
+ options.put(UML2EcoreConverter.OPTION__OPERATION_BODIES, handleConstraints);
+ //
+
options.put(Profile2EPackageConverter.OPTION__COMMENTS, UMLUtil.OPTION__IGNORE);
options.put(Profile2EPackageConverter.OPTION__FOREIGN_DEFINITIONS, UMLUtil.OPTION__IGNORE);

Back to the top