Exclude **/node_modules/** from .java files search#3348
Exclude **/node_modules/** from .java files search#3348rgrunber merged 1 commit intoredhat-developer:masterfrom
**/node_modules/** from .java files search#3348Conversation
|
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


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_modulesto 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.