-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exclude **/node_modules/**
from .java
files search
#3348
Exclude **/node_modules/**
from .java
files search
#3348
Conversation
This is actually pretty reasonable. We have such logic on the language server side. https://github.com/eclipse-jdtls/eclipse.jdt.ls/blob/317c78e09b863ef48a1d5c63fa22af7ee43d08f6/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/preferences/Preferences.java#L680-L683 I was thinking of adding |
This utility method might help (there is a type of the method name, should be Lines 101 to 111 in 4cb7a84
|
9525c16
to
e03fa47
Compare
@jdneo Is the recommendation to read the If so, I'd just want to double check a quick question before making changes in this PR. I think I could see a developer wanting certain Thanks for the typo catch. Fixed in latest push. |
The extension will always be activated if a Java file is opened, which is defined here: https://github.com/redhat-developer/vscode-java/blob/master/package.json#L42 My understanding of this case is: The trigger files is used as an indicator of the project importer: https://github.com/eclipse-jdtls/eclipse.jdt.ls/blob/7e07649d7a9aee1872e5494b19e650058a577f55/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/managers/InvisibleProjectImporter.java#L735. If the user has already added a path into that setting, it means the user does not want to import anything from that folder. So, using that setting should be ok. |
e03fa47
to
40916db
Compare
Thanks for the help @jdneo! The latest push now reuses the As for testing, I double checked this code path still finds a |
40916db
to
5c2a866
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This is a strange PR and I would have no qualms with it being rejected.
Similar to microsoft/vscode-java-debug#1234, I'm hoping to ignore
node_modules
to prevent large CPU usage from this extension when my teammates open a Node.js project. There's details in the linked pull request, but happy to elaborate if there's questions. Thanks!Specifically, we're seeing this process run for long periods of time. It's searching on
/{src, test}/**/*.java
.