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

IDE Plugins #376

Open
Mechite opened this issue Jul 18, 2023 · 0 comments
Open

IDE Plugins #376

Mechite opened this issue Jul 18, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Mechite
Copy link
Contributor

Mechite commented Jul 18, 2023

This is an idea I had for a while, even with other frameworks, For example, IntelliJ has plugins for Jakarta EE APIs providing special analysis support, as well as plugins like RESTKit providing a nice way to filter through controllers, the Spring plugins providing a ton of things like Spring Initializr, configuration autocomplete, etc. I will probably work on this at some point if nobody else does.

I've had a few ideas for what it could bring;

  • We could provide inspections for e.g. redundant @Inject annotations, a mix and match of @Singleton and @Component given the user hasn't disabled the issue for the project (if they are combining Avaje with another DI framework)
  • Configuration autocomplete (and warnings of unused configuration keys, etc)
  • Bootstrapping Avaje projects
  • View a visual DI graph (not sure if this is easy to do if an Eclipse plugin was done as well as while IntelliJ provides a yFiles viewer, Eclipse seems not to - many ideas come to mind such as putting @PostConstructs at the end of the graph, etc, to really show what order things run, and set breakpoints on the constructors directly in the graph viewer)
  • Warnings for when things aren't available in a scope without having to compile to know
  • Highlight the constructor that is going to be called for injection in a component (in the gutter)
  • Improved debugging (see a wiring diagram, where it failed to wire, etc)
  • Improved building (IntelliJ has trouble with multi-module projects and invoking the compiler correctly for annotation processors, you tend to get a lot of unwired dependencies, and this is worse if you require the inject Maven plugin - Unsure if Eclipse has any problems, but it would be good if code could just be generated on the fly, refactorings wouldn't be annoying (as currently, you end up always running a clean as otherwise you'll be looking through refactoring the generated code))

This would be quite hard to achieve properly because:

  • Plugins such as Lombok would mean you'd have to highlight the Lombok annotations if they generate e.g. constructors that are run implicitly.
  • I don't know how languages like Kotlin would work

A lot of these features are strictly convenience things, and you can achieve all of this functionality spending a little bit more time reading your code and the generated code, others are a little more useful (Having inspections to e.g. see redundant annotations, configuration, etc, that is good for maintaining code quality).

@SentryMan SentryMan added the enhancement New feature or request label Aug 9, 2023
@Mechite Mechite changed the title [Proposed enhancement] IDE Plugins IDE Plugins Aug 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants