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

Provide auto completion for bnd instructions in maven xml documents #1888

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

laeubi
Copy link
Member

@laeubi laeubi commented Nov 15, 2024

The bnd-maven and felix-bundle plugin provide a way to use bnd-instructions to build OSGi bundles. As this is a complex syntax that can not be expressed as regular maven-mojo configuration lemminx-maven can not supply any useful completions.

This adds a new lemminx-extension that provides such completions in a very basic way to support people writing such custom configuration.

Here is a little video showing the new completion support:

Peek.2024-11-15.17-45.mp4

@mickaelistria this shows how to deploy a lemminx-extension as a regular bundle inside m2e and providing additional jars to the flat-classpath using OSGi wiring API

Copy link

github-actions bot commented Nov 15, 2024

Test Results

  321 files  ±0    321 suites  ±0   53m 33s ⏱️ + 2m 29s
  678 tests ±0    659 ✅ +1  18 💤 ±0  0 ❌  - 1  1 🔥 ±0 
2 034 runs  ±0  1 979 ✅ +1  54 💤 ±0  0 ❌  - 1  1 🔥 ±0 

For more details on these errors, see this check.

Results for commit 10faeb6. ± Comparison against base commit 4074fc1.

♻️ This comment has been updated with latest results.

@laeubi
Copy link
Member Author

laeubi commented Nov 15, 2024

This is currently quite basic and not super-smart, but will open up a whole bunch of new things to support, e.g. the next thing would be to add diagnostics to one can get errors, warnings and so on.

I therefore plan to merge this after the next m2e release for 2024-12 so we can further improve / experiment with that!

@mickaelistria
Copy link
Contributor

@mickaelistria this shows how to deploy a lemminx-extension as a regular bundle inside m2e and providing additional jars to the flat-classpath using OSGi wiring API

That's really good, it does make things better. It's still not immune to libraries incompatibilities inside LemMinX process though, but that's another story.

@laeubi
Copy link
Member Author

laeubi commented Nov 18, 2024

Yes it makes it just a little bit easier now from a deployment perspective as one does not need to collect everything manually. For more one would need to change how lemminx itself is launched, e.g if everything would be embedded inside the bundle (as with a very minimal example here) and only imports what is required to share the API then one could probably make it an connect-osgi-framework where each extension is its own bundle and encapsulates all requirements except the shared classes like lsp4j...

@laeubi laeubi force-pushed the add_bnd_lemminx_extension branch 2 times, most recently from 8faf11d to 47ff9ce Compare November 19, 2024 13:11
The bnd-maven and felix-bundle plugin provide a way to use
bnd-instructions to build OSGi bundles. As this is a complex syntax that
can not be expressed as regular maven-mojo configuration lemminx-maven
can not supply any useful completions.

This adds a new lemminx-extension that provides such completions in a
very basic way to support people writing such custom configuration.

Signed-off-by: Christoph Läubrich <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants