Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Richard2013-11-05 04:26:58 -0500
committerGerrit Code Review @ Eclipse.org2013-11-12 04:14:29 -0500
commit9778b83ddd83cea68783bb20d804b5540e38329b (patch)
treef90a6c8a63d1a4b09e36058d662b9dec059ec65b /plugins/org.eclipse.emf.compare.ide.ui/src
parent73d71b5d1e5019a7c47b5bf1868f78661ec588d5 (diff)
downloadorg.eclipse.emf.compare-9778b83ddd83cea68783bb20d804b5540e38329b.tar.gz
org.eclipse.emf.compare-9778b83ddd83cea68783bb20d804b5540e38329b.tar.xz
org.eclipse.emf.compare-9778b83ddd83cea68783bb20d804b5540e38329b.zip
[421048] Redraw center part of content merge viewer when resizing editor
Diffstat (limited to 'plugins/org.eclipse.emf.compare.ide.ui/src')
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/EMFCompareContentMergeViewer.java13
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/table/TableContentMergeViewer.java3
2 files changed, 15 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/EMFCompareContentMergeViewer.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/EMFCompareContentMergeViewer.java
index 5cf148225..56abb297c 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/EMFCompareContentMergeViewer.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/EMFCompareContentMergeViewer.java
@@ -65,6 +65,8 @@ import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.ControlListener;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.PaintEvent;
@@ -140,6 +142,7 @@ public abstract class EMFCompareContentMergeViewer extends ContentMergeViewer im
editingDomainChange(null, getCompareConfiguration().getEditingDomain());
getCompareConfiguration().getEventBus().register(this);
+
}
@Subscribe
@@ -296,6 +299,16 @@ public abstract class EMFCompareContentMergeViewer extends ContentMergeViewer im
fRight.addSelectionChangedListener(this);
fColors = new EMFCompareColor(this, null, getCompareConfiguration());
+
+ composite.addControlListener(new ControlListener() {
+ public void controlResized(ControlEvent e) {
+ redrawCenterControl();
+ }
+
+ public void controlMoved(ControlEvent e) {
+ // Do nothing.
+ }
+ });
}
/**
diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/table/TableContentMergeViewer.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/table/TableContentMergeViewer.java
index 9f9deaf8c..247bd5f10 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/table/TableContentMergeViewer.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/table/TableContentMergeViewer.java
@@ -238,12 +238,12 @@ public class TableContentMergeViewer extends EMFCompareContentMergeViewer {
return super.getColumnImage(object, columnIndex);
}
});
+
ret.getStructuredViewer().getTable().getVerticalBar().addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
redrawCenterControl();
}
});
-
ret.getStructuredViewer().getTable().addMouseWheelListener(new MouseWheelListener() {
public void mouseScrolled(MouseEvent e) {
redrawCenterControl();
@@ -254,6 +254,7 @@ public class TableContentMergeViewer extends EMFCompareContentMergeViewer {
redrawCenterControl();
}
});
+
return ret;
}

Back to the top