本文整理汇总了Java中com.intellij.xdebugger.frame.XValueChildrenList类的典型用法代码示例。如果您正苦于以下问题:Java XValueChildrenList类的具体用法?Java XValueChildrenList怎么用?Java XValueChildrenList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
XValueChildrenList类属于com.intellij.xdebugger.frame包,在下文中一共展示了XValueChildrenList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: computeChildren
import com.intellij.xdebugger.frame.XValueChildrenList; //导入依赖的package包/类
@Override
public void computeChildren(@NotNull XCompositeNode node)
{
final XValueChildrenList children = new XValueChildrenList();
children.add("Message Processor", new MessageProcessorInfoValue(this.session, this.muleMessageInfo.getMessageProcessorInfo()));
children.add("Payload", new ObjectFieldDefinitionValue(this.session, this.muleMessageInfo.getPayloadDefinition(), AllIcons.Debugger.Value));
if (exceptionThrown != null)
{
children.add("Exception", new ObjectFieldDefinitionValue(this.session, exceptionThrown, AllIcons.General.Error));
}
children.add("Flow Vars", new MapOfObjectFieldDefinitionValue(this.session, this.muleMessageInfo.getInvocationProperties(), AllIcons.Nodes.Parameter));
children.add("Session Properties", new MapOfObjectFieldDefinitionValue(this.session, this.muleMessageInfo.getSessionProperties(), AllIcons.Nodes.Parameter));
children.add("Inbound Properties", new MapOfObjectFieldDefinitionValue(this.session, this.muleMessageInfo.getInboundProperties(), AllIcons.Nodes.Parameter));
children.add("OutboundProperties", new MapOfObjectFieldDefinitionValue(this.session, this.muleMessageInfo.getOutboundProperties(), AllIcons.Nodes.Parameter));
node.addChildren(children, true);
}
示例2: computeChildren
import com.intellij.xdebugger.frame.XValueChildrenList; //导入依赖的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);
}
示例3: computeChildren
import com.intellij.xdebugger.frame.XValueChildrenList; //导入依赖的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);
}
示例4: computeChildren
import com.intellij.xdebugger.frame.XValueChildrenList; //导入依赖的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();
}
});
}
示例5: startComputingChildren
import com.intellij.xdebugger.frame.XValueChildrenList; //导入依赖的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();
}
示例6: addChildren
import com.intellij.xdebugger.frame.XValueChildrenList; //导入依赖的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);
}
示例7: createSpecialVarsGroup
import com.intellij.xdebugger.frame.XValueChildrenList; //导入依赖的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);
}
};
}
示例8: computeChildren
import com.intellij.xdebugger.frame.XValueChildrenList; //导入依赖的package包/类
@Override
public void computeChildren(@NotNull final XCompositeNode node) {
if (node.isObsolete()) return;
myReferrersLoader.loadReferrers(this, new PyDebugCallback<XValueChildrenList>() {
@Override
public void ok(XValueChildrenList value) {
if (!node.isObsolete()) {
node.addChildren(value, true);
}
}
@Override
public void error(PyDebuggerException e) {
if (!node.isObsolete()) {
node.setErrorMessage("Unable to display children:" + e.getMessage());
}
LOG.warn(e);
}
});
}
示例9: loadReferrers
import com.intellij.xdebugger.frame.XValueChildrenList; //导入依赖的package包/类
@Override
public void loadReferrers(final String threadId,
final String frameId,
final PyReferringObjectsValue var,
final PyDebugCallback<XValueChildrenList> callback) {
RunCustomOperationCommand cmd = new GetReferrersCommand(this, threadId, frameId, var);
cmd.execute(new PyDebugCallback<List<PyDebugValue>>() {
@Override
public void ok(List<PyDebugValue> value) {
XValueChildrenList list = new XValueChildrenList();
for (PyDebugValue v : value) {
list.add(v);
}
callback.ok(list);
}
@Override
public void error(PyDebuggerException exception) {
callback.error(exception);
}
});
}
示例10: applyNewValue
import com.intellij.xdebugger.frame.XValueChildrenList; //导入依赖的package包/类
private XValueChildrenList applyNewValue(XValueChildrenList pyDebugValues, String threadFrameId) {
if (myNewVariableValue.containsKey(threadFrameId)) {
PyDebugValue newValue = myNewVariableValue.get(threadFrameId);
XValueChildrenList res = new XValueChildrenList();
for (int i = 0; i < pyDebugValues.size(); i++) {
final String name = pyDebugValues.getName(i);
if (name.equals(newValue.getName())) {
res.add(name, newValue);
}
else {
res.add(name, pyDebugValues.getValue(i));
}
}
return res;
}
else {
return pyDebugValues;
}
}
示例11: computeChildren
import com.intellij.xdebugger.frame.XValueChildrenList; //导入依赖的package包/类
@Override
public void computeChildren(@NotNull final XCompositeNode node) {
if (node.isObsolete()) return;
ApplicationManager.getApplication().executeOnPooledThread(new Runnable() {
@Override
public void run() {
try {
XValueChildrenList values = myDebugProcess.loadFrame();
if (!node.isObsolete()) {
addChildren(node, values);
}
}
catch (PyDebuggerException e) {
if (!node.isObsolete()) {
node.setErrorMessage("Unable to display frame variables");
}
LOG.warn(e);
}
}
});
}
示例12: loadFrame
import com.intellij.xdebugger.frame.XValueChildrenList; //导入依赖的package包/类
@Nullable
@Override
public XValueChildrenList loadFrame() throws PyDebuggerException {
if (myClient != null) {
try {
Object ret = myClient.execute(GET_FRAME, new Object[]{});
if (ret instanceof String) {
return parseVars((String)ret, null);
}
else {
checkError(ret);
}
}
catch (XmlRpcException e) {
throw new PyDebuggerException("Get frame from console failed", e);
}
}
return new XValueChildrenList();
}
示例13: loadVariable
import com.intellij.xdebugger.frame.XValueChildrenList; //导入依赖的package包/类
@Override
public XValueChildrenList loadVariable(PyDebugValue var) throws PyDebuggerException {
if (myClient != null) {
try {
Object ret = myClient.execute(GET_VARIABLE, new Object[]{GetVariableCommand.composeName(var)});
if (ret instanceof String) {
return parseVars((String)ret, var);
}
else {
checkError(ret);
}
}
catch (XmlRpcException e) {
throw new PyDebuggerException("Get variable from console failed", e);
}
}
return new XValueChildrenList();
}
示例14: computeChildren
import com.intellij.xdebugger.frame.XValueChildrenList; //导入依赖的package包/类
@Override
public void computeChildren(@NotNull XCompositeNode node)
{
final XValueChildrenList childrenList = new XValueChildrenList();
final Set<String> visited = new HashSet<String>();
processFieldOrProperty(myType, myObjectValueMirrorGetter, new Processor<DotNetFieldOrPropertyProxy>()
{
@Override
public boolean process(DotNetFieldOrPropertyProxy fieldOrPropertyProxy)
{
if(!visited.add(fieldOrPropertyProxy.getName()))
{
return true;
}
childrenList.add(new DotNetFieldOrPropertyValueNode(myDebugContext, fieldOrPropertyProxy, myFrameProxy, fieldOrPropertyProxy.isStatic() ? null : myObjectValueMirrorGetter.get()));
return true;
}
});
node.addChildren(childrenList, true);
}
示例15: computeChildren
import com.intellij.xdebugger.frame.XValueChildrenList; //导入依赖的package包/类
@Override
public void computeChildren(@NotNull XCompositeNode node)
{
final XValueChildrenList childrenList = new XValueChildrenList();
Map<DotNetFieldOrPropertyProxy, DotNetValueProxy> map = myValue.getValues();
for(Map.Entry<DotNetFieldOrPropertyProxy, DotNetValueProxy> entry : map.entrySet())
{
DotNetFieldOrPropertyProxy key = entry.getKey();
DotNetValueProxy value = entry.getValue();
DotNetStructValueInfo valueInfo = new DotNetStructValueInfo(myValue, this, key, value);
childrenList.add(new DotNetFieldOrPropertyValueNode(myDebugContext, key, myFrameProxy, null, valueInfo));
}
node.addChildren(childrenList, true);
}