Skip to content

Commit

Permalink
Moves comment
Browse files Browse the repository at this point in the history
Signed-off-by: Frederik Claus <f.v.claus@googlemail.com>
  • Loading branch information
fvclaus committed Sep 27, 2021
1 parent 684c00d commit 4c20da2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,13 @@ public CompletionItem toCompletionItem(CompletionProposal proposal, int index) {
this.descriptionProvider.updateDescription(proposal, $);
$.setSortText(SortTextHelper.computeSortText(proposal));
proposalProvider.updateReplacement(proposal, $, '\0');
// Make sure `filterText` matches `textEdit`
// See https://github.com/eclipse/eclipse.jdt.ls/issues/1348
boolean isSignatureHelpEnabled = preferenceManager.getPreferences().isSignatureHelpEnabled();
// Hide completions when signature help is visible.
if (isSignatureHelpEnabled && PREFER_SIGNATURE_HELP_COMPLETION_ITEMS.contains(proposal.getKind())) {
$.setFilterText(new String(proposal.getName()));
}
// Make sure `filterText` matches `textEdit`
// See https://github.com/eclipse/eclipse.jdt.ls/issues/1348
if ($.getFilterText() == null && $.getTextEdit() != null) {
String newText = $.getTextEdit().isLeft() ? $.getTextEdit().getLeft().getNewText() : $.getTextEdit().getRight().getNewText();
Range range = $.getTextEdit().isLeft() ? $.getTextEdit().getLeft().getRange() : ($.getTextEdit().getRight().getInsert() != null ? $.getTextEdit().getRight().getInsert() : $.getTextEdit().getRight().getReplace());
Expand Down

0 comments on commit 4c20da2

Please sign in to comment.