Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Krasilnikov2007-02-27 09:47:32 +0000
committerOleg Krasilnikov2007-02-27 09:47:32 +0000
commitb5e8c719fe2b8fb507970a3d09019015b91a66c5 (patch)
tree98bed449143c13d73ea9e7403145fc91ca197fea
parent7028cddf94514c156a20c07bdc1f12319cf7347e (diff)
downloadorg.eclipse.cdt-b5e8c719fe2b8fb507970a3d09019015b91a66c5.tar.gz
org.eclipse.cdt-b5e8c719fe2b8fb507970a3d09019015b91a66c5.tar.xz
org.eclipse.cdt-b5e8c719fe2b8fb507970a3d09019015b91a66c5.zip
Add "needsHeader()" method
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/plugin.xml4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/newui/PrefPage_NewCDTProject.java1
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPrefPage.java20
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PrefPage_Env.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PrefPage_Vars.java2
5 files changed, 17 insertions, 12 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/plugin.xml b/build/org.eclipse.cdt.managedbuilder.ui/plugin.xml
index e6a7010df10..7ca513f50b3 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/plugin.xml
+++ b/build/org.eclipse.cdt.managedbuilder.ui/plugin.xml
@@ -347,9 +347,9 @@
/>
<tab
class="org.eclipse.cdt.managedbuilder.ui.newui.BuilderSettingsTab"
+ icon="icons/obj16/build_settings.gif"
name="Builder settings"
- parent="org.eclipse.cdt.managedbuilder.ui.newui.PrefPage_NewCDTProject"
- />
+ parent="org.eclipse.cdt.managedbuilder.ui.newui.PrefPage_NewCDTProject"/>
</extension>
<extension
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/newui/PrefPage_NewCDTProject.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/newui/PrefPage_NewCDTProject.java
index ee899e2402e..ed97292de5d 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/newui/PrefPage_NewCDTProject.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/newui/PrefPage_NewCDTProject.java
@@ -36,4 +36,5 @@ public class PrefPage_NewCDTProject extends AbstractPrefPage {
return true;
}
+ protected boolean needsHeader() { return true; }
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPrefPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPrefPage.java
index 33cbe7d8f3a..693c024269c 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPrefPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPrefPage.java
@@ -41,14 +41,15 @@ public abstract class AbstractPrefPage extends AbstractPage
compositeLayout.marginWidth = 0;
composite.setLayout( compositeLayout );
- Group configGroup = ControlFactory.createGroup(composite, EMPTY_STR, 1);
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.grabExcessHorizontalSpace = true;
- configGroup.setLayoutData(gd);
- titleLabel = ControlFactory.createLabel(configGroup,
- NewUIMessages.getResourceString("AbstractPrefPage.0") + //$NON-NLS-1$
- NewUIMessages.getResourceString("AbstractPrefPage.1")); //$NON-NLS-1$
-
+ if (needsHeader()) {
+ Group configGroup = ControlFactory.createGroup(composite, EMPTY_STR, 1);
+ GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+ gd.grabExcessHorizontalSpace = true;
+ configGroup.setLayoutData(gd);
+ titleLabel = ControlFactory.createLabel(configGroup,
+ NewUIMessages.getResourceString("AbstractPrefPage.0") + //$NON-NLS-1$
+ NewUIMessages.getResourceString("AbstractPrefPage.1")); //$NON-NLS-1$
+ }
createWidgets(composite);
return composite;
}
@@ -58,6 +59,5 @@ public abstract class AbstractPrefPage extends AbstractPage
public void init(IWorkbench workbench) {}
public ICResourceDescription getResDesc() { return null; }
public void performApply() { performOk(); }
-
-
+ abstract protected boolean needsHeader();
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PrefPage_Env.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PrefPage_Env.java
index e097d2e2ea2..efe89889ac1 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PrefPage_Env.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PrefPage_Env.java
@@ -9,4 +9,6 @@ public class PrefPage_Env extends AbstractPrefPage {
forEach(ICPropertyTab.OK, null);
return true;
}
+
+ protected boolean needsHeader() { return false; }
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PrefPage_Vars.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PrefPage_Vars.java
index b492e6850fe..16809bc7d4a 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PrefPage_Vars.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PrefPage_Vars.java
@@ -3,10 +3,12 @@ package org.eclipse.cdt.ui.newui;
public class PrefPage_Vars extends AbstractPrefPage {
protected boolean isSingle() { return true; }
+ protected boolean needsHeader() { return false; }
// Tabs themselves should save data
public boolean performOk() {
forEach(ICPropertyTab.OK, null);
return true;
}
+
}

Back to the top