question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add java.import.resourceFilter preference

See original GitHub issue

Hi, I see that this was supposed to be fixed by https://github.com/eclipse/eclipse.jdt.ls/pull/560

But I see this issue still crop up when I try JDTLS in Emacs/LSP. I tried the most recent version from http://download.eclipse.org/jdtls/snapshots/?d

I have the following import exclusions set:

["**/node_modules/**",  "**/.metadata/**", "**/archetype-resources/**", "**/META-INF/maven/**", "**/env/**"]

But in the logs I see:

34% Starting Java Language Server - /Volumes/path/to/project/env/NodeJS-12.x/runtime/lib/node_modules/npm/node_modules/latest-version[Starting]
34% Starting Java Language Server - /Volumes/path/to/project/env/NodeJS-12.x/runtime/lib/node_modules/npm/node_modules/getpass/lib[Starting]
34% Starting Java Language Server - /Volumes/path/to/project/env/NodeJS-12.x/runtime/lib/node_modules/npm/node_modules/make-fetch-happen[Starting]
34% Starting Java Language Server - /Volumes/path/to/project/env/NodeJS-12.x/runtime/lib/node_modules/npm/node_modules/sshpk[Starting]
34% Starting Java Language Server - /Volumes/path/to/project/env/NodeJS-12.x/runtime/lib/node_modules/npm/node_modules/qrcode-terminal/bin[Starting]
34% Starting Java Language Server - /Volumes/path/to/project/env/NodeJS-12.x/runtime/lib/node_modules/npm/docs/public/cli-commands/npm-dist-tag[Starting]

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
thiscantbeseriouscommented, Jul 27, 2020

I think it would be great if this could be exposed as a setting in the server. I have several java projects - and I’ll have to manually modify each of these. Even if I miss it for any single project, the indexing of the workspace will happen and slow down the server.

Totally agreed. I can understand that such a thing should be handled from the .project side rather then the workspace/userspace

It does help with a larger number of legacy projects (but then, those are already handled once imported). So maybe more or less adjusting the behaviour of java.import.exclusions to handle both cases rather then a new setting?

It’s somewhat of a EDGE case, but then again, I’d say more people will run into this issue from time to time as it is - so either that or a better documentation in that regard would help. Can we contribute to the docs?

1reaction
snjezacommented, Jul 24, 2020

@thiscantbeserious @SreenivasVRao java.import.exclusions is used when importing a directory for a first time. You may want to take a look at https://github.com/redhat-developer/vscode-java/issues/1362#issuecomment-650571695

Read more comments on GitHub >

github_iconTop Results From Across the Web

Eclipse: import Java compiler preferences only for project
If I import it via file menu it works for the whole workspace. I want to share it with a colleague and not...
Read more >
Language Support for Java(TM) by Red Hat
preferred : Preferred content provider (see 3rd party decompilers available in vscode-java-decompiler). java.import.exclusions : Exclude folders from import via ...
Read more >
13 Building Standards-Based Java Portlets Using JSR 286
In the Add New Preference dialog, in the Name field, enter a name for the new preference. The name must be unique in...
Read more >
EGit/User Guide - Eclipsepedia
The preferred way to create commits with EGit is the Staging View since it always shows the current git status for the selected...
Read more >
Configuring Eclipse with Gradle - JHipster
Select File -> Import; Choose Gradle Project; Select your projects root directory ... Remove the entry build; Select Java Build Path; Click Add...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found