clean up SDK/Config tree by removing SDK Id from display (it's redundant) and also adding text that SDK location does not exist so users can see the config tree and know it won't work (not have it be hidden and users wonder why it's not there)
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/CarbideConfigurationDataProvider.java Wed Jun 09 13:42:27 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/CarbideConfigurationDataProvider.java Thu Jun 10 11:33:29 2010 -0500
@@ -40,7 +40,7 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.ui.internal.ide.handlers.BuildAllProjectsHandler;
+import org.osgi.framework.Version;
import com.nokia.carbide.cdt.builder.BuildArgumentsInfo;
import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
@@ -65,6 +65,7 @@
import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin;
+import com.nokia.carbide.cpp.sdk.core.SymbianSDKFactory;
/**
* Main interface point with CDT with regards to our build configurations. Note that
@@ -242,6 +243,12 @@
// TODO: NEED TO HANDLE MISSING SDK ID
if (sdk != null){
return new BuildContextSBSv2(sdk, platform, target, buidAlias, displayString, configID);
+ } else {
+// ISymbianSDK deadSDK = SymbianSDKFactory.createInstance(sdkID, "FIXME", "", new Version("0.0"), "", new Version("0.0"), false);
+// SDKCorePlugin.getSDKManager().addSDK(deadSDK);
+//
+// return new BuildContextSBSv2(deadSDK, platform, target, buidAlias, displayString, configID);
+ return null;
}
}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/ManageConfigurationsDialog.java Wed Jun 09 13:42:27 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/ManageConfigurationsDialog.java Thu Jun 10 11:33:29 2010 -0500
@@ -255,6 +255,7 @@
if (sbsv2Project){
replaceFilteredConfigsFromProject(sdkConfigTreeNodes);
}
+
properSdkViewer.setInput(sdkConfigTreeNodes);
propagateSdkTree();
properSdkViewer.addCheckStateListener(new ICheckStateListener() {
@@ -415,13 +416,6 @@
checkIt = true;
}
}
-// else if (v2Context.getSBSv2Alias().equals(currV2Context.getSBSv2Alias()) &&
-// v2Context.getPlatformString().equals(currExistingConfig.getPlatformString()) &&
-// v2Context.getSDK().getUniqueId().equals(currExistingConfig.getSDK().getUniqueId() )
-// && v2Context.getSBSv2Alias() != null && v2Context.getSBSv2Alias().split("_").length == 2){
-//
-// checkIt = true;
-// }
}
}
if (checkIt){
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/SymbianSDKFactory.java Wed Jun 09 13:42:27 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/SymbianSDKFactory.java Thu Jun 10 11:33:29 2010 -0500
@@ -74,4 +74,5 @@
return sdk;
}
+
}
--- a/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/sdk/ui/shared/BuildTargetTreeNode.java Wed Jun 09 13:42:27 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/sdk/ui/shared/BuildTargetTreeNode.java Thu Jun 10 11:33:29 2010 -0500
@@ -18,8 +18,8 @@
package com.nokia.carbide.cpp.sdk.ui.shared;
+import java.io.File;
import java.util.ArrayList;
-import java.util.Iterator;
import java.util.List;
import org.eclipse.jface.viewers.TreeNode;
@@ -64,7 +64,8 @@
@Override
public String toString() {
ISymbianBuildContext context = (ISymbianBuildContext)getValue();
- return context.getDisplayString();
+ String sdkId = context.getSDK().getUniqueId();
+ return context.getDisplayString().replace("[" + sdkId + "]", "");
}
};
}
@@ -76,6 +77,10 @@
*/
public String toString() {
ISymbianSDK value = (ISymbianSDK) getValue();
+ File f = new File(value.getEPOCROOT());
+ if (!f.exists()){
+ return value.getUniqueId() + " -- SDK location does not exist! Check Symbian SDKs!";
+ }
return value.getUniqueId();
}