File tree 2 files changed +17
-2
lines changed
2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change
1
+ Extension { #name : ' XMLDocument' }
2
+
3
+ { #category : ' *XML-Parser-Tools' }
4
+ XMLDocument >> inspectorRoots [
5
+
6
+ ^ Array with: self root
7
+ ]
Original file line number Diff line number Diff line change @@ -14,19 +14,27 @@ XMLNode >> inspectTreeIn: specBuilder [
14
14
< inspectorPresentationOrder: 28 title: ' Tree' >
15
15
16
16
| roots |
17
- roots := self isDocument ifTrue: [ (Array with: self root) ] ifFalse: [ (Array with: self ) ].
17
+
18
+ roots := self inspectorRoots.
18
19
^ specBuilder newTree
19
20
roots: roots;
20
21
display: [ :aNode |
21
22
self inspectorTreeStringFor: aNode
22
23
];
23
24
" displayIcon: [ :aNode | aNode iconName ifNotNil: [ :aName | self iconNamed: aName ] ];"
24
25
children: [ :aNode |
25
- aNode isContentNode ifFalse: [ aNode descendantElements ] ifTrue: [ #() ]]
26
+
27
+ aNode hasChildren ifTrue: [ aNode descendantElements ] ifFalse: [ #() ]]
26
28
27
29
28
30
]
29
31
32
+ { #category : ' *XML-Parser-Tools' }
33
+ XMLNode >> inspectorRoots [
34
+
35
+ ^ Array with: self
36
+ ]
37
+
30
38
{ #category : ' *XML-Parser-Tools' }
31
39
XMLNode >> inspectorTreeStringFor: anXMLElement [
32
40
| display |
You can’t perform that action at this time.
0 commit comments