本文整理汇总了Java中com.intellij.debugger.engine.DebuggerUtils.getValueAsString方法的典型用法代码示例。如果您正苦于以下问题:Java DebuggerUtils.getValueAsString方法的具体用法?Java DebuggerUtils.getValueAsString怎么用?Java DebuggerUtils.getValueAsString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.debugger.engine.DebuggerUtils
的用法示例。
在下文中一共展示了DebuggerUtils.getValueAsString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: action
import com.intellij.debugger.engine.DebuggerUtils; //导入方法依赖的package包/类
public void action() {
if(myIsEvaluated) return;
try {
final String valueAsString = DebuggerUtils.getValueAsString(myEvaluationContext, myValue);
evaluationResult(valueAsString);
}
catch(final EvaluateException ex) {
evaluationError(ex.getMessage());
}
}
示例2: calcLabel
import com.intellij.debugger.engine.DebuggerUtils; //导入方法依赖的package包/类
public String calcLabel(ValueDescriptor descriptor, EvaluationContext evaluationContext, DescriptorLabelListener labelListener)
throws EvaluateException {
final Value value = descriptor.getValue();
LOG.assertTrue(!(value instanceof PrimitiveValue));
String result;
final DebugProcess debugProcess = evaluationContext.getDebugProcess();
if (value != null) {
try {
final ExpressionEvaluator evaluator = myLabelExpression.getEvaluator(debugProcess.getProject());
if(!debugProcess.isAttached()) {
throw EvaluateExceptionUtil.PROCESS_EXITED;
}
EvaluationContext thisEvaluationContext = evaluationContext.createEvaluationContext(value);
Value labelValue = evaluator.evaluate(thisEvaluationContext);
result = DebuggerUtils.getValueAsString(thisEvaluationContext, labelValue);
}
catch (final EvaluateException ex) {
throw new EvaluateException(DebuggerBundle.message("error.unable.to.evaluate.expression") + " " + ex.getMessage(), ex);
}
}
else {
//noinspection HardCodedStringLiteral
result = "null";
}
return result;
}
示例3: calcLabel
import com.intellij.debugger.engine.DebuggerUtils; //导入方法依赖的package包/类
public String calcLabel(ValueDescriptor descriptor, EvaluationContext evaluationContext, DescriptorLabelListener labelListener) throws EvaluateException
{
if(!isShowValue(descriptor, evaluationContext))
{
return "";
}
final Value value = descriptor.getValue();
String result;
final DebugProcess debugProcess = evaluationContext.getDebugProcess();
if(value != null)
{
try
{
final ExpressionEvaluator evaluator = myLabelExpression.getEvaluator(debugProcess.getProject());
if(!debugProcess.isAttached())
{
throw EvaluateExceptionUtil.PROCESS_EXITED;
}
EvaluationContext thisEvaluationContext = evaluationContext.createEvaluationContext(value);
Value labelValue = evaluator.evaluate(thisEvaluationContext);
result = DebuggerUtils.getValueAsString(thisEvaluationContext, labelValue);
}
catch(final EvaluateException ex)
{
throw new EvaluateException(DebuggerBundle.message("error.unable.to.evaluate.expression") + " " + ex.getMessage(), ex);
}
}
else
{
//noinspection HardCodedStringLiteral
result = "null";
}
return result;
}