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:
parent
32c4def642
commit
4c9d0ef2a3
1 changed files with 29 additions and 7 deletions
|
@ -6,9 +6,8 @@ package org.eclipse.cdt.ui.dialogs;
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
* http://www.eclipse.org/legal/cpl-v05.html
|
* http://www.eclipse.org/legal/cpl-v05.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors: QNX Software Systems - Initial API and implementation
|
||||||
* QNX Software Systems - Initial API and implementation
|
******************************************************************************/
|
||||||
***********************************************************************/
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
@ -46,11 +45,22 @@ public abstract class TabFolderOptionBlock {
|
||||||
|
|
||||||
private TabFolder fFolder;
|
private TabFolder fFolder;
|
||||||
|
|
||||||
public TabFolderOptionBlock(ICOptionContainer parent, boolean showMessageArea) {
|
public TabFolderOptionBlock(boolean showMessageArea) {
|
||||||
fParent = parent;
|
|
||||||
bShowMessageArea = 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) {
|
public TabFolderOptionBlock(ICOptionContainer parent) {
|
||||||
this(parent, true);
|
this(parent, true);
|
||||||
}
|
}
|
||||||
|
@ -94,6 +104,17 @@ public abstract class TabFolderOptionBlock {
|
||||||
return composite;
|
return composite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
protected ICOptionPage getStartPage() {
|
||||||
|
return (ICOptionPage) pages.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPageIndex() {
|
||||||
|
return pages.indexOf(getCurrentPage());
|
||||||
|
}
|
||||||
|
|
||||||
protected void createFolder(Composite parent) {
|
protected void createFolder(Composite parent) {
|
||||||
fFolder = new TabFolder(parent, SWT.NONE);
|
fFolder = new TabFolder(parent, SWT.NONE);
|
||||||
fFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
|
fFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||||
|
@ -168,8 +189,9 @@ public abstract class TabFolderOptionBlock {
|
||||||
if (ok) {
|
if (ok) {
|
||||||
setErrorMessage(null);
|
setErrorMessage(null);
|
||||||
ICOptionPage tab = getCurrentPage();
|
ICOptionPage tab = getCurrentPage();
|
||||||
if (bShowMessageArea && tab.getDescription() != null)
|
if (bShowMessageArea) {
|
||||||
messageLabel.setText(tab.getDescription());
|
messageLabel.setText(tab.getDescription() != null ? tab.getDescription() : ""); //$NON-NLS-1$
|
||||||
|
}
|
||||||
}
|
}
|
||||||
setValid(ok);
|
setValid(ok);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue