Skip to content
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

Need more predictable import behavior #1947

Open
1 task
guw opened this issue Nov 20, 2021 · 0 comments
Open
1 task

Need more predictable import behavior #1947

guw opened this issue Nov 20, 2021 · 0 comments

Comments

@guw
Copy link
Contributor

guw commented Nov 20, 2021

JDT LS relies on importing projects into a workspace. This works fine for small-ish projects following conventions. However, it gets more complicated when a project is found with multiple different build types (eg. pom.xml and Gradle files).

The current state is confusing:

  • In VS Code it's possible to disable Maven/Gradle importer via VS Code specific settings file.
  • There seems to be additional support in VS Code settings file to tweak import behavior (eg., java.import.exclusions).
  • There is a PDE extension which started to create its own javaConfig.json file to "configure" the importer.
  • We have a similar need in our Bazel JDT LS extension and dislike the idea of starting yet another config file.
  • I have not yet discovered what java.configuration.updateBuildConfiguration does.

It would be great if JDT LS had a way to provide a file in the source code tree that has import instructions for JDT LS. This would work across different IDEs/editors because it's a concept of JDT LS. It could also "warn" any extension that a specific importer (eg., PDE/Bazel) is missing.

Proposal:

  • Add support for reading .settings/java.json (same syntax/format as VS Code settings.json)
  • Make parsed settings from .settings/java.json available to importers during import
  • Add importer definition/pre-selection capability to .settings/java.json
  • Add existing import tweaks to .settings/java.json

Questions:

  • .settings/ or .eclipse/?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants