Test if main script exists
diff --git a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/AbstractScriptLaunchConfigurationDelegate.java b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/AbstractScriptLaunchConfigurationDelegate.java
index 32d521b..971fa4f 100644
--- a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/AbstractScriptLaunchConfigurationDelegate.java
+++ b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/AbstractScriptLaunchConfigurationDelegate.java
@@ -55,6 +55,7 @@
import org.eclipse.dltk.internal.launching.DLTKLaunchingPlugin;
import org.eclipse.dltk.internal.launching.InterpreterRuntimeBuildpathEntryResolver;
import org.eclipse.dltk.launching.debug.DebuggingEngineManager;
+import org.eclipse.osgi.util.NLS;
import com.ibm.icu.text.MessageFormat;
@@ -748,7 +749,24 @@
if (environment != null) {
final IFileHandle file = environment.getFile(scriptURI);
if (file != null) {
+ if (!file.exists()) {
+ abort(
+ NLS
+ .bind(
+ LaunchingMessages.AbstractScriptLaunchConfigurationDelegate_Main_script_not_exist,
+ file.toOSString()),
+ null,
+ ScriptLaunchConfigurationConstants.ERR_UNSPECIFIED_MAIN_SCRIPT);
+ }
return file.getPath().toOSString();
+ } else {
+ abort(
+ NLS
+ .bind(
+ LaunchingMessages.AbstractScriptLaunchConfigurationDelegate_Main_script_not_resolved,
+ mainScriptName),
+ null,
+ ScriptLaunchConfigurationConstants.ERR_UNSPECIFIED_MAIN_SCRIPT);
}
}
}
diff --git a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/LaunchingMessages.java b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/LaunchingMessages.java
index 3c41c85..31862ed 100644
--- a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/LaunchingMessages.java
+++ b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/LaunchingMessages.java
@@ -55,7 +55,10 @@
public static String AbstractScriptLaunchConfigurationDelegate_InterpreterEnvironment_home_directory_for__0__does_not_exist___1__6;
public static String AbstractScriptLaunchConfigurationDelegate_InterpreterEnvironment_home_directory_not_specified_for__0__5;
+
public static String AbstractScriptLaunchConfigurationDelegate_Main_type_not_specified_11;
+ public static String AbstractScriptLaunchConfigurationDelegate_Main_script_not_exist;
+ public static String AbstractScriptLaunchConfigurationDelegate_Main_script_not_resolved;
public static String AbstractScriptLaunchConfigurationDelegate_startingLaunchConfiguration;
public static String AbstractScriptLaunchConfigurationDelegate_The_specified_InterpreterEnvironment_installation_does_not_exist_4;
diff --git a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/LaunchingMessages.properties b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/LaunchingMessages.properties
index 86b63e0..c94e16f 100644
--- a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/LaunchingMessages.properties
+++ b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/LaunchingMessages.properties
@@ -21,6 +21,8 @@
AbstractScriptLaunchConfigurationDelegate_InterpreterEnvironment_home_directory_for__0__does_not_exist___1__6=Interpreter installation {0} does not exist: {1}
AbstractScriptLaunchConfigurationDelegate_InterpreterEnvironment_home_directory_not_specified_for__0__5=Interpreter installation path not specified for {0}
AbstractScriptLaunchConfigurationDelegate_Main_type_not_specified_11=Main script not specified
+AbstractScriptLaunchConfigurationDelegate_Main_script_not_exist=Main script "{0}" does not exist
+AbstractScriptLaunchConfigurationDelegate_Main_script_not_resolved=Main script path "{0}" could not be resolved
AbstractScriptLaunchConfigurationDelegate_debuggingEngineNotSelected=Debugging engine not selected.
AbstractScriptLaunchConfigurationDelegate_startingLaunchConfiguration=Starting launch configuration {0}...
AbstractScriptLaunchConfigurationDelegate_validatingLaunchConfiguration=Validating launch configuration {0}...