1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-13 11:15:38 +02:00

Pref pages interface changed

This commit is contained in:
Oleg Krasilnikov 2007-03-14 07:28:55 +00:00
parent 05ce3c487d
commit 8f0bb1d073
7 changed files with 32 additions and 9 deletions

View file

@ -24,6 +24,7 @@ MngOtherProp.name= Error/Binary Parsers
#The preference pages #The preference pages
MakeBuildPref.name=Makefile Project MakeBuildPref.name=Makefile Project
MngBuildPref.name=Managed Build MngBuildPref.name=Managed Build
NewCDTWizardPref.name=New CDT project wizard
#The Resource Property page #The Resource Property page
MngResourceProp.name=C/C++ Build MngResourceProp.name=C/C++ Build
@ -85,4 +86,5 @@ Environment=Environment
Binary.parsers=Binary parsers Binary.parsers=Binary parsers
Error.parsers=Error parsers Error.parsers=Error parsers
Data.hierarchy=Data hierarchy Data.hierarchy=Data hierarchy
Preferred.toolchains=Preferred toolchains
Wizard.defaults=Wizard defaults

View file

@ -15,6 +15,7 @@ import org.eclipse.cdt.core.settings.model.ICResourceDescription;
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
import org.eclipse.cdt.ui.newui.AbstractPrefPage; import org.eclipse.cdt.ui.newui.AbstractPrefPage;
import org.eclipse.cdt.ui.newui.ICPropertyTab; import org.eclipse.cdt.ui.newui.ICPropertyTab;
import org.eclipse.cdt.ui.newui.NewUIMessages;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
public class PrefPage_NewCDTProject extends AbstractPrefPage { public class PrefPage_NewCDTProject extends AbstractPrefPage {
@ -38,5 +39,8 @@ public class PrefPage_NewCDTProject extends AbstractPrefPage {
return true; return true;
} }
protected boolean needsHeader() { return true; } protected String getHeader() {
return NewUIMessages.getResourceString("AbstractPrefPage.0") + //$NON-NLS-1$
NewUIMessages.getResourceString("AbstractPrefPage.1"); //$NON-NLS-1$
}
} }

View file

@ -0,0 +1,16 @@
package org.eclipse.cdt.managedbuilder.ui.newui;
import org.eclipse.cdt.ui.newui.AbstractPrefPage;
public class PrefPage_NewCDTWizard extends AbstractPrefPage {
protected String getHeader() {
return Messages.getString("PrefPage_NewCDTWizard.0") + //$NON-NLS-1$
Messages.getString("PrefPage_NewCDTWizard.1"); //$NON-NLS-1$
}
protected boolean isSingle() {
return false;
}
}

View file

@ -68,3 +68,5 @@ BuildAllAction.4=Select...
BuildAllAction.5=Build selected configurations in parallel BuildAllAction.5=Build selected configurations in parallel
BuildAllAction.6=Select configurations to build BuildAllAction.6=Select configurations to build
BuildAllAction.7=Build configurations BuildAllAction.7=Build configurations
PrefPage_NewCDTWizard.0=Settings will be applied to CDT new project wizard
PrefPage_NewCDTWizard.1=\nduring project creation process

View file

@ -41,14 +41,13 @@ public abstract class AbstractPrefPage extends AbstractPage
compositeLayout.marginWidth = 0; compositeLayout.marginWidth = 0;
composite.setLayout( compositeLayout ); composite.setLayout( compositeLayout );
if (needsHeader()) { String s = getHeader();
if (s != null) {
Group configGroup = ControlFactory.createGroup(composite, EMPTY_STR, 1); Group configGroup = ControlFactory.createGroup(composite, EMPTY_STR, 1);
GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd.grabExcessHorizontalSpace = true; gd.grabExcessHorizontalSpace = true;
configGroup.setLayoutData(gd); configGroup.setLayoutData(gd);
titleLabel = ControlFactory.createLabel(configGroup, titleLabel = ControlFactory.createLabel(configGroup, s);
NewUIMessages.getResourceString("AbstractPrefPage.0") + //$NON-NLS-1$
NewUIMessages.getResourceString("AbstractPrefPage.1")); //$NON-NLS-1$
} }
createWidgets(composite); createWidgets(composite);
return composite; return composite;
@ -59,5 +58,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(); abstract protected String getHeader();
} }

View file

@ -10,5 +10,5 @@ public class PrefPage_Env extends AbstractPrefPage {
return true; return true;
} }
protected boolean needsHeader() { return false; } protected String getHeader() { return null; }
} }

View file

@ -3,7 +3,7 @@ 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; } protected String getHeader() { return null; }
// Tabs themselves should save data // Tabs themselves should save data
public boolean performOk() { public boolean performOk() {