|
15 | 15 | import com.intellij.execution.process.ProcessOutputTypes;
|
16 | 16 | import com.intellij.ide.plugins.IdeaPluginDescriptor;
|
17 | 17 | import com.intellij.ide.plugins.PluginManager;
|
18 |
| -import com.intellij.javascript.nodejs.NodeDetectionUtil; |
19 |
| -import com.intellij.javascript.nodejs.NodeSettingsUtil; |
| 18 | +import com.intellij.javascript.nodejs.interpreter.NodeJsInterpreter; |
| 19 | +import com.intellij.javascript.nodejs.interpreter.NodeJsInterpreterManager; |
| 20 | +import com.intellij.javascript.nodejs.interpreter.local.NodeJsLocalInterpreter; |
20 | 21 | import com.intellij.lang.jsgraphql.JSGraphQLDebugUtil;
|
21 | 22 | import com.intellij.lang.jsgraphql.ide.project.JSGraphQLLanguageUIProjectService;
|
22 | 23 | import com.intellij.openapi.application.Application;
|
@@ -84,14 +85,11 @@ public JSGraphQLNodeLanguageServiceInstance(@NotNull Project project) {
|
84 | 85 | }
|
85 | 86 |
|
86 | 87 | public static String getNodeInterpreter(Project project) {
|
87 |
| - String interpreterPath = NodeSettingsUtil.getInterpreterPath(project); |
88 |
| - if(interpreterPath == null) { |
89 |
| - File interpreterInPath = NodeDetectionUtil.findInterpreterInPath(); |
90 |
| - if(interpreterInPath != null) { |
91 |
| - interpreterPath = interpreterInPath.getAbsolutePath(); |
92 |
| - } |
93 |
| - } |
94 |
| - return interpreterPath; |
| 88 | + final NodeJsInterpreter nodeJsInterpreter = NodeJsInterpreterManager.getInstance(project).getDefault(); |
| 89 | + if(nodeJsInterpreter instanceof NodeJsLocalInterpreter) { |
| 90 | + return ((NodeJsLocalInterpreter) nodeJsInterpreter).getInterpreterSystemDependentPath(); |
| 91 | + } |
| 92 | + return null; |
95 | 93 | }
|
96 | 94 |
|
97 | 95 | private void createProcessHandler() {
|
|
0 commit comments