try {
additionalInfo = AdditionalProjectInterpreterInfo.getAdditionalInfoForProject(nature);
} catch (Exception e) {
return null; //don't even report the error (this could happen if a saved option doesn't exist anymore)
}
return new AdditionalInfoAndIInfo(additionalInfo, info);
}
}
} else if (keys.contains(TAG_MANAGER_INTERPRETER_TYPE) && keys.contains(TAG_MANAGER_INTERPRETER)) {
Integer interpreterType = memento.getInteger(TAG_MANAGER_INTERPRETER_TYPE);
if (interpreterType != null) {
switch (interpreterType) {
case IInterpreterManager.INTERPRETER_TYPE_PYTHON:
manager = PydevPlugin.getPythonInterpreterManager();
break;
case IInterpreterManager.INTERPRETER_TYPE_JYTHON:
manager = PydevPlugin.getJythonInterpreterManager();
break;
case IInterpreterManager.INTERPRETER_TYPE_IRONPYTHON:
manager = PydevPlugin.getIronpythonInterpreterManager();
break;
}
}
} else if (keys.contains(TAG_MANAGER_IS_PYTHON) && keys.contains(TAG_MANAGER_INTERPRETER)) {
//Kept for backward compatibility
Boolean isTagPython = memento.getBoolean(TAG_MANAGER_IS_PYTHON);
if (isTagPython != null) {
if (isTagPython) {
manager = PydevPlugin.getPythonInterpreterManager();
} else {
manager = PydevPlugin.getJythonInterpreterManager();
}
}
}
//If it gets here, it MUST contain the TAG_MANAGER_INTERPRETER
if (manager != null) {
String interpreter = memento.getString(TAG_MANAGER_INTERPRETER);
AbstractAdditionalTokensInfo additionalInfo;
try {
additionalInfo = AdditionalSystemInterpreterInfo.getAdditionalSystemInfo(manager, interpreter);
} catch (Exception e) {
return null; //don't even report the error (this could happen if a saved option doesn't exist anymore)
}
if (additionalInfo != null) {
return new AdditionalInfoAndIInfo(additionalInfo, info);
}
}
} catch (Throwable e) {
//Don't fail because we weren't able to restore some info, just log and return null (which clients should expect).
Log.log(e);