core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/sdk/ui/shared/AddSDKDialog.java
changeset 740 ba87a4b50604
parent 677 d13345e153e8
child 1421 587da7cb64b7
equal deleted inserted replaced
739:68ec3f10b981 740:ba87a4b50604
    46 import com.nokia.carbide.cpp.internal.sdk.ui.SDKUIHelpIds;
    46 import com.nokia.carbide.cpp.internal.sdk.ui.SDKUIHelpIds;
    47 import com.nokia.carbide.cpp.sdk.core.ISDKManager;
    47 import com.nokia.carbide.cpp.sdk.core.ISDKManager;
    48 import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
    48 import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
    49 import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin;
    49 import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin;
    50 import com.nokia.carbide.cpp.sdk.core.SymbianSDKFactory;
    50 import com.nokia.carbide.cpp.sdk.core.SymbianSDKFactory;
       
    51 import com.nokia.cpp.internal.api.utils.core.HostOS;
    51 import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils;
    52 import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils;
    52 
    53 
    53 /**
    54 /**
    54  * Dialog that allows the user to add a new Symbian OS SDK or custkit
    55  * Dialog that allows the user to add a new Symbian OS SDK or custkit
    55  * to the devices.xml file.
    56  * to the devices.xml file.
   104 			MessageDialog.openError(getShell(), Messages.getString("AddSDKDialog.Missing_SDK_ID"), Messages.getString("AddSDKDialog.Enter_SDK_ID")); //$NON-NLS-1$ //$NON-NLS-2$
   105 			MessageDialog.openError(getShell(), Messages.getString("AddSDKDialog.Missing_SDK_ID"), Messages.getString("AddSDKDialog.Enter_SDK_ID")); //$NON-NLS-1$ //$NON-NLS-2$
   105 			return;
   106 			return;
   106 		}
   107 		}
   107 		
   108 		
   108 		if (epocRootText.getText().length() > 1){
   109 		if (epocRootText.getText().length() > 1){
   109 			if (epocRootText.getText().charAt(1) != ':'){
   110 			if (HostOS.IS_WIN32 && epocRootText.getText().charAt(1) != ':'){
   110 				MessageDialog.openError(getShell(), Messages.getString("AddSDKDialog.Malformed_EPOCROOT"), Messages.getString("AddSDKDialog.EPOCROOT_drive_spec")); //$NON-NLS-1$ //$NON-NLS-2$
   111 				MessageDialog.openError(getShell(), Messages.getString("AddSDKDialog.Malformed_EPOCROOT"), Messages.getString("AddSDKDialog.EPOCROOT_drive_spec")); //$NON-NLS-1$ //$NON-NLS-2$
   111 				return;
   112 				return;
   112 			}
   113 			}
   113 			
   114 			
   114 			if (epocRootText.getText().toUpperCase().endsWith("EPOC32") || epocRootText.getText().toUpperCase().endsWith("EPOC32\\")){ //$NON-NLS-1$ //$NON-NLS-2$
   115 			if (epocRootText.getText().toUpperCase().endsWith("EPOC32") || epocRootText.getText().toUpperCase().endsWith("EPOC32\\")){ //$NON-NLS-1$ //$NON-NLS-2$
   359 	}
   360 	}
   360 	
   361 	
   361 	private void browseEPOCROOT(){
   362 	private void browseEPOCROOT(){
   362         DirectoryDialog browseDir = new DirectoryDialog(getShell(), SWT.OPEN);
   363         DirectoryDialog browseDir = new DirectoryDialog(getShell(), SWT.OPEN);
   363         browseDir.setMessage(Messages.getString("AddSDKDialog.Choose_location_for_EPOCROOT")); //$NON-NLS-1$
   364         browseDir.setMessage(Messages.getString("AddSDKDialog.Choose_location_for_EPOCROOT")); //$NON-NLS-1$
   364         BrowseDialogUtils.initializeFrom(browseDir, "C:/Symbian/"); //$NON-NLS-1$
   365         BrowseDialogUtils.initializeFrom(browseDir, HostOS.IS_WIN32 ? "C:/Symbian/" : null); //$NON-NLS-1$
   365         String dirText = browseDir.open();
   366         String dirText = browseDir.open();
   366         if (dirText != null){
   367         if (dirText != null){
   367         	epocRootText.setText(dirText);
   368         	epocRootText.setText(dirText);
   368         }
   369         }
   369 	}
   370 	}