1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 18:56:02 +02:00

Vertical scroll bar for paths and symbols page, bug 235301.

This commit is contained in:
Markus Schorn 2008-06-26 10:43:12 +00:00
parent b23fa116f6
commit c198a352ec
4 changed files with 40 additions and 24 deletions

View file

@ -7,6 +7,7 @@
*
* Contributors:
* Intel Corporation - initial API and implementation
* Markus Schorn (Wind River Systems)
*******************************************************************************/
package org.eclipse.cdt.ui.newui;
@ -48,6 +49,7 @@ import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
import org.eclipse.ui.dialogs.ISelectionStatusValidator;
import org.eclipse.ui.model.WorkbenchContentProvider;
import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.eclipse.ui.part.PageBook;
import org.eclipse.ui.views.navigator.ResourceComparator;
import org.eclipse.cdt.core.CCorePlugin;
@ -112,7 +114,10 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
protected static final String ENUM = "enum"; //$NON-NLS-1$
protected static final String SSET = "set"; //$NON-NLS-1$
private CLabel background;
private PageBook pageBook; // to select between background and usercomp.
private CLabel background;
private Composite userdata;
protected Composite usercomp; // space where user can create widgets
protected Composite buttoncomp; // space for buttons on the right
private Button[] buttons; // buttons in buttoncomp
@ -136,15 +141,24 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
*/
protected void createControls(Composite parent) {
parent.setLayout(new FillLayout());
background = new CLabel(parent, SWT.CENTER | SWT.SHADOW_NONE);
pageBook = new PageBook(parent, SWT.NULL);
background = new CLabel(pageBook, SWT.CENTER | SWT.SHADOW_NONE);
background.setText(EMPTY_STR);
background.setLayout(new GridLayout(2, false));
usercomp = new Composite(background, SWT.NONE);
usercomp.setLayoutData(new GridData(GridData.FILL_BOTH));
buttoncomp = new Composite(background, SWT.NONE);
GridData d = new GridData(GridData.END);
d.widthHint = 1;
buttoncomp.setLayoutData(d);
GridData gd;
userdata= new Composite(pageBook, SWT.NONE);
userdata.setLayout(new GridLayout(2, false));
usercomp = new Composite(userdata, SWT.NONE);
usercomp.setLayoutData(gd= new GridData(GridData.FILL_BOTH));
gd.widthHint= 150;
buttoncomp = new Composite(userdata, SWT.NONE);
buttoncomp.setLayoutData(gd= new GridData(GridData.END));
gd.widthHint= 150;
pageBook.showPage(userdata);
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, helpId);
}
@ -628,9 +642,12 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
* @param msg - text to be shown instead of panes
*/
protected void setAllVisible(boolean visible, String msg) {
setBackgroundText(visible ? EMPTY_STR : msg);
usercomp.setVisible(visible);
buttoncomp.setVisible(visible);
if (!visible) {
setBackgroundText(msg);
pageBook.showPage(background);
} else {
pageBook.showPage(userdata);
}
if (page != null) {
Button b = page.getAButton();
if (b != null)

View file

@ -8,6 +8,7 @@
* Contributors:
* Intel Corporation - initial API and implementation
* IBM Corporation
* Markus Schorn (Wind River Systems)
*******************************************************************************/
package org.eclipse.cdt.ui.newui;
@ -121,7 +122,7 @@ public abstract class AbstractLangsListTab extends AbstractCPropertyTab {
addTree(sashForm).setLayoutData(new GridData(GridData.FILL_VERTICAL));
table = new Table(sashForm, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.FULL_SELECTION);
gd = new GridData(GridData.FILL_BOTH);
gd.widthHint = 255;
gd.widthHint = 150;
table.setLayoutData(gd);
table.setHeaderVisible(isHeaderVisible());
table.setLinesVisible(true);

View file

@ -7,6 +7,7 @@
*
* Contributors:
* Intel Corporation - initial API and implementation
* Markus Schorn (Wind River Systems)
*******************************************************************************/
package org.eclipse.cdt.ui.newui;
@ -243,6 +244,7 @@ implements
Group configGroup = ControlFactory.createGroup(composite, EMPTY_STR, 1);
gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd.grabExcessHorizontalSpace = true;
gd.widthHint= 150;
configGroup.setLayoutData(gd);
configGroup.setLayout(new GridLayout(3, false));
@ -256,12 +258,7 @@ implements
handleConfigSelection();
}
});
gd = new GridData(GridData.FILL);
gd.grabExcessHorizontalSpace = true;
gd.grabExcessVerticalSpace = true;
gd.horizontalAlignment = GridData.FILL;
gd.verticalAlignment = GridData.FILL;
gd = new GridData(GridData.FILL_BOTH);
configSelector.setLayoutData(gd);
if (!CDTPrefUtil.getBool(CDTPrefUtil.KEY_NOMNG)) {
@ -328,9 +325,10 @@ implements
}
public void createWidgets(Composite c) {
GridData gd;
parentComposite = new Composite(c, SWT.NONE);
parentComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
parentComposite.setLayoutData(gd= new GridData(GridData.FILL_BOTH));
gd.widthHint= 200;
itabs.clear();
if (!isSingle()) {
parentComposite.setLayout(new FillLayout());

View file

@ -7,6 +7,7 @@
*
* Contributors:
* Intel Corporation - initial API and implementation
* Markus Schorn (Wind River Systems)
*******************************************************************************/
package org.eclipse.cdt.ui.newui;
@ -250,12 +251,11 @@ public abstract class CLocationTab extends AbstractCPropertyTab {
@Override
public void updateData(ICResourceDescription _cfgd) {
if (page.isMultiCfg()) {
usercomp.setVisible(false);
setAllVisible(false, ""); //$NON-NLS-1$
return;
}
if ( !usercomp.getVisible())
usercomp.setVisible(true);
setAllVisible(true, null);
cfgd = _cfgd;
src = new ArrayList<_Entry>();
for (ICExclusionPatternPathEntry e : getEntries(cfgd))