@@ -11,15 +11,15 @@ public int ChildrenShowLimit
11
11
get { return m_ChildrenShowLimit ; }
12
12
set { m_ChildrenShowLimit = value ; }
13
13
}
14
- public static bool m_ShowFullClasspaths = true ;
15
- public static bool m_ShowObjectIDs = true ;
14
+ public static bool m_ShowFullClasspaths = true ;
15
+ public static bool m_ShowObjectIDs = true ;
16
16
17
17
protected Value m_Value ;
18
18
private bool m_bEditing = false ;
19
19
20
- /// <summary>
21
- /// Get the display value based on user's preferences
22
- /// </summary>
20
+ /// <summary>
21
+ /// Get the display value based on user's preferences
22
+ /// </summary>
23
23
public override string Value
24
24
{
25
25
get
@@ -32,41 +32,41 @@ public override string Value
32
32
string temp = null ;
33
33
if ( type == VariableType_ . MOVIECLIP || type == VariableType_ . OBJECT )
34
34
{
35
- string typeStr = "" ;
36
- if ( m_ShowFullClasspaths )
37
- {
38
- // return class type with classpath
39
- typeStr = m_Value . getTypeName ( ) . replaceAll ( "::" , "." ) . ToString ( ) ;
40
-
41
- } else
42
- {
43
- // return class type without classpath
44
- typeStr = Strings . AfterLast ( m_Value . getTypeName ( ) . ToString ( ) , "::" , true ) ;
45
- }
46
-
47
- // show / hide IDs
48
- if ( m_ShowObjectIDs )
49
- {
50
- typeStr = typeStr . Replace ( "@" , " @" ) ;
51
- } else
52
- {
53
- typeStr = Strings . Before ( typeStr , "@" ) ;
54
- }
35
+ string typeStr = "" ;
36
+ if ( m_ShowFullClasspaths )
37
+ {
38
+ // return class type with classpath
39
+ typeStr = m_Value . getTypeName ( ) . replaceAll ( "::" , "." ) . ToString ( ) ;
40
+ }
41
+ else
42
+ {
43
+ // return class type without classpath
44
+ typeStr = Strings . AfterLast ( m_Value . getTypeName ( ) . ToString ( ) , "::" , true ) ;
45
+ }
46
+
47
+ // show / hide IDs
48
+ if ( m_ShowObjectIDs )
49
+ {
50
+ typeStr = typeStr . Replace ( "@" , " @" ) ;
51
+ }
52
+ else
53
+ {
54
+ typeStr = Strings . Before ( typeStr , "@" ) ;
55
+ }
55
56
56
- // rename array
57
- if ( typeStr . StartsWith ( "[]" ) )
58
- {
59
- typeStr = typeStr . Replace ( "[]" , "Array" ) ;
60
- }
57
+ // rename array
58
+ if ( typeStr . StartsWith ( "[]" ) )
59
+ {
60
+ typeStr = typeStr . Replace ( "[]" , "Array" ) ;
61
+ }
61
62
62
- // rename vector
63
- else if ( typeStr . StartsWith ( "__AS3__.vec.Vector.<" ) )
64
- {
65
- typeStr = typeStr . Replace ( "__AS3__.vec.Vector.<" , "Vector.<" ) ;
66
- }
63
+ // rename vector
64
+ else if ( typeStr . StartsWith ( "__AS3__.vec.Vector.<" ) )
65
+ {
66
+ typeStr = typeStr . Replace ( "__AS3__.vec.Vector.<" , "Vector.<" ) ;
67
+ }
67
68
68
- return typeStr ;
69
-
69
+ return typeStr ;
70
70
}
71
71
else if ( type == VariableType_ . NUMBER )
72
72
{
@@ -95,7 +95,7 @@ public override string Value
95
95
{
96
96
if ( m_Value . getValueAsObject ( ) != null )
97
97
{
98
- return "\" " + escape ( m_Value . ToString ( ) ) + "\" " ;
98
+ return "\" " + Escape ( m_Value . ToString ( ) ) + "\" " ;
99
99
}
100
100
}
101
101
else if ( type == VariableType_ . NULL )
@@ -109,7 +109,7 @@ public override string Value
109
109
temp = m_Value . ToString ( ) ;
110
110
if ( ! m_bEditing )
111
111
{
112
- temp = escape ( temp ) ;
112
+ temp = Escape ( temp ) ;
113
113
}
114
114
return temp ;
115
115
}
@@ -119,111 +119,98 @@ public override string Value
119
119
}
120
120
}
121
121
122
- /// <summary>
123
- /// Get the full classpath of the value, eg: "flash.display.MovieClip"
124
- /// </summary>
125
- public string ClassPath
126
- {
127
- get
128
- {
129
-
130
- //return m_Value.getClassHierarchy(false).replaceAll("::", ".");
122
+ /// <summary>
123
+ /// Get the full classpath of the value, eg: "flash.display.MovieClip"
124
+ /// </summary>
125
+ public string ClassPath
126
+ {
127
+ get
128
+ {
131
129
132
- if ( m_Value == null )
133
- {
134
- return null ;
135
- }
136
- int type = m_Value . getType ( ) ;
137
- if ( type == VariableType_ . MOVIECLIP || type == VariableType_ . OBJECT )
138
- {
139
- string typeStr = Strings . Before ( m_Value . getTypeName ( ) . replaceAll ( "::" , "." ) , "@" ) ;
130
+ //return m_Value.getClassHierarchy(false).replaceAll("::", ".");
140
131
141
- if ( typeStr == "[]" )
142
- {
143
- return "Array" ;
144
- }
145
- return typeStr ;
132
+ if ( m_Value == null )
133
+ {
134
+ return null ;
135
+ }
136
+ int type = m_Value . getType ( ) ;
137
+ if ( type == VariableType_ . MOVIECLIP || type == VariableType_ . OBJECT )
138
+ {
139
+ string typeStr = Strings . Before ( m_Value . getTypeName ( ) . replaceAll ( "::" , "." ) , "@" ) ;
146
140
147
- }
148
- else if ( type == VariableType_ . NUMBER )
149
- {
150
- return "Number" ;
151
- }
152
- else if ( type == VariableType_ . BOOLEAN )
153
- {
154
- return "Boolean" ;
155
- }
156
- else if ( type == VariableType_ . STRING )
157
- {
158
- return "String" ;
159
- }
160
- else if ( type == VariableType_ . NULL )
161
- {
162
- return "null" ;
163
- }
164
- else if ( type == VariableType_ . FUNCTION )
165
- {
166
- return "Function" ;
167
- }
168
- return null ;
169
- }
170
- set
171
- {
172
- throw new NotSupportedException ( ) ;
173
- }
141
+ if ( typeStr == "[]" )
142
+ {
143
+ return "Array" ;
144
+ }
145
+ return typeStr ;
174
146
175
- }
147
+ }
148
+ else if ( type == VariableType_ . NUMBER )
149
+ {
150
+ return "Number" ;
151
+ }
152
+ else if ( type == VariableType_ . BOOLEAN )
153
+ {
154
+ return "Boolean" ;
155
+ }
156
+ else if ( type == VariableType_ . STRING )
157
+ {
158
+ return "String" ;
159
+ }
160
+ else if ( type == VariableType_ . NULL )
161
+ {
162
+ return "null" ;
163
+ }
164
+ else if ( type == VariableType_ . FUNCTION )
165
+ {
166
+ return "Function" ;
167
+ }
168
+ return null ;
169
+ }
170
+ }
176
171
177
- /// <summary>
178
- /// Get the object ID with the class name
179
- /// </summary>
180
- public string ID
181
- {
182
- get
183
- {
184
- if ( m_Value != null )
185
- {
186
- int type = m_Value . getType ( ) ;
187
- if ( type == VariableType_ . MOVIECLIP || type == VariableType_ . OBJECT )
188
- {
189
- return m_Value . getTypeName ( ) . replaceAll ( "::" , "." ) . replaceAll ( "@" , " - " ) . ToString ( ) ;
190
- }
191
- else if ( type == VariableType_ . FUNCTION )
192
- {
193
- return "Function - " + m_Value . ToString ( ) ;
194
- }
195
- }
196
- return "" ;
197
- }
198
- }
172
+ /// <summary>
173
+ /// Get the object ID with the class name
174
+ /// </summary>
175
+ public string Id
176
+ {
177
+ get
178
+ {
179
+ if ( m_Value != null )
180
+ {
181
+ int type = m_Value . getType ( ) ;
182
+ if ( type == VariableType_ . MOVIECLIP || type == VariableType_ . OBJECT )
183
+ {
184
+ return m_Value . getTypeName ( ) . replaceAll ( "::" , "." ) . replaceAll ( "@" , " - " ) . ToString ( ) ;
185
+ }
186
+ else if ( type == VariableType_ . FUNCTION )
187
+ {
188
+ return "Function - " + m_Value . ToString ( ) ;
189
+ }
190
+ }
191
+ return "" ;
192
+ }
193
+ }
199
194
200
- /// <summary>
201
- /// Check if the value is a primitive type (int, Number, String, Boolean)
202
- /// </summary>
203
- public bool IsPrimitive
195
+ /// <summary>
196
+ /// Check if the value is a primitive type (int, Number, String, Boolean)
197
+ /// </summary>
198
+ public bool IsPrimitive
204
199
{
205
200
get
206
201
{
207
- if ( m_Value == null )
202
+ if ( m_Value == null )
208
203
{
209
204
return false ;
210
205
}
211
206
int type = m_Value . getType ( ) ;
212
- if ( type == VariableType_ . NUMBER || type == VariableType_ . BOOLEAN ||
213
- type == VariableType_ . STRING || type == VariableType_ . NULL )
214
- {
215
- return true ;
216
- }
217
- return false ;
218
- }
219
- set
220
- {
221
- throw new NotSupportedException ( ) ;
207
+ return type == VariableType_ . NUMBER || type == VariableType_ . BOOLEAN ||
208
+ type == VariableType_ . STRING || type == VariableType_ . NULL ;
222
209
}
223
210
}
224
211
225
-
226
- private string escape ( string text )
212
+
213
+ private string Escape ( string text )
227
214
{
228
215
text = text . Replace ( "\\ " , "\\ \\ " ) ;
229
216
text = text . Replace ( "\" " , "\\ \" " ) ;
0 commit comments