public class CodeInsightUtil
extends java.lang.Object
Constructor and Description |
---|
CodeInsightUtil() |
Modifier and Type | Method and Description |
---|---|
static Processor<PsiClass> |
createInheritorsProcessor(PsiElement context,
PsiClassType baseType,
int arrayDim,
boolean getRawSubtypes,
Consumer<? super PsiType> result,
PsiClass baseClass,
PsiSubstitutor baseSubstitutor) |
static <T extends PsiMember & PsiDocCommentOwner> |
createSortIdenticalNamedMembersComparator(PsiElement place) |
static <T extends PsiElement> |
findElementInRange(PsiFile file,
int startOffset,
int endOffset,
java.lang.Class<T> klass) |
static PsiExpression |
findExpressionInRange(PsiFile file,
int startOffset,
int endOffset) |
static PsiExpression [] |
findExpressionOccurrences(PsiElement scope,
PsiExpression expr) |
static Language |
findJavaOrLikeLanguage(PsiFile file) |
static PsiExpression [] |
findReferenceExpressions(PsiElement scope,
PsiElement referee) |
static PsiElement [] |
findStatementsInRange(PsiFile file,
int startOffset,
int endOffset) |
static java.util.List<PsiType> |
getExpectedTypeArgs(PsiElement context,
PsiTypeParameterListOwner paramOwner,
java.lang.Iterable<? extends PsiTypeParameter> typeParams,
PsiClassType expectedType) |
static Editor |
positionCursor(Project project,
PsiFile targetFile,
PsiElement element) |
static Editor |
positionCursorAtLBrace(Project project,
PsiFile targetFile,
PsiClass psiClass) |
static boolean |
preparePsiElementsForWrite(PsiElement... elements) |
static void |
processSubTypes(PsiType psiType,
PsiElement context,
boolean getRawSubtypes,
PrefixMatcher matcher,
Consumer<? super PsiType> consumer) |
static <T extends PsiMember & PsiDocCommentOwner> |
sortIdenticalShortNamedMembers(T[] members,
PsiReference context) |
public static PsiExpression findExpressionInRange(PsiFile file, int startOffset, int endOffset)
public static <T extends PsiElement> T findElementInRange(PsiFile file, int startOffset, int endOffset, java.lang.Class<T> klass)
public static PsiElement [] findStatementsInRange(PsiFile file, int startOffset, int endOffset)
public static <T extends PsiMember & PsiDocCommentOwner> void sortIdenticalShortNamedMembers(T[] members, PsiReference context)
public static <T extends PsiMember & PsiDocCommentOwner> java.util.Comparator<T> createSortIdenticalNamedMembersComparator(PsiElement place)
public static PsiExpression [] findExpressionOccurrences(PsiElement scope, PsiExpression expr)
public static PsiExpression [] findReferenceExpressions(PsiElement scope, PsiElement referee)
public static Editor positionCursorAtLBrace(Project project, PsiFile targetFile, PsiClass psiClass)
public static Editor positionCursor(Project project, PsiFile targetFile, PsiElement element)
public static boolean preparePsiElementsForWrite(PsiElement... elements)
public static void processSubTypes(PsiType psiType, PsiElement context, boolean getRawSubtypes, PrefixMatcher matcher, Consumer<? super PsiType> consumer)
public static Processor<PsiClass> createInheritorsProcessor(PsiElement context, PsiClassType baseType, int arrayDim, boolean getRawSubtypes, Consumer<? super PsiType> result, PsiClass baseClass, PsiSubstitutor baseSubstitutor)
public static java.util.List<PsiType> getExpectedTypeArgs(PsiElement context, PsiTypeParameterListOwner paramOwner, java.lang.Iterable<? extends PsiTypeParameter> typeParams, PsiClassType expectedType)