本文整理汇总了Java中com.intellij.debugger.ui.tree.render.HexRenderer类的典型用法代码示例。如果您正苦于以下问题:Java HexRenderer类的具体用法?Java HexRenderer怎么用?Java HexRenderer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
HexRenderer类属于com.intellij.debugger.ui.tree.render包,在下文中一共展示了HexRenderer类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: askAndSet
import com.intellij.debugger.ui.tree.render.HexRenderer; //导入依赖的package包/类
private void askAndSet(final DebuggerTreeNodeImpl node, final DebuggerContextImpl debuggerContext, final SetValueRunnable setValueRunnable) {
ProgressWindowWithNotification progressWindow = new ProgressWindowWithNotification(true, debuggerContext.getProject());
SuspendContextCommandImpl askSetAction = new DebuggerContextCommandImpl(debuggerContext) {
public Priority getPriority() {
return Priority.HIGH;
}
public void threadAction() {
final NodeDescriptorImpl descriptor = node.getDescriptor();
String initialString = "";
if (descriptor instanceof ValueDescriptorImpl) {
Value currentValue = ((ValueDescriptorImpl) descriptor).getValue();
if (currentValue instanceof StringReference) {
initialString = DebuggerUtilsEx.getValueOrErrorAsString(debuggerContext.createEvaluationContext(), currentValue);
initialString = initialString == null ? "" : "\"" + DebuggerUtilsEx.translateStringValue(initialString) + "\"";
}
else if (currentValue instanceof PrimitiveValue) {
ValueLabelRenderer renderer = ((ValueDescriptorImpl) descriptor).getRenderer(debuggerContext.getDebugProcess());
initialString = getDisplayableString((PrimitiveValue) currentValue, renderer instanceof NodeRenderer && HexRenderer.UNIQUE_ID.equals(renderer.getUniqueId()));
}
final String initialString1 = initialString;
final Project project = debuggerContext.getProject();
DebuggerInvocationUtil.swingInvokeLater(project, new Runnable() {
public void run() {
showEditor(new TextWithImportsImpl(CodeFragmentKind.EXPRESSION, initialString1), node, debuggerContext, setValueRunnable);
}
});
}
}
};
progressWindow.setTitle(DebuggerBundle.message("title.evaluating"));
debuggerContext.getDebugProcess().getManagerThread().startProgress(askSetAction, progressWindow);
}