本文整理汇总了Java中com.intellij.debugger.engine.DebuggerUtils.getType方法的典型用法代码示例。如果您正苦于以下问题:Java DebuggerUtils.getType方法的具体用法?Java DebuggerUtils.getType怎么用?Java DebuggerUtils.getType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.debugger.engine.DebuggerUtils
的用法示例。
在下文中一共展示了DebuggerUtils.getType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initEvaluatorAndChildrenExpression
import com.intellij.debugger.engine.DebuggerUtils; //导入方法依赖的package包/类
protected Cache initEvaluatorAndChildrenExpression(final Project project) {
final Cache cache = new Cache();
try {
final PsiClass contextClass = DebuggerUtils.findClass(getClassName(), project, GlobalSearchScope.allScope(project));
if(contextClass == null) {
throw EvaluateExceptionUtil.CANNOT_FIND_SOURCE_CLASS;
}
final PsiType contextType = DebuggerUtils.getType(getClassName(), project);
cache.myPsiChildrenExpression = null;
JavaCodeFragment codeFragment = myDefaultFragmentFactory.createCodeFragment(myReferenceExpression, contextClass, project);
codeFragment.forceResolveScope(GlobalSearchScope.allScope(project));
codeFragment.setThisType(contextType);
DebuggerUtils.checkSyntax(codeFragment);
cache.myPsiChildrenExpression = ((PsiExpressionCodeFragment)codeFragment).getExpression();
cache.myEvaluator = myDefaultFragmentFactory.getEvaluatorBuilder().build(cache.myPsiChildrenExpression, null);
}
catch (EvaluateException e) {
cache.myException = e;
}
myCache = new SoftReference<Cache>(cache);
return cache;
}
示例2: findPsiType
import com.intellij.debugger.engine.DebuggerUtils; //导入方法依赖的package包/类
private static PsiType findPsiType(Project project, Type type) {
AccessToken token = ReadAction.start();
try {
return DebuggerUtils.getType(type.name().replace('$', '.'), project);
}
finally {
token.finish();
}
}
示例3: findPsiType
import com.intellij.debugger.engine.DebuggerUtils; //导入方法依赖的package包/类
private static PsiType findPsiType(Project project, Type type)
{
AccessToken token = ReadAction.start();
try
{
return DebuggerUtils.getType(type.name().replace('$', '.'), project);
}
finally
{
token.finish();
}
}