Merge commit
authorEd Swartz <ed.swartz@nokia.com>
Wed, 09 Dec 2009 15:44:24 -0600
changeset 667 0d624765b49c
parent 666 4817219999f0 (diff)
parent 662 de059f9c85e6 (current diff)
child 668 633bb201cd8d
child 672 d1a48eefce6b
Merge commit
debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TRKConnectedService.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java	Wed Dec 09 14:43:53 2009 -0600
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java	Wed Dec 09 15:44:24 2009 -0600
@@ -131,6 +131,7 @@
 		return true;
 	}
 	
+	@SuppressWarnings("unchecked")
 	private <T> void loadExtensions(String extensionId, String loadError, Collection<T> extensionObjects, IFilter filter) {
 		IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
 		IExtensionPoint extensionPoint = extensionRegistry.getExtensionPoint(extensionId);
@@ -235,7 +236,8 @@
 		List<IConnectedService> connectedServices = new ArrayList<IConnectedService>();
 		for (IService service : getCompatibleServices(connection.getConnectionType())) {
 			IConnectedService connectedService = createConnectedService(service, connection);
-			connectedServices.add(connectedService);
+			if (connectedService != null)
+				connectedServices.add(connectedService);
 		}
 		return connectedServices;
 	}
@@ -305,7 +307,7 @@
 		Collection<IService> services = connectionTypeToServices.get(connectionType);
 		if (services != null)
 			return new ArrayList<IService>(services);
-		return Collections.EMPTY_LIST;
+		return Collections.emptyList();
 	}
 	
 	/* (non-Javadoc)
--- a/connectivity/com.nokia.tcf/src/com/nokia/tcf/impl/TCAPIConnection.java	Wed Dec 09 14:43:53 2009 -0600
+++ b/connectivity/com.nokia.tcf/src/com/nokia/tcf/impl/TCAPIConnection.java	Wed Dec 09 15:44:24 2009 -0600
@@ -46,7 +46,12 @@
 			} catch (UnsatisfiedLinkError e) {
 				// if Carbide DLL is not found in DE, 
 				// try to load one from the plugin itself
-				System.loadLibrary("TCFClient");
+				try {
+					System.loadLibrary("TCFClient");
+				} catch (UnsatisfiedLinkError e2) {
+					// no native TCF, e.g., not on Windows or in a misconfigured dev layout
+					e2.printStackTrace();
+				}
 			}
 		}
 	}
--- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/ConnectedServiceFactory.java	Wed Dec 09 14:43:53 2009 -0600
+++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/ConnectedServiceFactory.java	Wed Dec 09 15:44:24 2009 -0600
@@ -20,6 +20,7 @@
 
 import com.nokia.carbide.remoteconnections.interfaces.*;
 import com.nokia.carbide.trk.support.connection.*;
+import com.nokia.cpp.internal.api.utils.core.HostOS;
 
 import java.util.*;
 
@@ -34,10 +35,14 @@
 	public IConnectedService createConnectedService(IService service, IConnection connection) {
 		if (service instanceof TracingService &&
 				isCompatibleConnection(getCompatibleTracingConnectionTypeIds(), connection)) {
+			if (HostOS.IS_UNIX)
+				return null;		// TODO: not ported
 			return new TracingConnectedService(service, (AbstractSynchronizedConnection) connection);
 		}
 		else if (service instanceof TRKService &&
 				isCompatibleConnection(getCompatibleTRKConnectionTypeIds(), connection)) {
+			if (HostOS.IS_UNIX)
+				return null;		// TODO: not ported
 			return new TRKConnectedService(service, (AbstractSynchronizedConnection) connection);
 		}
 		
@@ -75,7 +80,7 @@
 			return getCompatibleTRKConnectionTypeIds();
 		else if (service instanceof TracingService)
 			return getCompatibleTracingConnectionTypeIds();
-		return Collections.EMPTY_LIST;
+		return Collections.emptyList();
 	}
 
 }
--- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TRKConnectedService.java	Wed Dec 09 14:43:53 2009 -0600
+++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TRKConnectedService.java	Wed Dec 09 15:44:24 2009 -0600
@@ -41,7 +41,12 @@
 public class TRKConnectedService extends AbstractConnectedService {
 	
 	static {
-		System.loadLibrary("GetTRKVersion"); //$NON-NLS-1$
+		try {
+			System.loadLibrary("GetTRKVersion"); //$NON-NLS-1$
+		} catch (UnsatisfiedLinkError e) {
+			// no such library, e.g., not on Windows or in a misconfigured dev layout
+			e.printStackTrace();
+		}
 	}
 	
 	public native static void getTRKVersionFromSerial(String portName, 
--- a/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/SettingsData.java	Wed Dec 09 14:43:53 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/SettingsData.java	Wed Dec 09 15:44:24 2009 -0600
@@ -62,6 +62,7 @@
 import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
 import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin;
 import com.nokia.carbide.remoteconnections.interfaces.IConnection;
+import com.nokia.cpp.internal.api.utils.core.HostOS;
 
 import cwdbg.PreferenceConstants;
 
@@ -382,7 +383,7 @@
 				// otherwise warn them that we can't set default values.
 				if (buildConfig.getPlatformString().compareTo(ISymbianBuildContext.EMULATOR_PLATFORM) != 0) {
 					configuration.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, mainExeHostPath == null ? "" : mainExeHostPath.toOSString());
-					configuration.setAttribute(PreferenceConstants.J_PN_RemoteProcessToLaunch, mainExeTargetPath == null ? "" : mainExeTargetPath.toOSString());
+					configuration.setAttribute(PreferenceConstants.J_PN_RemoteProcessToLaunch, mainExeTargetPath == null ? "" : HostOS.convertPathToWindows(mainExeTargetPath));
 				} else {
 					displayWarningDialog(Messages.getString("SettingsData.37")); //$NON-NLS-1$
 				}
@@ -528,9 +529,9 @@
 					if (hp != null) {
 						IPath tp = EpocEngineHelper.getTargetPathForExecutable(buildConfig, mmp);
 						if (tp == null) {
-							tp = new Path(defaultTargetPath).append(hp.lastSegment());
+							tp = HostOS.createPathFromString(defaultTargetPath).append(hp.lastSegment());
 						}
-						prefsData += hp.toOSString() + "," + tp.toOSString() + enabled; //$NON-NLS-1$
+						prefsData += hp.toOSString() + "," + HostOS.convertPathToWindows(tp) + enabled; //$NON-NLS-1$
 					}
 					
 					HashMap<String, String> hostTargetRSRCMap = EpocEngineHelper.getHostAndTargetResources(buildConfig, mmp);
@@ -687,7 +688,8 @@
 				if (cpi != null) {			
 					ICarbideBuildConfiguration buildConfig = cpi.getDefaultConfiguration();
 
-					mainExeTargetPath = getCanonicalPath(EpocEngineHelper.getTargetPathForExecutable(buildConfig, workspaceRelativeMMPPath));
+					// do not canonicalize
+					mainExeTargetPath = EpocEngineHelper.getTargetPathForExecutable(buildConfig, workspaceRelativeMMPPath);
 				}
 			}
 		}
@@ -1018,7 +1020,7 @@
 	}
 	
 	public static void setProcessToLaunch(ILaunchConfigurationWorkingCopy configuration, IPath path) {
-		configuration.setAttribute(PreferenceConstants.J_PN_RemoteProcessToLaunch, path.toOSString());
+		configuration.setAttribute(PreferenceConstants.J_PN_RemoteProcessToLaunch, HostOS.convertPathToWindows(path));
 	}
 	
 }
\ No newline at end of file
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/AddEditFileToTransferDialog.java	Wed Dec 09 14:43:53 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/AddEditFileToTransferDialog.java	Wed Dec 09 15:44:24 2009 -0600
@@ -38,6 +38,8 @@
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.PlatformUI;
 
+import com.nokia.cpp.internal.api.utils.core.HostOS;
+
 public class AddEditFileToTransferDialog extends StatusDialog {
 
 	private FileToTransfer fFile;
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/FileTransferTab.java	Wed Dec 09 14:43:53 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/FileTransferTab.java	Wed Dec 09 15:44:24 2009 -0600
@@ -18,6 +18,7 @@
 
 import com.nokia.cdt.debug.cw.symbian.SettingsData;
 import com.nokia.cdt.internal.debug.launch.LaunchPlugin;
+import com.nokia.cpp.internal.api.utils.core.HostOS;
 
 import cwdbg.PreferenceConstants;
 
@@ -90,7 +91,7 @@
 					StringTokenizer tokenizer = new StringTokenizer(filesString, ","); //$NON-NLS-1$
 					while (tokenizer.hasMoreTokens()) {
 						IPath hp = new Path(tokenizer.nextToken());
-						IPath tp = new Path(tokenizer.nextToken());
+						IPath tp = HostOS.createPathFromString(tokenizer.nextToken());
 						// ensure there was no filename before
 						if (tp.getFileExtension() == null) {
 							tp = tp.append(hp.lastSegment());
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/InstallationTab.java	Wed Dec 09 14:43:53 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/InstallationTab.java	Wed Dec 09 15:44:24 2009 -0600
@@ -144,6 +144,9 @@
 				dialog.setFilterExtensions(new String[] {"*.sis*", "*.*"}); //$NON-NLS-1$ //$NON-NLS-2$
 				dialog.setFilterNames(new String[] {Messages.getString("InstallationTab.27"), Messages.getString("InstallationTab.28")}); //$NON-NLS-1$ //$NON-NLS-2$
 
+				dialog.setFilterPath(new File(hostPath.getText()).getParent());
+				dialog.setFileName(new File(hostPath.getText()).getName());
+				
 				String result = dialog.open();
 				if (result != null && new File(result).exists()) {
 					hostPath.setText(result);