1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

some changes to better extend

This commit is contained in:
David Inglis 2004-03-04 20:17:22 +00:00
parent 32c4def642
commit 4c9d0ef2a3

View file

@ -6,9 +6,8 @@ package org.eclipse.cdt.ui.dialogs;
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v05.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
***********************************************************************/
* Contributors: QNX Software Systems - Initial API and implementation
******************************************************************************/
import java.util.ArrayList;
import java.util.Iterator;
@ -46,11 +45,22 @@ public abstract class TabFolderOptionBlock {
private TabFolder fFolder;
public TabFolderOptionBlock(ICOptionContainer parent, boolean showMessageArea) {
fParent = parent;
public TabFolderOptionBlock(boolean showMessageArea) {
bShowMessageArea = showMessageArea;
}
public TabFolderOptionBlock(ICOptionContainer parent, boolean showMessageArea) {
bShowMessageArea = showMessageArea;
setOptionContainer(parent);
}
/**
* @param parent
*/
public void setOptionContainer(ICOptionContainer parent) {
fParent = parent;
}
public TabFolderOptionBlock(ICOptionContainer parent) {
this(parent, true);
}
@ -94,6 +104,17 @@ public abstract class TabFolderOptionBlock {
return composite;
}
/**
* @return
*/
protected ICOptionPage getStartPage() {
return (ICOptionPage) pages.get(0);
}
public int getPageIndex() {
return pages.indexOf(getCurrentPage());
}
protected void createFolder(Composite parent) {
fFolder = new TabFolder(parent, SWT.NONE);
fFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
@ -168,8 +189,9 @@ public abstract class TabFolderOptionBlock {
if (ok) {
setErrorMessage(null);
ICOptionPage tab = getCurrentPage();
if (bShowMessageArea && tab.getDescription() != null)
messageLabel.setText(tab.getDescription());
if (bShowMessageArea) {
messageLabel.setText(tab.getDescription() != null ? tab.getDescription() : ""); //$NON-NLS-1$
}
}
setValid(ok);
}