debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/DebugRunProcessSection.java
changeset 1186 067198a8221d
parent 1090 02cf64aef519
child 1211 ad0a46b0b85f
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/DebugRunProcessSection.java	Thu Apr 08 14:41:29 2010 -0500
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/DebugRunProcessSection.java	Thu Apr 08 15:03:50 2010 -0500
@@ -61,7 +61,9 @@
 		if (Path.EMPTY.equals(data.getExeSelectionPath()))
 			data.setExeSelection(EExeSelection.ATTACH_TO_PROCESS);
 		ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(data.getProject());
-		data.setInstallPackage(!data.isSysTRKConnection() && !data.getExeSelection().equals(EExeSelection.ATTACH_TO_PROCESS));
+		data.setInstallPackage((data.isSysTRKConnection() == Boolean.FALSE  /* but NOT if unknown */
+								|| !data.isInternalLayout())
+				&& !data.getExeSelection().equals(EExeSelection.ATTACH_TO_PROCESS));
 		if (cpi != null) {
 			ICarbideBuildConfiguration config = cpi.getDefaultConfiguration();
 			for (ISISBuilderInfo info : config.getSISBuilderInfoList()) {
@@ -103,7 +105,8 @@
 		}
 
 		if (data.isInstallPackage() && (data.getSisPath() == null || data.getSisPath().length() == 0))
-			status = error(Messages.getString("DebugRunProcessSection.MustInstallError")); //$NON-NLS-1$
+			status = error(Messages.getString("DebugRunProcessSection.MustInstallError"),
+					data.getModeLabel().toLowerCase()); //$NON-NLS-1$
 	}
 
 	@Override
@@ -118,10 +121,12 @@
 	
 			switch (data.getExeSelection()) {
 			case USE_PROJECT_EXECUTABLE:
-				runOrLaunchMsg = MessageFormat.format(Messages.getString("DebugRunProcessSection.LaunchFormat"), data.getExeSelectionPath().lastSegment()); //$NON-NLS-1$
+				runOrLaunchMsg = MessageFormat.format(Messages.getString("DebugRunProcessSection.LaunchFormat"), 
+						data.getExeSelectionPath().lastSegment()); //$NON-NLS-1$
 				break;
 			case USE_REMOTE_EXECUTABLE:
-				runOrLaunchMsg = MessageFormat.format(Messages.getString("DebugRunProcessSection.LaunchFormat"), PathUtils.convertPathToWindows(data.getExeSelectionPath())); //$NON-NLS-1$
+				runOrLaunchMsg = MessageFormat.format(Messages.getString("DebugRunProcessSection.LaunchFormat"), 
+						PathUtils.convertPathToWindows(data.getExeSelectionPath().toString())); //$NON-NLS-1$
 				break;
 			case ATTACH_TO_PROCESS:
 				runOrLaunchMsg = Messages.getString("DebugRunProcessSection.AttachMsg"); //$NON-NLS-1$
@@ -140,10 +145,10 @@
 	}
 
 	private String getCopyOrInstallMsg() {
-		if (data.isSysTRKConnection() || !data.isInstallPackage())
+		if (data.requiresInstallPackage())
+			return MessageFormat.format(Messages.getString("DebugRunProcessSection.InstallMsg"), data.getSisPath()); //$NON-NLS-1$
+		else
 			return Messages.getString("DebugRunProcessSection.CopyMsg"); //$NON-NLS-1$
-		else
-			return MessageFormat.format(Messages.getString("DebugRunProcessSection.InstallMsg"), data.getSisPath()); //$NON-NLS-1$
 	}
 
 }