@@ -151,17 +151,14 @@ public final ITypeScriptServiceClient getClient() throws TypeScriptException {
151
151
this .client = createServiceClient (getProjectDir ());
152
152
copyListeners ();
153
153
onCreateClient (client );
154
- if (canSupport (CommandNames .OpenExternalProject )) {
155
- // OpenExternalProject is available since 2.0.5.
156
- // determine root files and project name
157
- String projectName = projectDir .getCanonicalPath ();
158
- List <String > rootFiles = new ArrayList <>();
159
- for (String tsconfigFilePath : getTsconfigFilePaths ()) {
160
- rootFiles .add (FileUtils .getPath (new File (projectDir , tsconfigFilePath )));
161
- }
162
- // opens or updates the external project
163
- client .openExternalProject (projectName , rootFiles );
154
+ // determine root files and project name
155
+ String projectName = projectDir .getCanonicalPath ();
156
+ List <String > rootFiles = new ArrayList <>();
157
+ for (String tsconfigFilePath : getTsconfigFilePaths ()) {
158
+ rootFiles .add (FileUtils .getPath (new File (projectDir , tsconfigFilePath )));
164
159
}
160
+ // opens or updates the external project
161
+ client .openExternalProject (projectName , rootFiles );
165
162
} catch (Exception e ) {
166
163
if (e instanceof TypeScriptException ) {
167
164
throw (TypeScriptException ) e ;
@@ -199,8 +196,7 @@ protected ITypeScriptServiceClient createServiceClient(File projectDir) throws T
199
196
File nodeFile = getProjectSettings ().getNodejsInstallPath ();
200
197
File typescriptDir = getProjectSettings ().getTypesScriptDir ();
201
198
TypeScriptServiceClient client = new TypeScriptServiceClient (getProjectDir (), typescriptDir , nodeFile ,
202
- getProjectSettings ().isEnableTelemetry (), getProjectSettings ().isDisableAutomaticTypingAcquisition (),
203
- getProjectSettings ().getTsserverPluginsFile ());
199
+ getProjectSettings ().isEnableTelemetry (), getProjectSettings ().isDisableAutomaticTypingAcquisition (), getProjectSettings ().getTsserverPluginsFile ());
204
200
client .setCompletionEntryMatcherProvider (this );
205
201
return client ;
206
202
}
0 commit comments