Vscode: Full support for Java

Created on 28 Dec 2015  路  8Comments  路  Source: microsoft/vscode

Please improve IntelliSense for Java. Currently, there are only suggestions based on words. As Java is a strictly-typed language, there should be symbol, IntelliSense, rename-symbol and find-all-references support like in C# and TypeScript.

Java is _the_ beginner language nowadays to teach (object-oriented) programming (even at universities) and many beginners need a code editor that is not a full blown IDE like Eclipse.

feature-request help wanted

Most helpful comment

I recently implemented java support using the API of javac itself:

https://github.com/georgewfraser/vscode-javac

My strategy is basically:

  • Launch an external java process
  • Invoke javac programatically using tools.jar
  • Maintain a "hot" copy of javac at all times, so we can recompile incrementally

javac produces an excellent annotated parse tree that can be used to implement the VS Code extension. Right now, the extension supports:

  • Error highlighting
  • Autocomplete
  • Go-to-definition

Most of the other features of VS Code could be implemented straightforwardly using the javac annotated parse tree. Contributions welcome!

All 8 comments

Sounds like a good area for an extension.

.

In case someone wants to take a shot at it: https://github.com/javaparser/javaparser

Another option that might be very helpful is Eclim. It is used to provide Eclipse-level Java support in Vim, Sublime and other editors.

I recently implemented java support using the API of javac itself:

https://github.com/georgewfraser/vscode-javac

My strategy is basically:

  • Launch an external java process
  • Invoke javac programatically using tools.jar
  • Maintain a "hot" copy of javac at all times, so we can recompile incrementally

javac produces an excellent annotated parse tree that can be used to implement the VS Code extension. Right now, the extension supports:

  • Error highlighting
  • Autocomplete
  • Go-to-definition

Most of the other features of VS Code could be implemented straightforwardly using the javac annotated parse tree. Contributions welcome!

The dev who built to very popular Python extension just came out with a Java debugger, you might want to check it out https://marketplace.visualstudio.com/items?itemName=donjayamanne.javadebugger

@bpasero should we close this?

In case you missed it, Red Hat is brewing Java support based on Eclipse JDT: https://github.com/gorkem/java-language-server

I will close this in favor of the various extensions

Was this page helpful?
0 / 5 - 0 ratings