Don't short-circuit on first app for @Autowired boot highlight info

This commit is contained in:
BoykoAlex
2018-09-07 18:10:44 -04:00
parent 78a97505d1
commit 8fab69d7da

View File

@@ -93,7 +93,9 @@ public class AutowiredHoverProvider implements HoverProvider {
if (declarationNode != null && definedBean != null) {
for (SpringBootApp app : runningApps) {
List<LiveBean> relevantBeans = getRelevantAutowiredBeans(project, declarationNode, app, definedBean);
return LiveHoverUtils.createCodeLensesForBeans(range, relevantBeans, BEANS_PREFIX_PLAIN_TEXT, MAX_INLINE_BEANS_STRING_LENGTH, INLINE_BEANS_STRING_SEPARATOR);
if (!relevantBeans.isEmpty()) {
return LiveHoverUtils.createCodeLensesForBeans(range, relevantBeans, BEANS_PREFIX_PLAIN_TEXT, MAX_INLINE_BEANS_STRING_LENGTH, INLINE_BEANS_STRING_SEPARATOR);
}
}
}
return null;