diff --git a/org.ntlab.reverseDebugger/src/org/ntlab/reverseDebugger/JavaEditorOperator.java b/org.ntlab.reverseDebugger/src/org/ntlab/reverseDebugger/JavaEditorOperator.java index 2c45d96..55780c9 100644 --- a/org.ntlab.reverseDebugger/src/org/ntlab/reverseDebugger/JavaEditorOperator.java +++ b/org.ntlab.reverseDebugger/src/org/ntlab/reverseDebugger/JavaEditorOperator.java @@ -105,7 +105,12 @@ ClassNotLoadedException, InvocationException, IncompatibleThreadStateException { String declaringClassName = ((StringReference)meCaller.callInstanceMethod("getDeclaringClassName")).value(); declaringClassName = declaringClassName.replace(".", ""); - String projectPath = getLoaderPath(meCaller, meCaller.getVm().mirrorOf(declaringClassName)); + return findIType(meCaller, declaringClassName); + } + + public IType findIType(JDIInstanceMethodCaller mc, String declaringClassName) throws InvalidTypeException, + ClassNotLoadedException, InvocationException, IncompatibleThreadStateException{ + String projectPath = getLoaderPath(mc, mc.getVm().mirrorOf(declaringClassName)); IType type = null; if (projectPath != null) { IJavaProject javaProject = findJavaProject(projectPath); @@ -117,7 +122,7 @@ } } } - return type; + return type; } private String getLoaderPath(JDIInstanceMethodCaller meCaller, StringReference declaringClassName) @@ -125,7 +130,7 @@ ObjectReference getInstance = (ObjectReference)meCaller.callStaticMethod(TRACE, "TraceJSON", "getInstance"); JDIInstanceMethodCaller traceInstanceCaller = new JDIInstanceMethodCaller(meCaller.getVm(), meCaller.getThread(), getInstance); ObjectReference classInfo = (ObjectReference)traceInstanceCaller.callInstanceMethod("getClassInfo", declaringClassName); - if (classInfo == null) { + if (classInfo == null && meCaller.getReceiver() != null) { declaringClassName = (StringReference)meCaller.callInstanceMethod("getThisClassName"); classInfo = (ObjectReference)traceInstanceCaller.callInstanceMethod("getClassInfo", declaringClassName); }