--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/LaunchWizardData.java Tue Mar 02 15:35:01 2010 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/LaunchWizardData.java Wed Mar 03 08:25:45 2010 -0600
@@ -355,7 +355,7 @@
return null;
}
- private IPath getExePath() {
+ public IPath getExePath() {
// if attach, doesn't matter so return first exe
if (exeSelection.equals(EExeSelection.ATTACH_TO_PROCESS))
return exes.isEmpty() ? Path.EMPTY : exes.get(0);
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/UnifiedLaunchOptionsPage.java Tue Mar 02 15:35:01 2010 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/UnifiedLaunchOptionsPage.java Wed Mar 03 08:25:45 2010 -0600
@@ -17,6 +17,7 @@
package com.nokia.cdt.internal.debug.launch.newwizard;
+import java.io.File;
import java.text.MessageFormat;
import java.util.ArrayList;
@@ -31,6 +32,7 @@
import com.nokia.cdt.internal.debug.launch.LaunchPlugin;
import com.nokia.cdt.internal.debug.launch.newwizard.IWizardSection.ISectionChangeListener;
+import com.nokia.cdt.internal.debug.launch.newwizard.LaunchWizardData.EExeSelection;
import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils;
/**
@@ -126,6 +128,13 @@
status.getMessage()));
severity = Math.max(severity, status.getSeverity());
}
+ if (severity == IStatus.OK) {
+ IStatus status = getStatus();
+ if (!status.isOK()) {
+ builder.append(status.getMessage());
+ severity = status.getSeverity();
+ }
+ }
if (severity != 0 || builder.length() > 0) {
// error from one or more sections
pageStatus = new Status(severity, LaunchPlugin.PLUGIN_ID, builder.toString());
@@ -138,7 +147,7 @@
if (pageStatus != null && !pageStatus.isOK()) {
setMessage(pageStatus.getMessage(), severityToMsgType(pageStatus.getSeverity()));
- setPageComplete(false);
+ setPageComplete(pageStatus.getSeverity() < IStatus.ERROR);
}
}
@@ -155,15 +164,30 @@
}
}
- /*
- private String getSeverityTag(int severity) {
- if (severity == IStatus.OK || severity == IStatus.INFO || severity == IStatus.CANCEL)
- return "";
- if (severity == IStatus.WARNING)
- return "warning";
- return "error";
+ protected IStatus getStatus() {
+ return checkBuildProducts();
}
- */
+
+ private IStatus checkBuildProducts() {
+ if (!data.isCurrentBuildBeforeLaunch()) {
+ // check sis files
+ String sisPath = data.getSisPath();
+ if (data.isInstallPackage() &&
+ sisPath != null && !new File(sisPath).exists()) {
+ return new Status(IStatus.WARNING, LaunchPlugin.PLUGIN_ID,
+ Messages.getString("UnifiedLaunchOptionsPage.SISFileMissingWarning")); //$NON-NLS-1$
+ }
+ // check launch file
+ if (data.getExeSelection().equals(EExeSelection.USE_PROJECT_EXECUTABLE) &&
+ !data.getExePath().toFile().exists()) {
+ return new Status(IStatus.WARNING, LaunchPlugin.PLUGIN_ID,
+ Messages.getString("UnifiedLaunchOptionsPage.ExeFileMissingWarning")); //$NON-NLS-1$
+
+ }
+ }
+
+ return Status.OK_STATUS;
+ }
public void initializeSettings() {
for (IWizardSection section : sections) {
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/messages.properties Tue Mar 02 15:35:01 2010 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/messages.properties Wed Mar 03 08:25:45 2010 -0600
@@ -75,5 +75,7 @@
OtherSettingsSection.Title=Other settings
OtherSettingsSection.WorkspaceLabel=\ (workspace setting)
UnifiedLaunchOptionsPage.Desc=Configure the connection and process to launch.
+UnifiedLaunchOptionsPage.ExeFileMissingWarning=Executable file does not exist. Without building, launch may fail.
+UnifiedLaunchOptionsPage.SISFileMissingWarning=Install file does not exist. Without building, launch may fail.
UnifiedLaunchOptionsPage.Title=Configure Launch Settings
UnifiedLaunchOptionsPage.TitleText=Configure launch configuration