mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +02:00
Add "needsHeader()" method
This commit is contained in:
parent
7028cddf94
commit
b5e8c719fe
5 changed files with 17 additions and 12 deletions
|
@ -347,9 +347,9 @@
|
||||||
/>
|
/>
|
||||||
<tab
|
<tab
|
||||||
class="org.eclipse.cdt.managedbuilder.ui.newui.BuilderSettingsTab"
|
class="org.eclipse.cdt.managedbuilder.ui.newui.BuilderSettingsTab"
|
||||||
|
icon="icons/obj16/build_settings.gif"
|
||||||
name="Builder settings"
|
name="Builder settings"
|
||||||
parent="org.eclipse.cdt.managedbuilder.ui.newui.PrefPage_NewCDTProject"
|
parent="org.eclipse.cdt.managedbuilder.ui.newui.PrefPage_NewCDTProject"/>
|
||||||
/>
|
|
||||||
</extension>
|
</extension>
|
||||||
|
|
||||||
<extension
|
<extension
|
||||||
|
|
|
@ -36,4 +36,5 @@ public class PrefPage_NewCDTProject extends AbstractPrefPage {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean needsHeader() { return true; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,14 +41,15 @@ public abstract class AbstractPrefPage extends AbstractPage
|
||||||
compositeLayout.marginWidth = 0;
|
compositeLayout.marginWidth = 0;
|
||||||
composite.setLayout( compositeLayout );
|
composite.setLayout( compositeLayout );
|
||||||
|
|
||||||
Group configGroup = ControlFactory.createGroup(composite, EMPTY_STR, 1);
|
if (needsHeader()) {
|
||||||
GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
|
Group configGroup = ControlFactory.createGroup(composite, EMPTY_STR, 1);
|
||||||
gd.grabExcessHorizontalSpace = true;
|
GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
|
||||||
configGroup.setLayoutData(gd);
|
gd.grabExcessHorizontalSpace = true;
|
||||||
titleLabel = ControlFactory.createLabel(configGroup,
|
configGroup.setLayoutData(gd);
|
||||||
NewUIMessages.getResourceString("AbstractPrefPage.0") + //$NON-NLS-1$
|
titleLabel = ControlFactory.createLabel(configGroup,
|
||||||
NewUIMessages.getResourceString("AbstractPrefPage.1")); //$NON-NLS-1$
|
NewUIMessages.getResourceString("AbstractPrefPage.0") + //$NON-NLS-1$
|
||||||
|
NewUIMessages.getResourceString("AbstractPrefPage.1")); //$NON-NLS-1$
|
||||||
|
}
|
||||||
createWidgets(composite);
|
createWidgets(composite);
|
||||||
return composite;
|
return composite;
|
||||||
}
|
}
|
||||||
|
@ -58,6 +59,5 @@ public abstract class AbstractPrefPage extends AbstractPage
|
||||||
public void init(IWorkbench workbench) {}
|
public void init(IWorkbench workbench) {}
|
||||||
public ICResourceDescription getResDesc() { return null; }
|
public ICResourceDescription getResDesc() { return null; }
|
||||||
public void performApply() { performOk(); }
|
public void performApply() { performOk(); }
|
||||||
|
abstract protected boolean needsHeader();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,4 +9,6 @@ public class PrefPage_Env extends AbstractPrefPage {
|
||||||
forEach(ICPropertyTab.OK, null);
|
forEach(ICPropertyTab.OK, null);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean needsHeader() { return false; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,12 @@ package org.eclipse.cdt.ui.newui;
|
||||||
public class PrefPage_Vars extends AbstractPrefPage {
|
public class PrefPage_Vars extends AbstractPrefPage {
|
||||||
|
|
||||||
protected boolean isSingle() { return true; }
|
protected boolean isSingle() { return true; }
|
||||||
|
protected boolean needsHeader() { return false; }
|
||||||
|
|
||||||
// Tabs themselves should save data
|
// Tabs themselves should save data
|
||||||
public boolean performOk() {
|
public boolean performOk() {
|
||||||
forEach(ICPropertyTab.OK, null);
|
forEach(ICPropertyTab.OK, null);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue