public List <DiagnosticsNode> getProperties(InspectorInstanceRef inspectorInstanceRef, string groupName) { var list = this.window.withBindingFunc(() => this._widgetInspectorService.getProperties(inspectorInstanceRef.id, groupName)); return(list.Select(json => this.toNode(json, isProperty: true)).ToList()); }
public InspectorTreeItem getTreeItemByValueRef(InspectorInstanceRef instanceRef, TreeViewItem from = null) { InspectorTreeItem item; this.m_ValueToNode.TryGetValue(instanceRef, out item); return(item); }
void updateSelection() { if (!this.m_NeedSelectionUpdate) { return; } this.m_NeedSelectionUpdate = false; var diagnosticsNode = this.m_InspectorService.getSelection(this.m_TreeView.selectedNode, this.treeType, true, this.m_GroupName); this.m_SelectedNodeRef = diagnosticsNode == null ? null : diagnosticsNode.diagnosticRef; if (diagnosticsNode != null) { var item = this.m_TreeView.getTreeItemByValueRef(diagnosticsNode.valueRef); if (item == null) { this.LoadTree(); item = this.m_TreeView.getTreeItemByValueRef(diagnosticsNode.valueRef); } this.m_TreeView.CollapseAll(); if (item != null) { this.m_TreeView.SetSelection(new List <int> { item.id }, TreeViewSelectionOptions.RevealAndFrame); } else { this.m_TreeView.SetSelection(new List <int>()); } this.m_TreeView.Repaint(); } }
public DiagnosticsNode getSelection(DiagnosticsNode previousSelection, WidgetTreeType treeType, bool localOnly, string groupName) { InspectorInstanceRef previousSelectionRef = previousSelection == null ? null : previousSelection.diagnosticRef; string previousSelectionId = previousSelectionRef == null ? null : previousSelectionRef.id; DiagnosticsNode result = null; this.window.withBinding(() => { switch (treeType) { case WidgetTreeType.Widget: result = localOnly ? this.toNode( this._widgetInspectorService.getSelectedSummaryWidget(previousSelectionId, groupName)) : this.toNode( this._widgetInspectorService.getSelectedWidget(previousSelectionId, groupName)); break; case WidgetTreeType.Render: result = this.toNode( this._widgetInspectorService.getSelectedRenderObject(previousSelectionId, groupName)); break; } }); if (result != null && result.diagnosticRef == previousSelectionRef) { return(previousSelection); } else { return(result); } }
public bool setSelection(InspectorInstanceRef inspectorInstanceRef, string groupName) { return(this.window.withBindingFunc(() => this._widgetInspectorService.setSelectionById(inspectorInstanceRef.id, groupName))); }
public DiagnosticsNode getDetailsSubtree(InspectorInstanceRef instanceRef, string groupName) { return(this.toNode(this.window.withBindingFunc(() => this._widgetInspectorService.getDetailsSubtree(instanceRef.id, groupName)))); }
void OnNodeSelectionChanged(DiagnosticsNode node) { this.m_SelectedNodeRef = node == null ? null : node.diagnosticRef; this.m_InspectorService.setSelection(node == null ? null : node.valueRef, this.m_GroupName); this.m_NeedDetailUpdate = this.m_DetailTreeView != null; }