Switch LS to std in/out from socket with port

This commit is contained in:
BoykoAlex
2021-08-11 19:20:28 -04:00
parent 3209237334
commit 4447021b79
23 changed files with 139 additions and 211 deletions

View File

@@ -43,7 +43,7 @@ public class LanguageServerProcessReaper extends Thread {
private static void debug(String string) {
if (DEBUG) {
System.out.println("LanguageServerProcessReaper: "+string);
System.err.println("LanguageServerProcessReaper: "+string);
}
}

View File

@@ -19,21 +19,17 @@ import org.eclipse.core.filebuffers.IFileBuffer;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.springframework.tooling.jdt.ls.commons.Logger;
public class ProjectSorter implements Comparator<IProject> {
private Set<IProject> projectsWithEditors;
private Logger logger = Logger.forEclipsePlugin(() -> LanguageServerCommonsActivator.getInstance());
public ProjectSorter() {
this.projectsWithEditors = new HashSet<IProject>();
IFileBuffer[] openBuffers = FileBuffers.getTextFileBufferManager().getFileBuffers();
for (IFileBuffer ob : openBuffers) {
IPath path = ob.getLocation();
System.out.println(path);
if (path.segmentCount() >= 1) {
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0));
projectsWithEditors.add(project);