Skip to content

Commit

Permalink
Adjust bean completion label details
Browse files Browse the repository at this point in the history
  • Loading branch information
BoykoAlex committed Feb 27, 2025
1 parent b8322a0 commit bccd2ba
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.eclipse.lsp4j.Command;
import org.eclipse.lsp4j.CompletionItemKind;
import org.eclipse.lsp4j.CompletionItemLabelDetails;
import org.openrewrite.java.tree.JavaType;
import org.springframework.ide.vscode.boot.java.rewrite.RewriteRefactorings;
import org.springframework.ide.vscode.commons.languageserver.completion.DocumentEdits;
import org.springframework.ide.vscode.commons.languageserver.completion.ICompletionProposalWithScore;
Expand All @@ -34,7 +33,7 @@
*/
public class BeanCompletionProposal implements ICompletionProposalWithScore {

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

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

Expand Down

0 comments on commit bccd2ba

Please sign in to comment.