本文整理汇总了Java中com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeExpression类的典型用法代码示例。如果您正苦于以下问题:Java DebuggerTreeNodeExpression类的具体用法?Java DebuggerTreeNodeExpression怎么用?Java DebuggerTreeNodeExpression使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DebuggerTreeNodeExpression类属于com.intellij.debugger.ui.impl.watch包,在下文中一共展示了DebuggerTreeNodeExpression类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createDescriptorByNode
import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeExpression; //导入依赖的package包/类
@Override
public void createDescriptorByNode(Object node, final ResultConsumer<Pair<NodeDescriptorImpl, String>> resultConsumer) {
if (node instanceof DebuggerTreeNodeImpl) {
final DebuggerTreeNodeImpl debuggerTreeNode = (DebuggerTreeNodeImpl)node;
final DebuggerContextImpl context = DebuggerManagerEx.getInstanceEx(myProject).getContext();
context.getDebugProcess().getManagerThread().schedule(new DebuggerContextCommandImpl(context) {
@Override
public void threadAction() {
try {
final TextWithImports evaluationText = DebuggerTreeNodeExpression.createEvaluationText(debuggerTreeNode, context);
resultConsumer.onSuccess(Pair.create(debuggerTreeNode.getDescriptor(), evaluationText.getText()));
}
catch (EvaluateException e) {
resultConsumer.onFailure(e);
}
}
});
}
}
示例2: setNodeAsRoot
import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeExpression; //导入依赖的package包/类
protected void setNodeAsRoot(final Object node) {
if (node instanceof DebuggerTreeNodeImpl) {
myValueHint.shiftLocation();
final DebuggerTreeNodeImpl debuggerTreeNode = (DebuggerTreeNodeImpl)node;
final DebuggerContextImpl context = (DebuggerManagerEx.getInstanceEx(myValueHint.getProject())).getContext();
context.getDebugProcess().getManagerThread().schedule(new DebuggerContextCommandImpl(context) {
public void threadAction() {
try {
final NodeDescriptorImpl descriptor = debuggerTreeNode.getDescriptor();
final TextWithImports evaluationText = DebuggerTreeNodeExpression.createEvaluationText(debuggerTreeNode, context);
final String title = evaluationText.getText();
addToHistory(Pair.create(descriptor, title));
myTree.setInspectDescriptor(descriptor);
myValueHint.showTreePopup(myTree, context, title, ValueHintTreeComponent.this);
}
catch (final EvaluateException e1) {
LOG.debug(e1);
}
}
});
}
}
示例3: getChildValueExpression
import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeExpression; //导入依赖的package包/类
public PsiExpression getChildValueExpression(DebuggerTreeNode node, DebuggerContext context) throws EvaluateException
{
Value expressionValue = getLastChildrenValue(node.getParent().getDescriptor());
if(expressionValue == null)
{
throw EvaluateExceptionUtil.createEvaluateException(DebuggerBundle.message("error.unable.to.evaluate.expression"));
}
NodeRenderer childrenRenderer = getChildrenRenderer(expressionValue, (ValueDescriptor) node.getParent().getDescriptor());
PsiExpression childrenPsiExpression = myChildrenExpression.getPsiExpression(node.getProject());
if(childrenPsiExpression == null)
{
return null;
}
return DebuggerTreeNodeExpression.substituteThis(childrenRenderer.getChildValueExpression(node, context), (PsiExpression) childrenPsiExpression.copy(), expressionValue);
}
示例4: getChildValueExpression
import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeExpression; //导入依赖的package包/类
public PsiExpression getChildValueExpression(DebuggerTreeNode node, DebuggerContext context) throws EvaluateException {
Value expressionValue = node.getParent().getDescriptor().getUserData(EXPRESSION_VALUE);
if (expressionValue == null) {
throw EvaluateExceptionUtil.createEvaluateException(DebuggerBundle.message("error.unable.to.evaluate.expression"));
}
NodeRenderer childrenRenderer = getChildrenRenderer(expressionValue, (ValueDescriptor) node.getParent().getDescriptor());
return DebuggerTreeNodeExpression.substituteThis(
childrenRenderer.getChildValueExpression(node, context),
(PsiExpression)myChildrenExpression.getPsiExpression(node.getProject()).copy(),
expressionValue);
}
示例5: substituteThis
import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeExpression; //导入依赖的package包/类
@Override
public PsiExpression substituteThis(PsiExpression expressionWithThis, PsiExpression howToEvaluateThis, Value howToEvaluateThisValue, StackFrameContext context)
throws EvaluateException {
return DebuggerTreeNodeExpression.substituteThis(expressionWithThis, howToEvaluateThis, howToEvaluateThisValue);
}
示例6: substituteThis
import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeExpression; //导入依赖的package包/类
public PsiExpression substituteThis(PsiExpression expressionWithThis, PsiExpression howToEvaluateThis, Value howToEvaluateThisValue, StackFrameContext context)
throws EvaluateException {
return DebuggerTreeNodeExpression.substituteThis(expressionWithThis, howToEvaluateThis, howToEvaluateThisValue);
}
示例7: substituteThis
import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeExpression; //导入依赖的package包/类
@Override
public PsiExpression substituteThis(PsiExpression expressionWithThis, PsiExpression howToEvaluateThis, Value howToEvaluateThisValue, StackFrameContext context) throws EvaluateException
{
return DebuggerTreeNodeExpression.substituteThis(expressionWithThis, howToEvaluateThis, howToEvaluateThisValue);
}