public abstract class DebuggerUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
DebuggerUtils.ArrayClass |
Modifier and Type | Field and Description |
---|---|
static int |
MAX_DISPLAY_LABEL_LENGTH |
static java.util.Set<java.lang.String> |
ourPrimitiveTypeNames |
Constructor and Description |
---|
DebuggerUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
checkSyntax(PsiCodeFragment codeFragment) |
abstract PsiClass |
chooseClassDialog(java.lang.String title,
Project project) |
static void |
cleanupAfterProcessFinish(DebugProcess debugProcess) |
static java.lang.String |
convertToPresentationString(java.lang.String str) |
abstract TextWithImports |
createExpressionWithImports(java.lang.String expression) |
static void |
ensureNotInsideObjectConstructor(com.sun.jdi.ObjectReference reference,
EvaluationContext context) |
abstract java.lang.String |
findAvailableDebugAddress(boolean useSockets) |
static PsiClass |
findClass(java.lang.String className,
Project project,
GlobalSearchScope scope) |
static com.sun.jdi.Method |
findMethod(com.sun.jdi.ReferenceType refType,
java.lang.String methodName,
java.lang.String methodSignature) |
protected static DebuggerUtils.ArrayClass |
getArrayClass(java.lang.String className) |
abstract PsiElement |
getContextElement(StackFrameContext context) |
abstract DebuggerContext |
getDebuggerContext(DataContext context) |
static DebuggerUtils |
getInstance() |
static com.sun.jdi.Type |
getSuperType(com.sun.jdi.Type subType,
java.lang.String superType) |
static PsiType |
getType(java.lang.String className,
Project project) |
static java.lang.String |
getValueAsString(EvaluationContext evaluationContext,
com.sun.jdi.Value value) |
static boolean |
hasSideEffects(PsiElement element) |
static boolean |
hasSideEffectsOrReferencesMissingVars(PsiElement element,
java.util.Set<java.lang.String> visibleLocalVariables) |
static boolean |
instanceOf(java.lang.String subType,
java.lang.String superType,
Project project) |
static boolean |
instanceOf(com.sun.jdi.Type subType,
java.lang.String superType) |
static boolean |
isAndroidVM(com.sun.jdi.VirtualMachine virtualMachine) |
static boolean |
isBreakpointAware(PsiFile file) |
static boolean |
isInsideSimpleGetter(PsiElement contextElement) |
static boolean |
isInteger(com.sun.jdi.Value value) |
static boolean |
isNumeric(com.sun.jdi.Value value) |
static boolean |
isPrimitiveType(java.lang.String typeName) |
static boolean |
isSynthetic(com.sun.jdi.TypeComponent typeComponent) |
static <R,T extends com.sun.jdi.Value> |
processCollectibleValue(ThrowableComputable<? extends T,? extends EvaluateException> valueComputable,
java.util.function.Function<T,R> processor) |
abstract TextWithImports |
readTextWithImports(Element element) |
abstract TextWithImports |
readTextWithImports(Element root,
java.lang.String name) |
abstract PsiExpression |
substituteThis(PsiExpression expressionWithThis,
PsiExpression howToEvaluateThis,
com.sun.jdi.Value howToEvaluateThisValue,
StackFrameContext context) |
static java.lang.String |
translateStringValue(java.lang.String str) |
abstract void |
writeTextWithImports(Element root,
java.lang.String name,
TextWithImports value) |
abstract Element |
writeTextWithImports(TextWithImports text) |
public static final java.util.Set<java.lang.String> ourPrimitiveTypeNames
public static final int MAX_DISPLAY_LABEL_LENGTH
public static void cleanupAfterProcessFinish(DebugProcess debugProcess)
public static java.lang.String getValueAsString(EvaluationContext evaluationContext, com.sun.jdi.Value value) throws EvaluateException
EvaluateException
public static <R,T extends com.sun.jdi.Value> R processCollectibleValue(ThrowableComputable<? extends T,? extends EvaluateException> valueComputable, java.util.function.Function<T,R> processor) throws EvaluateException
EvaluateException
public static void ensureNotInsideObjectConstructor(com.sun.jdi.ObjectReference reference, EvaluationContext context) throws EvaluateException
EvaluateException
public static java.lang.String convertToPresentationString(java.lang.String str)
public static com.sun.jdi.Method findMethod(com.sun.jdi.ReferenceType refType, java.lang.String methodName, java.lang.String methodSignature)
public static boolean isNumeric(com.sun.jdi.Value value)
public static boolean isInteger(com.sun.jdi.Value value)
public static java.lang.String translateStringValue(java.lang.String str)
protected static DebuggerUtils.ArrayClass getArrayClass(java.lang.String className)
public static boolean instanceOf(java.lang.String subType, java.lang.String superType, Project project)
public static boolean instanceOf(com.sun.jdi.Type subType, java.lang.String superType)
public static com.sun.jdi.Type getSuperType(com.sun.jdi.Type subType, java.lang.String superType)
public static PsiClass findClass(java.lang.String className, Project project, GlobalSearchScope scope)
public static void checkSyntax(PsiCodeFragment codeFragment) throws EvaluateException
EvaluateException
public static boolean hasSideEffects(PsiElement element)
public static boolean hasSideEffectsOrReferencesMissingVars(PsiElement element, java.util.Set<java.lang.String> visibleLocalVariables)
public abstract java.lang.String findAvailableDebugAddress(boolean useSockets) throws ExecutionException
ExecutionException
public static boolean isSynthetic(com.sun.jdi.TypeComponent typeComponent)
public static boolean isInsideSimpleGetter(PsiElement contextElement)
public static boolean isPrimitiveType(java.lang.String typeName)
public static DebuggerUtils getInstance()
public abstract PsiExpression substituteThis(PsiExpression expressionWithThis, PsiExpression howToEvaluateThis, com.sun.jdi.Value howToEvaluateThisValue, StackFrameContext context) throws EvaluateException
EvaluateException
public abstract DebuggerContext getDebuggerContext(DataContext context)
public abstract Element writeTextWithImports(TextWithImports text)
public abstract TextWithImports readTextWithImports(Element element)
public abstract void writeTextWithImports(Element root, java.lang.String name, TextWithImports value)
public abstract TextWithImports readTextWithImports(Element root, java.lang.String name)
public abstract TextWithImports createExpressionWithImports(java.lang.String expression)
public abstract PsiElement getContextElement(StackFrameContext context)
public abstract PsiClass chooseClassDialog(java.lang.String title, Project project)
public static boolean isBreakpointAware(PsiFile file)
public static boolean isAndroidVM(com.sun.jdi.VirtualMachine virtualMachine)