本文整理汇总了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);
}
示例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);
}
示例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);
}
}
}
}
);
}
示例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;
}
示例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);
}
示例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();
}
});
}
示例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();
}
示例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);
}
示例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);
}
};
}
示例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();
}
示例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);
}
});
}
}
});
}
示例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;
}
示例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();
}
示例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);
}
示例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();
}
});
}