if(value instanceof ObjectReference) {
final String typeName = value.type().name();
final PsiClass psiClass = DebuggerUtilsEx.findClass(myTypeName, myProject, ((DebugProcessImpl)context.getDebugProcess()).getSession().getSearchScope());
if (psiClass == null) {
throw EvaluateExceptionUtil.createEvaluateException(DebuggerBundle.message("evaluation.error.invalid.type.name", typeName));
<BUG>}
return getEffectiveCodeFragmentFactory(psiClass).createCodeFragment(getEvaluationText(), psiClass, myProject);
}</BUG>
else {
throw EvaluateExceptionUtil.createEvaluateException(

if(value instanceof ObjectReference) {
final String typeName = value.type().name();
final PsiClass psiClass = DebuggerUtilsEx.findClass(myTypeName, myProject, ((DebugProcessImpl)context.getDebugProcess()).getSession().getSearchScope());
if (psiClass == null) {
throw EvaluateExceptionUtil.createEvaluateException(DebuggerBundle.message("evaluation.error.invalid.type.name", typeName));
}
final PsiCodeFragment fragment =
getEffectiveCodeFragmentFactory(psiClass).createCodeFragment(getEvaluationText(), psiClass, myProject);
fragment.forceResolveScope(GlobalSearchScope.allScope(myProject));
return fragment;
}
else {
throw EvaluateExceptionUtil.createEvaluateException(
