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


Java XValue类代码示例

本文整理汇总了Java中com.intellij.xdebugger.frame.XValue的典型用法代码示例。如果您正苦于以下问题:Java XValue类的具体用法?Java XValue怎么用?Java XValue使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


XValue类属于com.intellij.xdebugger.frame包,在下文中一共展示了XValue类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: computeChildren

import com.intellij.xdebugger.frame.XValue; //导入依赖的package包/类
@Override
public void computeChildren(@NotNull XCompositeNode node)
{
    final XValueChildrenList list = new XValueChildrenList();
    final DebuggerValue[] innerElements = debuggerValue.values();
    int i = 0;
    for (DebuggerValue innerElement : innerElements)
    {
        final XValue value = WeaveValueFactory.create(innerElement);
        if (value != null)
        {
            list.add("[" + i + "]", value);
        }
        i++;
    }
    node.addChildren(list, false);
    super.computeChildren(node);
}
 
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:19,代码来源:ArrayWeaveValue.java

示例2: computeChildren

import com.intellij.xdebugger.frame.XValue; //导入依赖的package包/类
@Override
public void computeChildren(@NotNull XCompositeNode node)
{
    final XValueChildrenList list = new XValueChildrenList();
    final FieldDebuggerValue[] innerElements = debuggerValue.fields();
    for (FieldDebuggerValue innerElement : innerElements)
    {
        final XValue value = innerElement.key().attr().length > 0 ? WeaveValueFactory.create(innerElement) : WeaveValueFactory.create(innerElement.value());
        if (value != null)
        {
            list.add(innerElement.key().name(), value);
        }
    }
    node.addChildren(list, false);
    super.computeChildren(node);
}
 
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:17,代码来源:ObjectWeaveValue.java

示例3: setSelected

import com.intellij.xdebugger.frame.XValue; //导入依赖的package包/类
public void setSelected(final AnActionEvent e, final boolean state) {
  if (!state) return;

  final DebuggerContextImpl debuggerContext = DebuggerAction.getDebuggerContext(e.getDataContext());
  final List<JavaValue> values = getSelectedValues(e);
  final List<XValueNodeImpl> selectedNodes = XDebuggerTreeActionBase.getSelectedNodes(e.getDataContext());

  LOG.assertTrue(debuggerContext != null && !values.isEmpty());

  DebugProcessImpl process = debuggerContext.getDebugProcess();
  if (process == null) {
    return;
  }

  process.getManagerThread().schedule(new DebuggerContextCommandImpl(debuggerContext) {
      public void threadAction() {
        for (final XValueNodeImpl node : selectedNodes) {
          final XValue container = node.getValueContainer();
          if (container instanceof JavaValue) {
            ((JavaValue)container).setRenderer(myNodeRenderer, node);
          }
        }
      }
    }
  );
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:ViewAsGroup.java

示例4: createTree

import com.intellij.xdebugger.frame.XValue; //导入依赖的package包/类
@NotNull
@Override
public Tree createTree(@NotNull Pair<XValue, String> descriptor) {
  final XDebuggerTree tree = new XDebuggerTree(myProject, myProvider, myPosition, XDebuggerActions.INSPECT_TREE_POPUP_GROUP, myMarkers);
  final XValueNodeImpl root = new XValueNodeImpl(tree, null, descriptor.getSecond(), descriptor.getFirst());
  tree.setRoot(root, true);
  tree.setSelectionRow(0);
  // expand root on load
  tree.expandNodesOnLoad(new Condition<TreeNode>() {
    @Override
    public boolean value(TreeNode node) {
      return node == root;
    }
  });
  return tree;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:XDebuggerTreeCreator.java

示例5: perform

import com.intellij.xdebugger.frame.XValue; //导入依赖的package包/类
@Override
protected void perform(final XValueNodeImpl node, @NotNull final String nodeName, final AnActionEvent e) {
  XValue value = node.getValueContainer();
  final XDebuggerEvaluationDialog dialog = e.getData(XDebuggerEvaluationDialog.KEY);
  XNavigatable navigatable = new XNavigatable() {
    @Override
    public void setSourcePosition(@Nullable final XSourcePosition sourcePosition) {
      if (sourcePosition != null) {
        final Project project = node.getTree().getProject();
        AppUIUtil.invokeOnEdt(new Runnable() {
          @Override
          public void run() {
            sourcePosition.createNavigatable(project).navigate(true);
            if (dialog != null && Registry.is("debugger.close.dialog.on.navigate")) {
              dialog.close(DialogWrapper.CANCEL_EXIT_CODE);
            }
          }
        }, project.getDisposed());
      }
    }
  };
  startComputingSourcePosition(value, navigatable);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:XJumpToSourceActionBase.java

示例6: computeChildren

import com.intellij.xdebugger.frame.XValue; //导入依赖的package包/类
@Override
public void computeChildren(@NotNull final XCompositeNode node) {
  myDialog.startEvaluation(new XEvaluationCallbackBase() {
    @Override
    public void evaluated(@NotNull final XValue result) {
      String name = UIUtil.removeMnemonic(XDebuggerBundle.message("xdebugger.evaluate.result"));
      node.addChildren(XValueChildrenList.singleton(name, result), true);
      myDialog.evaluationDone();
    }

    @Override
    public void errorOccurred(@NotNull final String errorMessage) {
      node.setErrorMessage(errorMessage);
      myDialog.evaluationDone();
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:EvaluatingExpressionRootNode.java

示例7: startComputingChildren

import com.intellij.xdebugger.frame.XValue; //导入依赖的package包/类
@Override
public void startComputingChildren() {
  if (Registry.is("debugger.watches.in.variables")) {
    XDebugSession session = XDebugView.getSession(getTree());
    XDebuggerEvaluator evaluator = getValueContainer().getEvaluator();
    if (session != null && evaluator != null) {
      XDebugSessionData data = ((XDebugSessionImpl)session).getSessionData();
      XExpression[] expressions = data.getWatchExpressions();
      for (final XExpression expression : expressions) {
        evaluator.evaluate(expression, new XDebuggerEvaluator.XEvaluationCallback() {
          @Override
          public void evaluated(@NotNull XValue result) {
            addChildren(XValueChildrenList.singleton(expression.getExpression(), result), false);
          }

          @Override
          public void errorOccurred(@NotNull String errorMessage) {
            // do not add anything
          }
        }, getValueContainer().getSourcePosition());
      }
    }
  }
  super.startComputingChildren();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:XStackFrameNode.java

示例8: addChildren

import com.intellij.xdebugger.frame.XValue; //导入依赖的package包/类
@Override
protected void addChildren(@NotNull final XCompositeNode node,
                           @Nullable final XValueChildrenList children) {
  if (children == null) {
    node.addChildren(XValueChildrenList.EMPTY, true);
    return;
  }
  final Map<String, XValue> specialValues = new HashMap<String, XValue>();
  XValueChildrenList filteredChildren = new XValueChildrenList();
  for (int i = 0; i < children.size(); i++) {
    String name = children.getName(i);
    XValue value = children.getValue(i);
    if (name.startsWith(DOUBLE_UNDERSCORE) && name.endsWith(DOUBLE_UNDERSCORE)) {
      specialValues.put(name, value);
      continue;
    }
    filteredChildren.add(name, value);
  }
  node.addChildren(filteredChildren, specialValues.isEmpty());
  if (specialValues.isEmpty()) {
    return;
  }
  addSpecialVars(node, specialValues);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:PyEduStackFrame.java

示例9: createSpecialVarsGroup

import com.intellij.xdebugger.frame.XValue; //导入依赖的package包/类
@NotNull
private static XValueGroup createSpecialVarsGroup(final Map<String, XValue> specialValues) {
  return new XValueGroup("Special Variables") {
    @Nullable
    @Override
    public Icon getIcon() {
      return PythonEducationalIcons.SpecialVar;
    }

    @Override
    public void computeChildren(@NotNull XCompositeNode node) {
      XValueChildrenList list = new XValueChildrenList();
      for (Map.Entry<String, XValue> entry : specialValues.entrySet()) {
        list.add(entry.getKey(), entry.getValue());
      }
      node.addChildren(list, true);
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:PyEduStackFrame.java

示例10: perform

import com.intellij.xdebugger.frame.XValue; //导入依赖的package包/类
@Override
public void perform(@NotNull Project project, AnActionEvent event) {
  XDebugSession session = XDebuggerManager.getInstance(project).getCurrentSession();
  if (session == null) return;

  XValueMarkers<?, ?> markers = ((XDebugSessionImpl)session).getValueMarkers();
  XValueNodeImpl node = XDebuggerTreeActionBase.getSelectedNode(event.getDataContext());
  if (markers == null || node == null) return;
  XValue value = node.getValueContainer();

  ValueMarkup existing = markers.getMarkup(value);
  if (existing != null) {
    markers.unmarkValue(value);
  }
  else {
    ValueMarkerPresentationDialog dialog = new ValueMarkerPresentationDialog(node.getName());
    dialog.show();
    ValueMarkup markup = dialog.getConfiguredMarkup();
    if (dialog.isOK() && markup != null) {
      markers.markValue(value, markup);
    }
  }
  session.rebuildViews();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:25,代码来源:XMarkObjectActionHandler.java

示例11: perform

import com.intellij.xdebugger.frame.XValue; //导入依赖的package包/类
protected void perform(final XValueNodeImpl node, @NotNull final String nodeName, final AnActionEvent e) {
  XValue value = node.getValueContainer();
  value.computeSourcePosition(new XNavigatable() {
    public void setSourcePosition(@Nullable final XSourcePosition sourcePosition) {
      if (sourcePosition != null) {
        AppUIUtil.invokeOnEdt(new Runnable() {
          public void run() {
            Project project = node.getTree().getProject();
            if (project.isDisposed()) return;

            sourcePosition.createNavigatable(project).navigate(true);
          }
        });
      }
    }
  });
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:18,代码来源:XJumpToSourceAction.java

示例12: tryEvaluateBreakpointCondition

import com.intellij.xdebugger.frame.XValue; //导入依赖的package包/类
public boolean tryEvaluateBreakpointCondition(@NotNull DotNetThreadProxy threadProxy, final XLineBreakpoint<?> breakpoint, final DotNetDebugContext debugContext) throws Exception
{
	final XExpression conditionExpression = breakpoint.getConditionExpression();
	if(conditionExpression == null)
	{
		return true;
	}

	DotNetStackFrameProxy frame = threadProxy.getFrame(0);
	if(frame == null)
	{
		return true;
	}

	XValue value = evaluateBreakpointExpression(frame, breakpoint, conditionExpression, debugContext);
	if(value instanceof DotNetAbstractVariableValueNode)
	{
		DotNetValueProxy valueOfVariableSafe = ((DotNetAbstractVariableValueNode) value).getValueOfVariable();
		if(valueOfVariableSafe instanceof DotNetBooleanValueProxy)
		{
			return ((DotNetBooleanValueProxy) valueOfVariableSafe).getValue();
		}
	}
	return true;
}
 
开发者ID:consulo,项目名称:consulo-dotnet,代码行数:26,代码来源:DotNetBreakpointEngine.java

示例13: perform

import com.intellij.xdebugger.frame.XValue; //导入依赖的package包/类
@Override
public void perform(@Nonnull Project project, AnActionEvent event) {
  XDebugSession session = XDebuggerManager.getInstance(project).getCurrentSession();
  if (session == null) return;

  XValueMarkers<?, ?> markers = ((XDebugSessionImpl)session).getValueMarkers();
  XValueNodeImpl node = XDebuggerTreeActionBase.getSelectedNode(event.getDataContext());
  if (markers == null || node == null) return;
  XValue value = node.getValueContainer();

  ValueMarkup existing = markers.getMarkup(value);
  if (existing != null) {
    markers.unmarkValue(value);
  }
  else {
    ValueMarkerPresentationDialog dialog = new ValueMarkerPresentationDialog(node.getName());
    dialog.show();
    ValueMarkup markup = dialog.getConfiguredMarkup();
    if (dialog.isOK() && markup != null) {
      markers.markValue(value, markup);
    }
  }
  session.rebuildViews();
}
 
开发者ID:consulo,项目名称:consulo,代码行数:25,代码来源:XMarkObjectActionHandler.java

示例14: perform

import com.intellij.xdebugger.frame.XValue; //导入依赖的package包/类
protected void perform(final XValueNodeImpl node, @Nonnull final String nodeName, final AnActionEvent e) {
  XValue value = node.getValueContainer();
  XNavigatable navigatable = new XNavigatable() {
    public void setSourcePosition(@Nullable final XSourcePosition sourcePosition) {
      if (sourcePosition != null) {
        AppUIUtil.invokeOnEdt(new Runnable() {
          public void run() {
            Project project = node.getTree().getProject();
            if (project.isDisposed()) return;

            sourcePosition.createNavigatable(project).navigate(true);
          }
        });
      }
    }
  };
  startComputingSourcePosition(value, navigatable);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:19,代码来源:XJumpToSourceActionBase.java

示例15: computeChildren

import com.intellij.xdebugger.frame.XValue; //导入依赖的package包/类
@Override
public void computeChildren(@Nonnull final XCompositeNode node) {
  myDialog.startEvaluation(new XEvaluationCallbackBase() {
    @Override
    public void evaluated(@Nonnull final XValue result) {
      String name = UIUtil.removeMnemonic(XDebuggerBundle.message("xdebugger.evaluate.result"));
      node.addChildren(XValueChildrenList.singleton(name, result), true);
      myDialog.evaluationDone();
    }

    @Override
    public void errorOccurred(@Nonnull final String errorMessage) {
      node.setErrorMessage(errorMessage);
      myDialog.evaluationDone();
    }
  });
}
 
开发者ID:consulo,项目名称:consulo,代码行数:18,代码来源:EvaluatingExpressionRootNode.java


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