本文整理匯總了Java中com.intellij.debugger.engine.evaluation.EvaluationContextImpl.getProject方法的典型用法代碼示例。如果您正苦於以下問題:Java EvaluationContextImpl.getProject方法的具體用法?Java EvaluationContextImpl.getProject怎麽用?Java EvaluationContextImpl.getProject使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.debugger.engine.evaluation.EvaluationContextImpl
的用法示例。
在下文中一共展示了EvaluationContextImpl.getProject方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: evaluate
import com.intellij.debugger.engine.evaluation.EvaluationContextImpl; //導入方法依賴的package包/類
@Nullable
protected PsiType evaluate(final EvaluationContextImpl evaluationContext) throws EvaluateException {
final Project project = evaluationContext.getProject();
ExpressionEvaluator evaluator = DebuggerInvocationUtil.commitAndRunReadAction(project, new EvaluatingComputable<ExpressionEvaluator>() {
public ExpressionEvaluator compute() throws EvaluateException {
return EvaluatorBuilderImpl.getInstance().build(myElement, ContextUtil.getSourcePosition(evaluationContext));
}
});
final Value value = evaluator.evaluate(evaluationContext);
if(value != null){
return getCastableRuntimeType(project, value);
}
throw EvaluateExceptionUtil.createEvaluateException(DebuggerBundle.message("evaluation.error.surrounded.expression.null"));
}