Relaxing yaml proposals for '- '.

This commit is contained in:
Kris De Volder
2017-04-25 18:08:05 -07:00
parent 347ad2a653
commit b866649a3d
16 changed files with 422 additions and 117 deletions

View File

@@ -13,6 +13,7 @@ package org.springframework.ide.vscode.boot.java.completions;
import org.eclipse.lsp4j.CompletionItemKind;
import org.springframework.ide.vscode.commons.languageserver.completion.DocumentEdits;
import org.springframework.ide.vscode.commons.languageserver.completion.ICompletionProposal;
import org.springframework.ide.vscode.commons.languageserver.completion.ScoreableProposal;
import org.springframework.ide.vscode.commons.util.Renderable;
import org.springframework.ide.vscode.commons.util.text.IDocument;
@@ -20,7 +21,7 @@ import org.springframework.ide.vscode.commons.util.text.IDocument;
* @author Martin Lippert
*/
public class ScopeNameCompletionProposal implements ICompletionProposal {
public static final ScopeNameCompletion[] COMPLETIONS = new ScopeNameCompletion[] {
new ScopeNameCompletion("\"prototype\"", "prototype", "prototype scope", null, CompletionItemKind.Value),
new ScopeNameCompletion("\"singleton\"", "singleton", "singleton scope (default)", null, CompletionItemKind.Value),
@@ -29,8 +30,8 @@ public class ScopeNameCompletionProposal implements ICompletionProposal {
new ScopeNameCompletion("\"globalSession\"", "globalSession", "globalSession scope", null, CompletionItemKind.Value),
new ScopeNameCompletion("\"application\"", "application", "application scope", null, CompletionItemKind.Value),
new ScopeNameCompletion("\"websocket\"", "websocket", "websocket scope", null, CompletionItemKind.Value)
};
};
private final IDocument doc;
private final int startOffset;
private final int endOffset;
@@ -45,11 +46,6 @@ public class ScopeNameCompletionProposal implements ICompletionProposal {
this.prefix = prefix;
}
@Override
public ICompletionProposal deemphasize() {
return null;
}
@Override
public String getLabel() {
return completion.getLabel();

View File

@@ -32,11 +32,6 @@ public class ValuePropertyKeyProposal implements ICompletionProposal {
this.documentation = documentation;
}
@Override
public ICompletionProposal deemphasize() {
return null;
}
@Override
public String getLabel() {
return this.label;