com.intellij.psi.PsiPlainText Java Examples
The following examples show how to use
com.intellij.psi.PsiPlainText.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CurrentBranchCompletionContributor.java From GitToolBox with Apache License 2.0 | 4 votes |
public CurrentBranchCompletionContributor() { extend(CompletionType.BASIC, PlatformPatterns.psiElement(PsiPlainText.class), new CurrentBranchCompletionProvider()); }
Example #2
Source File: NaturalLanguageTextSelectioner.java From consulo with Apache License 2.0 | 4 votes |
@Override public boolean canSelect(PsiElement e) { return e instanceof PsiPlainText || e instanceof PsiComment; }
Example #3
Source File: PlainTextLineSelectioner.java From consulo with Apache License 2.0 | 4 votes |
@Override public boolean canSelect(PsiElement e) { return e instanceof PsiPlainText; }
Example #4
Source File: GitCommitEmojiEngine.java From git-commit-emoji with Apache License 2.0 | 3 votes |
public GitCommitEmojiEngine() throws IOException { HashMap<String, String> data = DataProcess.getData(); extend(CompletionType.BASIC, PlatformPatterns.psiElement(PsiPlainText.class), new CompletionProvider<CompletionParameters>() { @Override protected void addCompletions(@NotNull CompletionParameters completionParameters, ProcessingContext processingContext, @NotNull CompletionResultSet completionResultSet) { if (completionParameters.getEditor().isOneLineMode()) { return; } String message = completionParameters.getEditor().getDocument().getCharsSequence().toString(); List<LookupElement> result = new LinkedList<LookupElement>(); for (String key : data.keySet()) { if (key.contains(message)) { result.add(LookupElementBuilder.create(data.get(key) + " " + key + ":")); completionResultSet.addElement(LookupElementBuilder.create(data.get(key) + " " + key + ":")); } } } }); }