renderers do not resolve types in the context of decompiled class

This commit is contained in:
Egor.Ushakov
2016-07-06 19:52:05 +03:00
parent 7fe707f5ac
commit ed968400b6
@@ -65,10 +65,13 @@ public abstract class CachedEvaluator {
protected Cache initEvaluatorAndChildrenExpression(final Project project) {
final Cache cache = new Cache();
try {
final PsiClass contextClass = DebuggerUtils.findClass(getClassName(), project, GlobalSearchScope.allScope(project));
PsiClass contextClass = DebuggerUtils.findClass(getClassName(), project, GlobalSearchScope.allScope(project));
if(contextClass == null) {
throw EvaluateExceptionUtil.CANNOT_FIND_SOURCE_CLASS;
}
if (contextClass instanceof PsiCompiledElement) {
contextClass = (PsiClass)((PsiCompiledElement)contextClass).getMirror();
}
final PsiType contextType = DebuggerUtils.getType(getClassName(), project);
cache.myPsiChildrenExpression = null;
JavaCodeFragment codeFragment = myDefaultFragmentFactory.createCodeFragment(myReferenceExpression, contextClass, project);