Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[Dltk-dev] interpreter install and 'internal' scripts

hello all -

  i would like to get my source parser working again, and in order to do that, i need to obtain an IInterpreterInstall instance to execute my parser script.

  i am currently obtaining an instance of the InterpreterInstall using this call:

    IInterpreterInstall install = ScriptRuntime.getInterpreterFromCompositeId(id);

  would this still be the correct thing to do given the recent interpreter changes? i'm obtaining the 'id' from a preference store value, but if that value isn't set, i want to get whatever the default interpreter is for the user's environment and use that. in order to populate the values for the preference page, i do this:

   private IInterpreterInstall[] getInterpreterInstalls() {
        List interpreters = new ArrayList();
        IInterpreterInstallType[] types = ScriptRuntime
                .getInterpreterInstallTypes(getNatureId());
        for (int i = 0; i < types.length; i++) {
            IInterpreterInstall[] installs = types[i].getInterpreterInstalls();
            for (int j = 0; j < installs.length; j++) {
                interpreters.add(installs[j]);
            }
    }

  is that also correct at this point?

  if it is, how can i obtain the default InterpreterInstall for the user's local environment?

--
-jae

Back to the top