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

Merged
merged 1 commit into from
Feb 8, 2025

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   51m 34s ⏱️ + 4m 40s
  681 tests ±0    658 ✅  - 2  20 💤 ±0  2 ❌ +2  1 🔥 ±0 
2 043 runs  ±0  1 980 ✅  - 2  60 💤 ±0  2 ❌ +2  1 🔥 ±0 

For more details on these failures and errors, see this check.

Results for commit d7f60f6. ± Comparison against base commit 673fc5b.

♻️ This comment has been updated with latest results.

@laeubi laeubi force-pushed the add_bnd_lemminx_extension branch from 081faee to daaa517 Compare November 15, 2024 16:40
@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 3 times, most recently from 47ff9ce to 10faeb6 Compare November 19, 2024 16:21
@laeubi
Copy link
Member Author

laeubi commented Feb 8, 2025

@laeubi laeubi force-pushed the add_bnd_lemminx_extension branch from 10faeb6 to c5028e6 Compare February 8, 2025 12:01
@laeubi
Copy link
Member Author

laeubi commented Feb 8, 2025

I have now rebased and adjusted this, due to a bug in PDE this currently not working smooth during development in the IDE:

@laeubi laeubi force-pushed the add_bnd_lemminx_extension branch 6 times, most recently from 7b44d8b to e0ac639 Compare February 8, 2025 16:42
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]>
@laeubi laeubi force-pushed the add_bnd_lemminx_extension branch from e0ac639 to d7f60f6 Compare February 8, 2025 16:55
@laeubi laeubi merged commit c464287 into eclipse-m2e:main Feb 8, 2025
7 of 8 checks passed
@HannesWell HannesWell added this to the 2.8.0 milestone Mar 3, 2025
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.

3 participants