当前位置: 首页>>代码示例>>Java>>正文


Java DebuggerTreeNodeExpression类代码示例

本文整理汇总了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);
        }
      }
    });
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:DebuggerTreeCreatorImpl.java

示例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);
        }
      }
    });
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:23,代码来源:ValueHintTreeComponent.java

示例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);
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:18,代码来源:ExpressionChildrenRenderer.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:ExpressionChildrenRenderer.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:DebuggerUtilsImpl.java

示例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);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:5,代码来源:DebuggerUtilsImpl.java

示例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);
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:6,代码来源:DebuggerUtilsImpl.java


注:本文中的com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeExpression类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。