File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -89,9 +89,15 @@ public CompletableFuture<InitializeResult> initialize(InitializeParams initializ
89
89
}
90
90
// CompletableFuture.
91
91
projectContext = SouffleProjectContext .getInstance ();
92
+ String directory = null ;
92
93
List <WorkspaceFolder > workspaceFolders = initializeParams .getWorkspaceFolders ();
93
94
if (workspaceFolders != null && !workspaceFolders .isEmpty ()){
94
- String directory = URI .create (workspaceFolders .get (0 ).getUri ()).getPath ();
95
+ directory = URI .create (workspaceFolders .get (0 ).getUri ()).getPath ();
96
+ } else {
97
+ // rootUri is deprecated. Here it's only used as a fallback if the client doesn't send any workspaceFolders
98
+ directory = URI .create (initializeParams .getRootUri ()).getPath ();
99
+ }
100
+ if (directory != null ) {
95
101
projectContext .setProjectPath (directory );
96
102
traverseWorkspace (directory );
97
103
}
You can’t perform that action at this time.
0 commit comments