public class DebugUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
DebugUtil.IncorrectTreeStructureException |
Modifier and Type | Field and Description |
---|---|
static boolean |
CHECK |
static boolean |
CHECK_INSIDE_ATOMIC_ACTION_ENABLED |
static boolean |
DO_EXPENSIVE_CHECKS |
Constructor and Description |
---|
DebugUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
checkParentChildConsistent(ASTNode element) |
static void |
checkSameCharTabs(ASTNode element1,
ASTNode element2) |
static void |
checkTreeStructure(ASTNode element) |
static java.lang.String |
currentStackTrace() |
static java.lang.String |
diagnosePsiDocumentInconsistency(PsiElement element,
Document document) |
static void |
finishPsiModification()
Deprecated.
|
static <T> java.lang.String |
graphToString(InboundSemiGraph<T> graph) |
static <T> java.lang.String |
graphToString(OutboundSemiGraph<T> graph) |
static java.lang.String |
lightTreeToString(FlyweightCapableTreeStructure<LighterASTNode> tree,
boolean skipWhitespaces) |
static java.lang.String |
nodeTreeToString(ASTNode root,
boolean skipWhitespaces) |
static void |
onInvalidated(ASTNode treeElement) |
static void |
onInvalidated(FileViewProvider provider) |
static void |
onInvalidated(PsiElement o) |
static <T,E extends java.lang.Throwable> |
performPsiModification(java.lang.String trace,
ThrowableComputable<T,E> runnable) |
static <T extends java.lang.Throwable> |
performPsiModification(java.lang.String trace,
ThrowableRunnable<T> runnable) |
static void |
psiToBuffer(java.lang.Appendable buffer,
PsiElement root,
int indent,
boolean skipWhiteSpaces,
boolean showRanges,
boolean showChildrenRanges) |
static java.lang.String |
psiToString(PsiElement element,
boolean skipWhitespaces) |
static java.lang.String |
psiToString(PsiElement root,
boolean skipWhiteSpaces,
boolean showRanges) |
static java.lang.String |
psiToString(PsiElement root,
boolean skipWhiteSpaces,
boolean showRanges,
PairConsumer<? super PsiElement,Consumer<PsiElement>> extra) |
static java.lang.String |
psiToStringIgnoringNonCode(PsiElement element) |
static java.lang.String |
psiTreeToString(PsiElement element,
boolean skipWhitespaces) |
static void |
revalidateNode(ASTNode element) |
static void |
sleep(long millis) |
static void |
startPsiModification(java.lang.String trace)
Deprecated.
|
static void |
stubTreeToBuffer(Stub node,
java.lang.Appendable buffer,
int indent) |
static java.lang.String |
stubTreeToString(Stub root) |
static void |
treeToBuffer(java.lang.Appendable buffer,
ASTNode root,
int indent,
boolean skipWhiteSpaces,
boolean showRanges,
boolean showChildrenRanges,
boolean usePsi) |
static java.lang.String |
treeToString(ASTNode root,
boolean skipWhitespaces) |
static java.lang.String |
treeToString(ASTNode root,
boolean skipWhitespaces,
boolean showRanges) |
public static boolean CHECK
public static final boolean DO_EXPENSIVE_CHECKS
public static final boolean CHECK_INSIDE_ATOMIC_ACTION_ENABLED
public static java.lang.String psiTreeToString(PsiElement element, boolean skipWhitespaces)
public static java.lang.String treeToString(ASTNode root, boolean skipWhitespaces)
public static java.lang.String nodeTreeToString(ASTNode root, boolean skipWhitespaces)
public static java.lang.String treeToString(ASTNode root, boolean skipWhitespaces, boolean showRanges)
public static void treeToBuffer(java.lang.Appendable buffer, ASTNode root, int indent, boolean skipWhiteSpaces, boolean showRanges, boolean showChildrenRanges, boolean usePsi)
public static java.lang.String lightTreeToString(FlyweightCapableTreeStructure<LighterASTNode> tree, boolean skipWhitespaces)
public static java.lang.String stubTreeToString(Stub root)
public static void stubTreeToBuffer(Stub node, java.lang.Appendable buffer, int indent)
public static void checkParentChildConsistent(ASTNode element)
public static java.lang.String psiToString(PsiElement element, boolean skipWhitespaces)
public static java.lang.String psiToString(PsiElement root, boolean skipWhiteSpaces, boolean showRanges)
public static java.lang.String psiToString(PsiElement root, boolean skipWhiteSpaces, boolean showRanges, PairConsumer<? super PsiElement,Consumer<PsiElement>> extra)
public static java.lang.String psiToStringIgnoringNonCode(PsiElement element)
public static void psiToBuffer(java.lang.Appendable buffer, PsiElement root, int indent, boolean skipWhiteSpaces, boolean showRanges, boolean showChildrenRanges)
public static java.lang.String currentStackTrace()
@Deprecated public static void startPsiModification(java.lang.String trace)
performPsiModification(String, ThrowableRunnable)
insteadPsiInvalidElementAccessException
thrown when accessing such invalid
elements. This should help finding out why a specific PSI element has become invalid.trace
- The debug trace that the invalidated elements should be identified by. May be null, then current stack trace is used.@Deprecated public static void finishPsiModification()
performPsiModification(String, ThrowableRunnable)
insteadstartPsiModification(String)
public static <T extends java.lang.Throwable> void performPsiModification(java.lang.String trace, ThrowableRunnable<T> runnable) throws T extends java.lang.Throwable
T extends java.lang.Throwable
public static <T,E extends java.lang.Throwable> T performPsiModification(java.lang.String trace, ThrowableComputable<T,E> runnable) throws E extends java.lang.Throwable
E extends java.lang.Throwable
public static void onInvalidated(ASTNode treeElement)
public static void onInvalidated(PsiElement o)
public static void onInvalidated(FileViewProvider provider)
public static void revalidateNode(ASTNode element)
public static void sleep(long millis)
public static void checkTreeStructure(ASTNode element)
public static java.lang.String diagnosePsiDocumentInconsistency(PsiElement element, Document document)
public static <T> java.lang.String graphToString(InboundSemiGraph<T> graph)
public static <T> java.lang.String graphToString(OutboundSemiGraph<T> graph)