mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
[simple language] SimpleCompletionContributor: cleanup
This commit is contained in:
parent
bba727c859
commit
1ee945229c
@ -10,15 +10,15 @@ import org.intellij.sdk.language.psi.SimpleTypes;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class SimpleCompletionContributor extends CompletionContributor {
|
||||
|
||||
public SimpleCompletionContributor() {
|
||||
extend( CompletionType.BASIC,
|
||||
PlatformPatterns.psiElement(SimpleTypes.VALUE).withLanguage(SimpleLanguage.INSTANCE),
|
||||
extend(CompletionType.BASIC, PlatformPatterns.psiElement(SimpleTypes.VALUE),
|
||||
new CompletionProvider<CompletionParameters>() {
|
||||
public void addCompletions(@NotNull CompletionParameters parameters,
|
||||
@NotNull ProcessingContext context,
|
||||
@NotNull CompletionResultSet resultSet) {
|
||||
resultSet.addElement(LookupElementBuilder.create("Hello"));
|
||||
}
|
||||
public void addCompletions(@NotNull CompletionParameters parameters,
|
||||
@NotNull ProcessingContext context,
|
||||
@NotNull CompletionResultSet resultSet) {
|
||||
resultSet.addElement(LookupElementBuilder.create("Hello"));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user