use of org.python.pydev.debug.ui.launching.PythonRunnerConfig in project Pydev by fabioz.
the class InterpreterTab method getConfig.
/**
* @param configuration the launch configuration to be used
* @param launchConfigurationDialog the dialog for the launch configuration
* @return a PythonRunnerConfig configured with the given launch configuration
* @throws CoreException
* @throws InvalidRunException
* @throws MisconfigurationException
*/
private PythonRunnerConfig getConfig(ILaunchConfiguration configuration, ILaunchConfigurationDialog launchConfigurationDialog) throws CoreException, InvalidRunException, MisconfigurationException {
String run;
IInterpreterManager interpreterManager = getInterpreterManager();
if (interpreterManager == null) {
return null;
}
switch(interpreterManager.getInterpreterType()) {
case IInterpreterManager.INTERPRETER_TYPE_JYTHON:
run = PythonRunnerConfig.RUN_JYTHON;
break;
case IInterpreterManager.INTERPRETER_TYPE_IRONPYTHON:
run = PythonRunnerConfig.RUN_IRONPYTHON;
break;
case IInterpreterManager.INTERPRETER_TYPE_PYTHON:
run = PythonRunnerConfig.RUN_REGULAR;
break;
default:
throw new RuntimeException("Should be python or jython interpreter (found unknown).");
}
boolean makeArgumentsVariableSubstitution = false;
// we don't want to make the arguments substitution (because it could end opening up a
// dialog for the user requesting something).
PythonRunnerConfig config = new PythonRunnerConfig(configuration, launchConfigurationDialog.getMode(), run, makeArgumentsVariableSubstitution);
return config;
}
Aggregations