microsoft / vscode-java-dependency

Manage Java projects in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-dependency
MIT License
140 stars 68 forks source link

Is it possible to load Java extensions on launch, rather than only when a Java file is clicked? #817

Open firasm opened 5 months ago

firasm commented 5 months ago

hello,

I'm using the code-server package to give students a cloud-based VS-Code editor in a university setting and we're nearly there to a perfect solution.

The last remaining hiccup is that students have to click on a Java file to load all java-based extensions (see gif below), and as you can see it takes up to a couple of minutes to do this (we have user-reported data on this too).

Is there a setting I can enable in settings.json to autoload the Java extensions on launch, rather than waiting for users to click a Java file?

Thanks in advance!

pl_vscode_extensions_med

firasm commented 5 months ago

Perhaps I should launch in standard Mode?

java.server.launchMode:

Standard: Provides full features such as intellisense, refactoring, building, Maven/Gradle support etc.

LightWeight: Starts a syntax server with lower start-up cost. Only provides syntax features such as outline, navigation, javadoc, syntax errors. The lightweight mode won't load thirdparty extensions, such as java test runner, java debugger, etc.

Hybrid: Provides full features with better responsiveness. It starts a standard language server and a secondary syntax server. The syntax server provides syntax features until the standard server is ready. And the syntax server will be shutdown automatically after the standard server is fully ready.

Default launch mode is Hybrid. Legacy mode is Standard

firasm commented 5 months ago

Update: I switched it to standard mode, but I think this still only launches when a Java file is clicked ; this is the behaviour I'm interested in fixing so the lightweight/standard thing didn't really apply

jdneo commented 5 months ago

Hi @firasm,

Is the unmanaged folder (project without build tools) used for your lessons? (Looks like the gif is not attached.)

github-actions[bot] commented 4 months ago

This issue has been closed automatically because it needs more information and has not had recent activity. Please reach out if you have or find the answers we need so that we can investigate further.

firasm commented 4 months ago

Hi - sorry, didn't see the notifications on this!

Not sure what you mean by "unmanaged" folder - the folder structure for us is:

src
├── main
│   └── model
│       ├── ProjectInNeed.java
│       └── Sponsor.java
└── test
    └── model
        └── ProjectInNeedTest.java
Screenshot 2024-02-29 at 11 01 28 PM

I see the gif attached for me, perhaps it's because of size? here's a link to the gif here

jdneo commented 4 months ago

Hi @firasm,

I can see the gif now. And the project is what we called 'unmanaged folder' - projects without any build tools (Maven/Gradle/...)

So far, the extension is implemented to be only activated when a java file is opened if the project is an unmanaged folder. There is no workaround for this issue right now. Sorry for that.

I'll mark this ticket as a feature request.