Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlorenzo2012-12-11 13:00:34 +0000
committervlorenzo2012-12-11 13:00:34 +0000
commitfaec93ba472784cb46a9e25aa290a3f4f04ac6c3 (patch)
treea4ec6540b7eaa25630f0ef9cd3a03c2724f21528 /extraplugins/uml
parentbfd3852226011f658ff8d7e2dc7119101a154775 (diff)
downloadorg.eclipse.papyrus-faec93ba472784cb46a9e25aa290a3f4f04ac6c3.tar.gz
org.eclipse.papyrus-faec93ba472784cb46a9e25aa290a3f4f04ac6c3.tar.xz
org.eclipse.papyrus-faec93ba472784cb46a9e25aa290a3f4f04ac6c3.zip
396267: [UML Compare] it is not possible to merge a difference on a stereotype property
https://bugs.eclipse.org/bugs/show_bug.cgi?id=396267
Diffstat (limited to 'extraplugins/uml')
-rw-r--r--extraplugins/uml/compare/org.eclipse.papyrus.infra.emf.compare.diff/src/org/eclipse/papyrus/infra/emf/compare/diff/internal/merger/DefaultTransactionalMerger.java12
-rw-r--r--extraplugins/uml/compare/org.eclipse.papyrus.infra.emf.compare.diff/src/org/eclipse/papyrus/infra/emf/compare/diff/service/TransactionalMergeFactory.java4
2 files changed, 11 insertions, 5 deletions
diff --git a/extraplugins/uml/compare/org.eclipse.papyrus.infra.emf.compare.diff/src/org/eclipse/papyrus/infra/emf/compare/diff/internal/merger/DefaultTransactionalMerger.java b/extraplugins/uml/compare/org.eclipse.papyrus.infra.emf.compare.diff/src/org/eclipse/papyrus/infra/emf/compare/diff/internal/merger/DefaultTransactionalMerger.java
index 2b307ee7e92..c92cc4cc6fd 100644
--- a/extraplugins/uml/compare/org.eclipse.papyrus.infra.emf.compare.diff/src/org/eclipse/papyrus/infra/emf/compare/diff/internal/merger/DefaultTransactionalMerger.java
+++ b/extraplugins/uml/compare/org.eclipse.papyrus.infra.emf.compare.diff/src/org/eclipse/papyrus/infra/emf/compare/diff/internal/merger/DefaultTransactionalMerger.java
@@ -75,7 +75,9 @@ public class DefaultTransactionalMerger extends AbstractDefaultMerger implements
//---------------------These methods comes from ITransactionalMerger
public Command getApplyInOriginCommand(TransactionalEditingDomain domain) {
final PapyrusOptionsAdapter adapter = PapyrusCompareOptionsUtils.getPapyrusOptionsAdapter(diff);
- final CompoundCommand cmd = new CompoundCommand(NLS.bind("Apply in Origin Command for {0}", this.diff)); //$NON-NLS-1$
+ //cf bug 396267: [UML Compare] it is not possible to merge a difference on a stereotype property
+ //final CompoundCommand cmd = new CompoundCommand(NLS.bind("Apply in Origin Command for {0}", this.diff)); //$NON-NLS-1$
+ final CompoundCommand cmd = new CompoundCommand(NLS.bind("Apply in Origin Command for {0}", this.diff.getClass())); //$NON-NLS-1$
if(adapter==null || adapter.canApplyInOrigin()) {
cmd.append(getMergeRequiredDifferencesCommand(domain, true));
cmd.append(getDoApplyInOriginCommand(domain));
@@ -88,7 +90,9 @@ public class DefaultTransactionalMerger extends AbstractDefaultMerger implements
public Command getUndoInTargetCommand(TransactionalEditingDomain domain) {
final PapyrusOptionsAdapter adapter = PapyrusCompareOptionsUtils.getPapyrusOptionsAdapter(diff);
- final CompoundCommand cmd = new CompoundCommand(NLS.bind("Undo in Target Command for {0}", this.diff)); //$NON-NLS-1$
+ //cf bug 396267: [UML Compare] it is not possible to merge a difference on a stereotype property
+ //final CompoundCommand cmd = new CompoundCommand(NLS.bind("Undo in Target Command for {0}", this.diff)); //$NON-NLS-1$
+ final CompoundCommand cmd = new CompoundCommand(NLS.bind("Undo in Target Command for {0}", this.diff.getClass())); //$NON-NLS-1$
if(adapter == null || adapter.canUndoInTarget()) {
cmd.append(getMergeRequiredDifferencesCommand(domain, false));
cmd.append(getDoUndoInTargetCommand(domain));
@@ -179,8 +183,8 @@ public class DefaultTransactionalMerger extends AbstractDefaultMerger implements
}
domain = TransactionUtil.getEditingDomain(element);
}
-
- Assert.isNotNull(domain, NLS.bind("I didn't found the EditingDomain for {0}", diff)); //$NON-NLS-1$
+ assert domain!=null; //cf bug 396267: [UML Compare] it is not possible to merge a difference on a stereotype property
+// Assert.isNotNull(domain, NLS.bind("I didn't found the EditingDomain for {0}", diff)); //$NON-NLS-1$
return domain;
}
diff --git a/extraplugins/uml/compare/org.eclipse.papyrus.infra.emf.compare.diff/src/org/eclipse/papyrus/infra/emf/compare/diff/service/TransactionalMergeFactory.java b/extraplugins/uml/compare/org.eclipse.papyrus.infra.emf.compare.diff/src/org/eclipse/papyrus/infra/emf/compare/diff/service/TransactionalMergeFactory.java
index b3bd959fde6..2a2227f7611 100644
--- a/extraplugins/uml/compare/org.eclipse.papyrus.infra.emf.compare.diff/src/org/eclipse/papyrus/infra/emf/compare/diff/service/TransactionalMergeFactory.java
+++ b/extraplugins/uml/compare/org.eclipse.papyrus.infra.emf.compare.diff/src/org/eclipse/papyrus/infra/emf/compare/diff/service/TransactionalMergeFactory.java
@@ -129,7 +129,9 @@ public class TransactionalMergeFactory {
if(elementMerger != null) {
elementMerger.setDiffElement(element);
}
- Assert.isNotNull(elementMerger, NLS.bind("Merger for {0} not found", element));
+ //cf bug 396267: [UML Compare] it is not possible to merge a difference on a stereotype property
+ //Assert.isNotNull(elementMerger, NLS.bind("Merger for {0} not found", element));
+ Assert.isNotNull(elementMerger, NLS.bind("Merger for {0} not found", element.getClass()));
return elementMerger;
}

Back to the top