Bug 522003 - Content of Select Attributes dialog does not resize
correctly
Change-Id: I3fd6836791fc21826b1cdeccac10cad9c6fed133
Signed-off-by: Eugen Neufeld <eneufeld@eclipsesource.com>
diff --git a/bundles/org.eclipse.emf.ecp.ui.view.editor.controls/src/org/eclipse/emf/ecp/view/internal/editor/handler/SelectAttributesWizardPage.java b/bundles/org.eclipse.emf.ecp.ui.view.editor.controls/src/org/eclipse/emf/ecp/view/internal/editor/handler/SelectAttributesWizardPage.java
index b11a4e2..5662419 100644
--- a/bundles/org.eclipse.emf.ecp.ui.view.editor.controls/src/org/eclipse/emf/ecp/view/internal/editor/handler/SelectAttributesWizardPage.java
+++ b/bundles/org.eclipse.emf.ecp.ui.view.editor.controls/src/org/eclipse/emf/ecp/view/internal/editor/handler/SelectAttributesWizardPage.java
@@ -95,30 +95,17 @@
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.BEGINNING).grab(true, false).span(2, 1)
.applyTo(bUnreferenced);
- final ScrolledComposite scrolledComposite = new ScrolledComposite(composite, SWT.H_SCROLL | SWT.V_SCROLL
- | SWT.BORDER);
- scrolledComposite.setShowFocusedControl(true);
- scrolledComposite.setExpandVertical(true);
- scrolledComposite.setExpandHorizontal(true);
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(scrolledComposite);
- GridLayoutFactory.fillDefaults().applyTo(scrolledComposite);
-
- final Composite tableComposite = new Composite(scrolledComposite, SWT.FILL);
+ final Composite tableComposite = new Composite(composite, SWT.FILL);
tableComposite.setLayout(GridLayoutFactory.fillDefaults().create());
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(tableComposite);
- tableComposite.setBackground(scrolledComposite.getBackground());
+ tableComposite.setBackground(composite.getBackground());
tvAttributes = CheckboxTableViewer.newCheckList(tableComposite, SWT.NONE);
tvAttributes.setLabelProvider(labelProvider);
tvAttributes.setContentProvider(ArrayContentProvider.getInstance());
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.BEGINNING).grab(true, false).hint(SWT.DEFAULT, 200)
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).hint(SWT.DEFAULT, 200)
.applyTo(tvAttributes.getControl());
- scrolledComposite.setContent(tableComposite);
-
- final Point point = tableComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- scrolledComposite.setMinSize(point);
-
tvAttributes.addCheckStateListener(new ICheckStateListener() {
@Override
@@ -198,11 +185,10 @@
});
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.BEGINNING).grab(true, false).applyTo(bDeSelectAll);
parent.layout(true);
- scrolledComposite.layout(true);
}
public void onEnterPage() {
- /* if (isCurrentPage()) */{
+ /* if (isCurrentPage()) */ {
// clear composite
clear();
composite = new Composite(parent, SWT.NONE);