Search code examples
eclipsepluginspydev

PydevPlugin - set PythonInterpreterManager in new version


I am working on an Eclipse Java project which uses Pydev to interpret Python scripts. After the 6.3.0 version of Pydev, there has been significant changes on initializing plugin programatically and on Preference access objects. I couldn't find a relevant documentation for the new version.

For example, starting from v6.3.0 there is no PydevPlugin.setPythonInterpreterManager(IInterpreterManager im) method in the PydevPlugin class. However, I couldn't find an example or a document on initializing the interpreter manager with the new version. In earlier versions, the task is performed similar to the below 3 lines:

    IInterpreterManager im = new PythonInterpreterManager(PydevPlugin.getDefault().getPreferenceStore());
    PydevPlugin.getDefault().getPreferenceStore();
    PydevPlugin.setPythonInterpreterManager(im);

Has anyone dealt with this issue?


Solution

  • The many changes related to the interpreter configuration have been done to better separate the core and ui related plugins.

    You can see the tests (i.e.: org.python.pydev.ast.codecompletion.revisited.CodeCompletionTestsBase.setInterpreterManager(String)) as a reference in how to initialize it now (it now uses org.python.pydev.ast.interpreter_managers.InterpreterManagersAPI to set the interpreters).