Visual Studio Code - Java Intellisense configuration for standalone Java files

0

I am developing a Apache Cordova plugin in VS Code. This is not a standard java project as there are standalone java files in a src folder

What i want to do is configure VS Code to give me code assist on the Cordova Classes. I can download the Java files from the GitHub repository

What do i need to do in order to get code assist in my java files?

EDIT I already have the Java Extension Pack installed and configured.

Incubbus

Posted 2019-06-30T17:16:46.757

Reputation: 123

Answers

0

You will find an overview of working with Java in the article Java in Visual Studio Code, which covers tools that can help use Java more efficiently.

It lists the Java Extension Pack which groups several useful extensions for a Java developer.

Perhaps the most useful is the extension Visual Studio IntelliCode, described very ambitiously as:

The Visual Studio IntelliCode extension provides AI-assisted development features for Python, TypeScript/JavaScript and Java developers in Visual Studio Code, with insights based on understanding your code context combined with machine learning.

For a general treatment of the subject of working with Java, see the tutorial
Writing Java with Visual Studio Code.

harrymc

Posted 2019-06-30T17:16:46.757

Reputation: 306 093

This does not help. I have the JEP installed already. And the only info i find is putting a XYZ-sources.jar into the lib folder, which i don't have/need for my code to build.

Like i wrote in my OP i want code assist/intellisense for standalone java files. – Incubbus – 2019-06-30T23:40:39.197

Normally you don't need to do anything more. Do you have Java under menu Tools > Options > Text Editor? – harrymc – 2019-07-01T04:53:05.670

sure you're talking visual studio code and not visual studio? Because there is no Tools->Options->Text Editor in VS Code. And as i already stated it is installed. And yes, it is working with java projects. But here i am - again - working with standalone java files. – Incubbus – 2019-07-01T17:16:25.393

I'm using Visual Studio rather than Code, so I'm unclear about what exactly Microsoft has removed from Visual Studio to create Code. My understanding is that the problem is that the single .java files are not detected as being Java. What happens if you manually set the language to Java as in the article Programming Languages?

– harrymc – 2019-07-01T19:19:14.827