blob: 23cdb833266b2ed98193218bb2f97cbcdb7ec36a [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2005, 2016 IBM Corporation and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
*******************************************************************************/
package org.eclipse.dltk.python.internal.launching;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.dltk.launching.AbstractInterpreterInstall;
import org.eclipse.dltk.launching.IInterpreterInstallType;
import org.eclipse.dltk.launching.IInterpreterRunner;
import org.eclipse.dltk.python.core.PythonNature;
public class GenericPythonInstall extends AbstractInterpreterInstall {
public GenericPythonInstall(IInterpreterInstallType type, String id) {
super(type, id);
}
@Override
public IInterpreterRunner getInterpreterRunner(String mode) {
IInterpreterRunner runner = super.getInterpreterRunner(mode);
if (runner != null) {
return runner;
}
if (mode.equals(ILaunchManager.RUN_MODE)) {
return new PythonInterpreterRunner(this);
}
return null;
}
@Override
public String getNatureId() {
return PythonNature.NATURE_ID;
}
}