[Esbox-commits] r1550 - trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/nokiabin
fabricioepa at garage.maemo.org
fabricioepa at garage.maemo.org
Thu May 7 16:21:57 EEST 2009
Author: fabricioepa
Date: 2009-05-07 16:21:55 +0300 (Thu, 07 May 2009)
New Revision: 1550
Modified:
trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/nokiabin/SDKTargetSelectionPage.java
Log:
Capitalizing platform names and adding check for null target
Modified: trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/nokiabin/SDKTargetSelectionPage.java
===================================================================
--- trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/nokiabin/SDKTargetSelectionPage.java 2009-05-07 13:17:12 UTC (rev 1549)
+++ trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/nokiabin/SDKTargetSelectionPage.java 2009-05-07 13:21:55 UTC (rev 1550)
@@ -45,11 +45,11 @@
/**
*
*/
- public static final String DIABLO = "diablo";
+ public static final String DIABLO = "DIABLO";
/**
*
*/
- public static final String FREMANTLE = "fremantle";
+ public static final String FREMANTLE = "FREMANTLE";
public static final String[] SDK_NAMES = new String[] { DIABLO, FREMANTLE };
/**
@@ -175,12 +175,13 @@
private void selectDefaults() {
//Select default platform
ISDKTarget[] targets = getDefaultTargets();
- if(targets !=null && targets.length != 0 ){
- int index = Arrays.asList(SDK_NAMES).indexOf(targets[0].getPlatform().getName().toLowerCase());
+ ISDKTarget target = null;
+ if(targets !=null && targets.length != 0 && (target = targets[0]) !=null){
+ int index = Arrays.asList(SDK_NAMES).indexOf(target.getPlatform().getName().toUpperCase());
if(index != -1){
fmaemoSDKCombo.select(index);
updateUI();
- targetTree.expandToLevel(targets[0], TreeViewer.ALL_LEVELS);
+ targetTree.expandToLevel(target, TreeViewer.ALL_LEVELS);
targetTree.setCheckedElements(targets);
}
setPageComplete(validatePage());
@@ -282,12 +283,12 @@
}
public boolean accept(ISDK sdk) {
- if (sdk.getName().toLowerCase().equals(scratchbox))
+ if (sdk.getName().equalsIgnoreCase(scratchbox))
return true;
return false;
}
public boolean accept(ISDKTarget sdkTarget) {
- if (sdkTarget.getPlatform().getName().toLowerCase().equals(sdkname))
+ if (sdkTarget.getPlatform().getName().equalsIgnoreCase(sdkname))
return true;
return false;
}
@@ -297,10 +298,10 @@
static final class Factory {
public static IWizardPage createNextPage(String sdkName, NokiaBinariesInstallWizard wizard) {
IWizardPage page = null;
- if (sdkName != null && sdkName.equals(FREMANTLE)) {
+ if (sdkName != null && sdkName.equalsIgnoreCase(FREMANTLE)) {
page = new FremantleLicenseAgreementPage(wizard);
}
- if (sdkName != null && sdkName.equals(DIABLO)) {
+ if (sdkName != null && sdkName.equalsIgnoreCase(DIABLO)) {
page = new DiabloInstallerScriptWorkPage(wizard);
}
return page;
More information about the Esbox-commits
mailing list