Some fixes to accomodate windows

This commit is contained in:
kdvolder
2017-12-11 16:00:19 -08:00
parent b51e2fa0da
commit 22e8ba80ba
9 changed files with 52 additions and 21 deletions

View File

@@ -25,7 +25,9 @@ public class Main {
public static void main(String[] args) throws IOException, InterruptedException {
String serverName = "boot-java-language-server";
LogRedirect.redirectToFile(serverName);
if (!System.getProperty(LaunguageServerApp.STANDALONE_STARTUP, "false").equals("true")) {
LogRedirect.redirectToFile(serverName);
}
LaunguageServerApp.start(serverName, () -> {
SimpleLanguageServer server = new BootJavaLanguageServer(
BootJavaLanguageServerParams.createDefault()

View File

@@ -58,6 +58,7 @@ import org.springframework.ide.vscode.commons.languageserver.java.ProjectObserve
import org.springframework.ide.vscode.commons.languageserver.multiroot.WorkspaceFolder;
import org.springframework.ide.vscode.commons.util.Log;
import org.springframework.ide.vscode.commons.util.StringUtil;
import org.springframework.ide.vscode.commons.util.UriUtil;
import org.springframework.ide.vscode.commons.util.text.LanguageId;
import org.springframework.ide.vscode.commons.util.text.TextDocument;
@@ -329,7 +330,7 @@ public class SpringIndexer {
FileASTRequestor requestor = new FileASTRequestor() {
@Override
public void acceptAST(String sourceFilePath, CompilationUnit cu) {
String docURI = "file://" + sourceFilePath;
String docURI = UriUtil.toUri(new File(sourceFilePath)).toString();
AtomicReference<TextDocument> docRef = new AtomicReference<>();
scanAST(cu, docURI, docRef, null);
}

View File

@@ -15,11 +15,6 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.springframework.ide.eclipse.core.springbuilder</name>
<arguments>
@@ -30,6 +25,11 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.springframework.ide.eclipse.core.springnature</nature>