eclipse-jdtls / eclipse.jdt.ls

Java language server
1.76k stars 394 forks source link

Can not initialize all projects from the workspace #503

Open svor opened 6 years ago

svor commented 6 years ago

InitHandler calls initializeProjects(final Collection rootPaths, IProgressMonitor monitor) but here rootPaths contains only workspace path and initializeProjects expects list of projects. So in the ProjectsManager only one IProjectImporter will be applied. As a result if the workspace contains projects with different project's types (for example Maven and Simple) then only projects with one project type will import.

gorkem commented 6 years ago

Is this the case when we have one workspace root and two projects of different kinds in it? I think the assumption at the moment is one workspace root will have single project type (importer). In Che's case I think we may assume workspace roots to be /projects/projectA and /projects/projectB etc.

svor commented 6 years ago

It is. In our case Che passes workspace root /projects to jdt.ls and this root has several projects of different kinds.

tsmaeder commented 6 years ago

https://github.com/Microsoft/vscode/issues/28344 : seem multi-root is not coming to LSP any time soon, so initialize with a single root it is, for the moment.

gorkem commented 6 years ago

The discussion on LSP is at https://github.com/Microsoft/language-server-protocol/issues/298