Skip to content

Commit

Permalink
Re-adjust bean completion item optics
Browse files Browse the repository at this point in the history
  • Loading branch information
BoykoAlex committed Feb 28, 2025
1 parent 1238fec commit d595f03
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.eclipse.lsp4j.Command;
import org.eclipse.lsp4j.CompletionItemKind;
import org.eclipse.lsp4j.CompletionItemLabelDetails;
import org.openrewrite.java.tree.JavaType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.ide.vscode.boot.java.handlers.BootJavaCompletionEngine;
Expand All @@ -48,7 +49,7 @@ public class BeanCompletionProposal implements ICompletionProposalWithScore {

private static final Logger log = LoggerFactory.getLogger(BeanCompletionProposal.class);

private static final String SHORT_DESCRIPTION = "inject as a bean dependency";
private static final String SHORT_DESCRIPTION = " - inject bean";

private IDocument doc;
private String beanId;
Expand Down Expand Up @@ -160,7 +161,8 @@ public String getDetail() {
@Override
public CompletionItemLabelDetails getLabelDetails() {
CompletionItemLabelDetails labelDetails = new CompletionItemLabelDetails();
labelDetails.setDescription(SHORT_DESCRIPTION);
labelDetails.setDetail(SHORT_DESCRIPTION);
labelDetails.setDescription(JavaType.ShallowClass.build(beanType).getClassName());
return labelDetails;
}

Expand Down

0 comments on commit d595f03

Please sign in to comment.