|
9 | 9 |
|
10 | 10 | import com.intellij.execution.ExecutionException;
|
11 | 11 | import com.intellij.execution.configurations.GeneralCommandLine;
|
12 |
| -import com.intellij.execution.process.OSProcessHandler; |
13 |
| -import com.intellij.execution.process.ProcessAdapter; |
14 |
| -import com.intellij.execution.process.ProcessEvent; |
15 |
| -import com.intellij.execution.process.ProcessOutputTypes; |
| 12 | +import com.intellij.execution.process.*; |
16 | 13 | import com.intellij.ide.plugins.IdeaPluginDescriptor;
|
17 | 14 | import com.intellij.ide.plugins.PluginManager;
|
18 | 15 | import com.intellij.javascript.nodejs.interpreter.NodeJsInterpreter;
|
19 | 16 | import com.intellij.javascript.nodejs.interpreter.NodeJsInterpreterManager;
|
20 | 17 | import com.intellij.javascript.nodejs.interpreter.local.NodeJsLocalInterpreter;
|
21 | 18 | import com.intellij.lang.jsgraphql.JSGraphQLDebugUtil;
|
22 | 19 | import com.intellij.lang.jsgraphql.ide.project.JSGraphQLLanguageUIProjectService;
|
| 20 | +import com.intellij.notification.Notification; |
| 21 | +import com.intellij.notification.NotificationType; |
| 22 | +import com.intellij.notification.Notifications; |
23 | 23 | import com.intellij.openapi.application.Application;
|
24 | 24 | import com.intellij.openapi.application.ApplicationManager;
|
25 | 25 | import com.intellij.openapi.diagnostic.Logger;
|
@@ -146,7 +146,11 @@ private void createProcessHandler() {
|
146 | 146 |
|
147 | 147 |
|
148 | 148 | } catch (IOException | ExecutionException e) {
|
149 |
| - log.error("Error running JS GraphQL Language Service using Node.js", e); |
| 149 | + if (e instanceof ProcessNotCreatedException) { |
| 150 | + Notifications.Bus.notify(new Notification("GraphQL", "Unable to start JS GraphQL Language Service", "Node.js was not started: " + e.getMessage(), NotificationType.ERROR)); |
| 151 | + } else { |
| 152 | + log.error("Error running JS GraphQL Language Service using Node.js", e); |
| 153 | + } |
150 | 154 | }
|
151 | 155 | }
|
152 | 156 |
|
|
0 commit comments