Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikaël Barbero2013-10-17 04:02:01 -0400
committerMikaël Barbero2013-10-18 16:28:18 -0400
commit7252fe708b5006cb279ea6844cdf44c5a9309280 (patch)
tree0f52d1b3baa9ee19e6bcd3d06f47781ae847dfa0 /plugins/org.eclipse.emf.compare.ide.ui/src
parente5ca5896f64aa0b17304b97087aca300c208e077 (diff)
downloadorg.eclipse.emf.compare-7252fe708b5006cb279ea6844cdf44c5a9309280.tar.gz
org.eclipse.emf.compare-7252fe708b5006cb279ea6844cdf44c5a9309280.tar.xz
org.eclipse.emf.compare-7252fe708b5006cb279ea6844cdf44c5a9309280.zip
[330566] Apply workaround for bug 330566 (MacOS X SWT bug)
See http://www.eclipse.org/forums/index.php/t/198780/ for the workaround. Bug: 330566 Change-Id: I68c4d270634adb3179226c3f507e6c93f5eb76ca
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.java21
1 files changed, 19 insertions, 2 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 ca2aa1612..b1a5f3a85 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
@@ -69,9 +69,12 @@ import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Sash;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchPage;
@@ -416,8 +419,21 @@ public abstract class EMFCompareContentMergeViewer extends ContentMergeViewer im
* @see org.eclipse.compare.contentmergeviewer.ContentMergeViewer#createCenterControl(org.eclipse.swt.widgets.Composite)
*/
@Override
- protected Control createCenterControl(Composite parent) {
- final Control ret = super.createCenterControl(parent);
+ protected Control createCenterControl(final Composite parent) {
+ final Sash ret = (Sash)super.createCenterControl(parent);
+
+ final SelectionAdapter selectionListener = new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ SWTUtil.safeAsyncExec(new Runnable() {
+ public void run() {
+ parent.layout();
+ }
+ });
+ }
+ };
+
+ ret.addSelectionListener(selectionListener);
final PaintListener paintListener = new PaintListener() {
public void paintControl(PaintEvent e) {
@@ -429,6 +445,7 @@ public abstract class EMFCompareContentMergeViewer extends ContentMergeViewer im
ret.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
ret.removePaintListener(paintListener);
+ ret.removeSelectionListener(selectionListener);
}
});

Back to the top