public class CompletionUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DUMMY_IDENTIFIER |
static java.lang.String |
DUMMY_IDENTIFIER_TRIMMED |
Constructor and Description |
---|
CompletionUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
calcIdEndOffset(CompletionProcessEx indicator) |
static com.intellij.codeInsight.completion.CompletionAssertions.WatchingInsertionContext |
createInsertionContext(Lookup lookup,
LookupElement item,
char completionChar,
Editor editor,
PsiFile psiFile,
int caretOffset,
int idEndOffset,
OffsetMap offsetMap) |
static InsertionContext |
emulateInsertion(InsertionContext oldContext,
int newStart,
LookupElement item) |
static void |
emulateInsertion(LookupElement item,
int offset,
InsertionContext context) |
static java.lang.String |
findAlphanumericPrefix(CompletionParameters parameters) |
static java.lang.String |
findIdentifierPrefix(Document document,
int offset,
ElementPattern<java.lang.Character> idPart,
ElementPattern<java.lang.Character> idStart) |
static java.lang.String |
findIdentifierPrefix(PsiElement insertedElement,
int offset,
ElementPattern<java.lang.Character> idPart,
ElementPattern<java.lang.Character> idStart) |
static java.lang.String |
findJavaIdentifierPrefix(CompletionParameters parameters) |
static java.lang.String |
findJavaIdentifierPrefix(PsiElement insertedElement,
int offset) |
static java.lang.String |
findReferenceOrAlphanumericPrefix(CompletionParameters parameters) |
static java.lang.String |
findReferencePrefix(CompletionParameters parameters) |
static CompletionData |
getCompletionDataByElement(PsiElement position,
PsiFile originalFile) |
static <T extends PsiElement> |
getOriginalElement(T psi) |
static <T extends PsiElement> |
getOriginalOrSelf(T psi) |
static PsiElement |
getTargetElement(LookupElement lookupElement) |
static java.lang.Iterable<java.lang.String> |
iterateLookupStrings(LookupElement element) |
static InsertionContext |
newContext(InsertionContext oldContext,
LookupElement forElement,
int startOffset,
int tailOffset) |
static boolean |
shouldShowFeature(CompletionParameters parameters,
java.lang.String id) |
static boolean |
shouldShowFeature(Project project,
java.lang.String id) |
public static final java.lang.String DUMMY_IDENTIFIER
public static final java.lang.String DUMMY_IDENTIFIER_TRIMMED
public static CompletionData getCompletionDataByElement(PsiElement position, PsiFile originalFile)
public static boolean shouldShowFeature(CompletionParameters parameters, java.lang.String id)
public static boolean shouldShowFeature(Project project, java.lang.String id)
public static java.lang.String findJavaIdentifierPrefix(CompletionParameters parameters)
public static java.lang.String findJavaIdentifierPrefix(PsiElement insertedElement, int offset)
public static java.lang.String findReferenceOrAlphanumericPrefix(CompletionParameters parameters)
public static java.lang.String findAlphanumericPrefix(CompletionParameters parameters)
public static java.lang.String findIdentifierPrefix(PsiElement insertedElement, int offset, ElementPattern<java.lang.Character> idPart, ElementPattern<java.lang.Character> idStart)
public static java.lang.String findIdentifierPrefix(Document document, int offset, ElementPattern<java.lang.Character> idPart, ElementPattern<java.lang.Character> idStart)
public static java.lang.String findReferencePrefix(CompletionParameters parameters)
public static InsertionContext emulateInsertion(InsertionContext oldContext, int newStart, LookupElement item)
public static InsertionContext newContext(InsertionContext oldContext, LookupElement forElement, int startOffset, int tailOffset)
public static void emulateInsertion(LookupElement item, int offset, InsertionContext context)
public static PsiElement getTargetElement(LookupElement lookupElement)
public static <T extends PsiElement> T getOriginalElement(T psi)
public static <T extends PsiElement> T getOriginalOrSelf(T psi)
public static java.lang.Iterable<java.lang.String> iterateLookupStrings(LookupElement element)
public static com.intellij.codeInsight.completion.CompletionAssertions.WatchingInsertionContext createInsertionContext(Lookup lookup, LookupElement item, char completionChar, Editor editor, PsiFile psiFile, int caretOffset, int idEndOffset, OffsetMap offsetMap)
public static int calcIdEndOffset(CompletionProcessEx indicator)