You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bean completion proposals] completions show up at class level #1528
It looks like bean completions show up at class level, too, and produce weird results. If we show them up at class level (basically as a simplified mechanism to add a new field), it should at least show up consistently and produce correct results.
@Component
public class AnotherTestConfigClass {
<*>
}
This does not cause bean proposals to show up.
@Component
public class AnotherTestConfigClass {
t<*>
AnotherTestConfigClass() {
}
}
This shows up bean completions (assuming there are beans with a name starting with t).
Applying the bean completion proposal results in:
@Component
public class AnotherTestConfigClass {
private final TestBean1 testBean1;
AnotherTestConfigClass(TestBean1 testBean1) {
this.testBean1 = testBean1;
}
testBean1<*>
AnotherTestConfigClass() {
}
}
which looks good in general, but the existing constructor hasn't been taken into account.
Interestingly, having the pre-existing constructor public:
@Component
public class AnotherTestConfigClass {
t<*>
public AnotherTestConfigClass() {
}
}
causes the bean completion proposals do NOT show up anymore.
Activity
BoykoAlex commentedon Mar 31, 2025
@martinlippert I cannot reproduce this one... Have you done any work in that area?
martinlippert commentedon Apr 2, 2025
@BoykoAlex I haven't done any work on this and I can still reproduce this... :-)
I am using VSCode, connected to a language server running from main.
BoykoAlex commentedon Apr 3, 2025
Fixed. Limit bean completions to block not belonging to type declarations.