Fix bug 10835. RCL_2_4
authortimkelly
Thu, 04 Mar 2010 13:16:46 -0600
branchRCL_2_4
changeset 1078 27b0f877c86e
parent 1076 326a4daf1279
child 1079 8915e650957c
Fix bug 10835.
project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/sharedui/BuilderSelectionComposite.java
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/sharedui/BuilderSelectionComposite.java	Wed Mar 03 14:14:55 2010 -0600
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/sharedui/BuilderSelectionComposite.java	Thu Mar 04 13:16:46 2010 -0600
@@ -16,12 +16,11 @@
 */
 package com.nokia.carbide.cpp.internal.project.ui.sharedui;
 
+import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Combo;
@@ -31,7 +30,6 @@
 import com.nokia.carbide.cpp.internal.api.sdk.SBSv2Utils;
 import com.nokia.carbide.cpp.internal.project.ui.Messages;
 import com.nokia.carbide.cpp.internal.project.ui.ProjectUIPlugin;
-import com.nokia.carbide.cpp.internal.sdk.core.model.SDKManager;
 import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin;
 import com.nokia.carbide.cpp.sdk.ui.shared.BuildTargetsPage;
 
@@ -88,11 +86,17 @@
 		IStatus status = null;
 		if (builderCombo != null && builderCombo.getSelectionIndex() == 1) {
 			
+			IPath sbsBinPath = SBSv2Utils.getSBSBinDirectory(); 
+			
 			// if SBSv2 is selected, make sure SBS_HOME is defined
 			if (SBSv2Utils.getSBSBinDirectory() == null){
 				status = new Status(Status.ERROR, ProjectUIPlugin.PLUGIN_ID, "SBS_HOME environment variable is not defined. Carbide needs this variable to find the base SBS install.");
 			}
 			
+			// check to see if SBS_HOME directory really exists
+			else if (!sbsBinPath.toFile().exists()){
+				status = new Status(Status.ERROR, ProjectUIPlugin.PLUGIN_ID, "SBS_HOME environment variable path does not exist: " + sbsBinPath.toOSString()); 
+			}
 			// check the raptor version
 			else if (SDKCorePlugin.getSDKManager().getSBSv2Version(false).getMajor() == 0){
 				// Try to scan again....