Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Goubet2013-06-07 09:34:57 +0000
committerLaurent Goubet2013-06-07 09:37:30 +0000
commit18f300895483d76675ee99094066dd208cab0af9 (patch)
treedbb21c1331eaec61a5ccd014ef8007d5e50d20d7
parent55a6c8c8eaedc8a799bce50a66e108ba490fd4fa (diff)
downloadorg.eclipse.emf.compare-18f300895483d76675ee99094066dd208cab0af9.tar.gz
org.eclipse.emf.compare-18f300895483d76675ee99094066dd208cab0af9.tar.xz
org.eclipse.emf.compare-18f300895483d76675ee99094066dd208cab0af9.zip
[410072] Properly save right content from textual viewers.
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/text/EMFCompareTextMergeViewerContentProvider.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/text/EMFCompareTextMergeViewerContentProvider.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/text/EMFCompareTextMergeViewerContentProvider.java
index dba2dbf49..46a7e7f22 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/text/EMFCompareTextMergeViewerContentProvider.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/text/EMFCompareTextMergeViewerContentProvider.java
@@ -191,15 +191,15 @@ public class EMFCompareTextMergeViewerContentProvider implements IMergeViewerCon
public void saveRightContent(Object element, byte[] bytes) {
EList<Match> matches = getComparison().getMatches();
- EObject leftEObject = null;
+ EObject rightEObject = null;
for (Match match : matches) {
- leftEObject = match.getLeft();
- if (leftEObject != null) {
+ rightEObject = match.getRight();
+ if (rightEObject != null) {
break;
}
}
- if (leftEObject != null) {
- Resource eResource = leftEObject.eResource();
+ if (rightEObject != null) {
+ Resource eResource = rightEObject.eResource();
if (eResource != null) {
ResourceSet resourceSet = eResource.getResourceSet();
saveAllResources(resourceSet, ImmutableMap.of(Resource.OPTION_SAVE_ONLY_IF_CHANGED,

Back to the top