Skip to content

IDE Plugins #376

Open
Open
@Mechite

Description

@Mechite

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions