當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。