@@ -25,34 +25,96 @@ public partial class DataTreeControl : UserControl, IToolTipProvider
25
25
private DataTreeState state ;
26
26
private bool watchMode ;
27
27
private bool addingNewExpression ;
28
- private static bool m_combineInherited = false ;
29
- private static bool m_showStaticInObjects = true ;
28
+ private int _copyTreeMaxChars ;
29
+ private int _copyTreeMaxRecursion ;
30
+ private bool _combineInherited ;
31
+ private bool _hideStaticInObjects ;
32
+ private bool _hideFullClasspaths ;
33
+ private bool _hideObjectIds ;
30
34
31
35
public Collection < Node > Nodes
32
36
{
33
- get
37
+ get { return _model . Root . Nodes ; }
38
+ }
39
+
40
+ public TreeViewAdv Tree
41
+ {
42
+ get { return _tree ; }
43
+ }
44
+
45
+ public ViewerForm Viewer
46
+ {
47
+ get { return viewerForm ; }
48
+ }
49
+
50
+ public int CopyTreeMaxChars
51
+ {
52
+ get { return _copyTreeMaxChars ; }
53
+ set
34
54
{
35
- return _model . Root . Nodes ;
55
+ if ( _copyTreeMaxChars == value ) return ;
56
+ _copyTreeMaxChars = value ;
57
+ Tree . FullUpdate ( ) ;
36
58
}
37
59
}
38
60
39
- public TreeViewAdv Tree
61
+ public int CopyTreeMaxRecursion
40
62
{
41
- get
63
+ get { return _copyTreeMaxRecursion ; }
64
+ set
42
65
{
43
- return _tree ;
66
+ if ( _copyTreeMaxRecursion == value ) return ;
67
+ _copyTreeMaxRecursion = value ;
68
+ Tree . FullUpdate ( ) ;
44
69
}
45
70
}
46
71
47
- public ViewerForm Viewer
72
+ public bool CombineInherited
48
73
{
49
- get
74
+ get { return _combineInherited ; }
75
+ set
50
76
{
51
- return viewerForm ;
77
+ if ( _combineInherited == value ) return ;
78
+ _combineInherited = value ;
79
+ Tree . FullUpdate ( ) ;
52
80
}
53
81
}
54
82
55
- public DataTreeControl ( ) : this ( false )
83
+ public bool HideStaticInObjects
84
+ {
85
+ get { return _hideStaticInObjects ; }
86
+ set
87
+ {
88
+ if ( _hideStaticInObjects == value ) return ;
89
+ _hideStaticInObjects = value ;
90
+ Tree . FullUpdate ( ) ;
91
+ }
92
+ }
93
+
94
+ public bool HideFullClasspaths
95
+ {
96
+ get { return _hideFullClasspaths ; }
97
+ set
98
+ {
99
+ if ( _hideFullClasspaths == value ) return ;
100
+ _hideFullClasspaths = value ;
101
+ Tree . FullUpdate ( ) ;
102
+ }
103
+ }
104
+
105
+ public bool HideObjectIds
106
+ {
107
+ get { return _hideObjectIds ; }
108
+ set
109
+ {
110
+ if ( _hideObjectIds == value ) return ;
111
+ _hideObjectIds = value ;
112
+ Tree . FullUpdate ( ) ;
113
+ }
114
+ }
115
+
116
+ public DataTreeControl ( )
117
+ : this ( false )
56
118
{
57
119
}
58
120
@@ -376,7 +438,11 @@ public void ListChildItems(ValueNode node)
376
438
int tmpLimit = node . ChildrenShowLimit ;
377
439
foreach ( Variable member in node . PlayerValue . getMembers ( flashInterface . Session ) )
378
440
{
379
- VariableNode memberNode = new VariableNode ( member ) ;
441
+ VariableNode memberNode = new VariableNode ( member )
442
+ {
443
+ HideClassId = HideObjectIds ,
444
+ HideFullClasspath = HideFullClasspaths
445
+ } ;
380
446
381
447
if ( member . isAttributeSet ( VariableAttribute_ . IS_STATIC ) )
382
448
{
@@ -395,7 +461,7 @@ public void ListChildItems(ValueNode node)
395
461
// inherited vars
396
462
if ( inherited . Count > 0 )
397
463
{
398
- if ( m_combineInherited )
464
+ if ( _combineInherited )
399
465
{
400
466
// list inherited alongside main class members
401
467
foreach ( DataNode item in inherited )
@@ -419,7 +485,7 @@ public void ListChildItems(ValueNode node)
419
485
}
420
486
421
487
// static vars
422
- if ( m_showStaticInObjects && statics . Count > 0 )
488
+ if ( ! _hideStaticInObjects && statics . Count > 0 )
423
489
{
424
490
DataNode staticNode = new ValueNode ( "[static]" ) ;
425
491
statics . Sort ( ) ;
@@ -447,7 +513,11 @@ public void ListChildItems(ValueNode node)
447
513
var ctx = new ExpressionContext ( flashInterface . Session , flashInterface . GetFrames ( ) [ PluginMain . debugManager . CurrentFrame ] ) ;
448
514
var obj = exp . evaluate ( ctx ) ;
449
515
if ( obj is flash . tools . debugger . concrete . DValue ) obj = new flash . tools . debugger . concrete . DVariable ( "getChildAt(" + i + ")" , ( flash . tools . debugger . concrete . DValue ) obj , ( ( flash . tools . debugger . concrete . DValue ) obj ) . getIsolateId ( ) ) ;
450
- DataNode childNode = new VariableNode ( ( Variable ) obj ) ;
516
+ DataNode childNode = new VariableNode ( ( Variable ) obj )
517
+ {
518
+ HideClassId = HideObjectIds ,
519
+ HideFullClasspath = HideFullClasspaths
520
+ } ;
451
521
childNode . Text = "child_" + i ;
452
522
childrenNode . Nodes . Add ( childNode ) ;
453
523
}
@@ -661,49 +731,9 @@ private void CopyItemTreeClick(Object sender, System.EventArgs e)
661
731
private void CopyTreeInternal ( int levelLimit )
662
732
{
663
733
ValueNode node = Tree . SelectedNode . Tag as ValueNode ;
664
- Clipboard . SetText ( CopyTreeHelper . GetTreeAsText ( Tree . SelectedNode , node , "\t " , this , levelLimit ) ) ;
665
- }
666
-
667
- #endregion
668
-
669
- #region Settings
670
-
671
- public static int CopyTreeMaxChars
672
- {
673
- get { return CopyTreeHelper . _CopyTreeMaxChars ; }
674
- set { CopyTreeHelper . _CopyTreeMaxChars = value ; }
675
- }
676
-
677
- public static int CopyTreeMaxRecursion
678
- {
679
- get { return CopyTreeHelper . _CopyTreeMaxRecursion ; }
680
- set { CopyTreeHelper . _CopyTreeMaxRecursion = value ; }
734
+ Clipboard . SetText ( new Helpers . DefaultDataTreeExporter ( ) { CopyTreeMaxChars = PluginMain . settingObject . CopyTreeMaxChars , CopyTreeMaxRecursion = PluginMain . settingObject . CopyTreeMaxRecursion } . GetTreeAsText ( node , "\t " , this , levelLimit ) ) ;
681
735
}
682
736
683
- public static bool CombineInherited
684
- {
685
- get { return DataTreeControl . m_combineInherited ; }
686
- set { DataTreeControl . m_combineInherited = value ; }
687
- }
688
-
689
- public static bool ShowStaticInObjects
690
- {
691
- get { return DataTreeControl . m_showStaticInObjects ; }
692
- set { DataTreeControl . m_showStaticInObjects = value ; }
693
- }
694
-
695
- public static bool ShowFullClasspaths
696
- {
697
- get { return ValueNode . m_ShowFullClasspaths ; }
698
- set { ValueNode . m_ShowFullClasspaths = value ; }
699
- }
700
-
701
- public static bool ShowObjectIDs
702
- {
703
- get { return ValueNode . m_ShowObjectIDs ; }
704
- set { ValueNode . m_ShowObjectIDs = value ; }
705
- }
706
-
707
737
#endregion
708
738
709
739
}
0 commit comments