From a43e948e254e0546dea2a59bd209857dcc51da3f Mon Sep 17 00:00:00 2001 From: Oleg Krasilnikov Date: Thu, 3 Apr 2008 14:10:22 +0000 Subject: [PATCH] Bug #225483 : Unacceptable layout of Binary parsers tab --- .../eclipse/cdt/ui/newui/BinaryParsTab.java | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/BinaryParsTab.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/BinaryParsTab.java index cf6c26130e4..787fa6d8cf2 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/BinaryParsTab.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/BinaryParsTab.java @@ -28,6 +28,7 @@ import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.viewers.Viewer; import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.SashForm; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.GridData; @@ -73,6 +74,7 @@ public class BinaryParsTab extends AbstractCPropertyTab { protected Table table; protected CheckboxTableViewer tv; protected Composite parserGroup; + protected SashForm sashForm; private ICTargetPlatformSetting tps; @@ -112,9 +114,21 @@ public class BinaryParsTab extends AbstractCPropertyTab { super.createControls(parent); PlatformUI.getWorkbench().getHelpSystem().setHelp(usercomp, ICHelpContextIds.BINARY_PARSER_PAGE); - usercomp.setLayout(new GridLayout(2, false)); - setupLabel(usercomp, UIMessages.getString("BinaryParsTab.0"), 2, GridData.FILL_HORIZONTAL); //$NON-NLS-1$ - table = new Table(usercomp, SWT.BORDER | SWT.CHECK | SWT.SINGLE); + usercomp.setLayout(new GridLayout(1, false)); + + sashForm = new SashForm(usercomp, SWT.NONE); + sashForm.setBackground(sashForm.getDisplay().getSystemColor(SWT.COLOR_GRAY)); + sashForm.setOrientation(SWT.VERTICAL); + sashForm.setLayoutData(new GridData(GridData.FILL_BOTH)); + + GridLayout layout = new GridLayout(2, false); + layout.marginHeight = 5; + sashForm.setLayout(layout); + + Composite c1 = new Composite(sashForm, SWT.NONE); + c1.setLayout(new GridLayout(2, false)); + setupLabel(c1, UIMessages.getString("BinaryParsTab.0"), 2, GridData.FILL_HORIZONTAL); //$NON-NLS-1$ + table = new Table(c1, SWT.BORDER | SWT.CHECK | SWT.SINGLE); table.setLayoutData(new GridData(GridData.FILL_BOTH)); table.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { @@ -144,11 +158,11 @@ public class BinaryParsTab extends AbstractCPropertyTab { }}); // get "standard" buttons on my own place - Composite c = new Composite(usercomp, SWT.NONE); + Composite c = new Composite(c1, SWT.NONE); c.setLayoutData(new GridData(GridData.END)); initButtons(c, new String[] {MOVEUP_STR, MOVEDOWN_STR}); - parserGroup = new Composite(usercomp, SWT.NULL); + parserGroup = new Composite(sashForm, SWT.NULL); GridData gd = new GridData(); parserGroup.setLayout(new TabFolderLayout()); @@ -160,6 +174,8 @@ public class BinaryParsTab extends AbstractCPropertyTab { gd.grabExcessVerticalSpace = true; gd.horizontalSpan = 2; parserGroup.setLayoutData(gd); + + sashForm.setWeights(new int[] {100, 100}); initializeParserList(); initializeParserPageMap(); handleBinaryParserChanged();