spring-projects / sts4

The next generation of tooling for Spring Boot, including support for Cloud Foundry manifest files, Concourse CI pipeline definitions, BOSH deployment manifests, and more... - Available for Eclipse, Visual Studio Code, and Theia
https://spring.io/tools
Eclipse Public License 1.0
870 stars 203 forks source link

Inject a bean completion proposal #1196

Open BoykoAlex opened 6 months ago

BoykoAlex commented 6 months ago

Inject a bean via "member" completion proposal. See https://blog.jetbrains.com/idea/2024/02/intellij-idea-2024-1-eap-5/#enhanced-bean-completion-and-autowiring-for-spring

For example:

@RestController
class RestApi {
String hello() {
  return repo<^>
}

Should propose beans with id's/types starting with repo for example. Completion proposal application would add a field, a constructor injected parameter, create the constructor if necessary or perhaps make the field autowired if constructors are created and none look like an autowired constructor.

BoykoAlex commented 1 month ago

@vudayani is working on this feature