|
1 "{ Package: 'stx:goodies/xmlsuite' }" |
|
2 |
|
3 "{ NameSpace: XMLv2 }" |
|
4 |
|
5 OldXMLWriter subclass:#XMLSyntaxHighlightingWriter |
|
6 instanceVariableNames:'' |
|
7 classVariableNames:'' |
|
8 poolDictionaries:'' |
|
9 category:'XML Suite-XML Writer' |
|
10 ! |
|
11 |
|
12 |
|
13 !XMLSyntaxHighlightingWriter class methodsFor:'accessing - colors'! |
|
14 |
|
15 attributeValueColor |
|
16 |
|
17 ^Color red:0 green:0 blue:100 |
|
18 |
|
19 "Created: / 23-04-2005 / 17:08:21 / janfrog" |
|
20 ! |
|
21 |
|
22 commentColor |
|
23 |
|
24 ^Color red:0 green:51 blue:0 |
|
25 |
|
26 "Created: / 23-04-2005 / 17:08:21 / janfrog" |
|
27 ! |
|
28 |
|
29 elementNameColor |
|
30 |
|
31 ^Color red:58 green:15 blue:58 |
|
32 |
|
33 "Created: / 23-04-2005 / 17:08:21 / janfrog" |
|
34 ! |
|
35 |
|
36 normalColor |
|
37 |
|
38 ^Color black |
|
39 |
|
40 "Created: / 23-04-2005 / 17:08:21 / janfrog" |
|
41 ! |
|
42 |
|
43 piColor |
|
44 |
|
45 ^Color gray |
|
46 |
|
47 "Created: / 23-04-2005 / 17:08:21 / janfrog" |
|
48 ! ! |
|
49 |
|
50 !XMLSyntaxHighlightingWriter methodsFor:'accessing - colors'! |
|
51 |
|
52 attributeValueColor |
|
53 ^ self class attributeValueColor |
|
54 |
|
55 "Created: / 23-04-2005 / 17:08:21 / janfrog" |
|
56 ! |
|
57 |
|
58 commentColor |
|
59 ^ self class commentColor |
|
60 |
|
61 "Created: / 23-04-2005 / 17:08:21 / janfrog" |
|
62 ! |
|
63 |
|
64 elementNameColor |
|
65 ^ self class elementNameColor |
|
66 |
|
67 "Created: / 23-04-2005 / 17:08:21 / janfrog" |
|
68 ! |
|
69 |
|
70 normalColor |
|
71 ^ self class normalColor |
|
72 |
|
73 "Created: / 23-04-2005 / 17:08:21 / janfrog" |
|
74 ! |
|
75 |
|
76 piColor |
|
77 ^ self class piColor |
|
78 |
|
79 "Created: / 23-04-2005 / 17:08:21 / janfrog" |
|
80 ! ! |
|
81 |
|
82 !XMLSyntaxHighlightingWriter methodsFor:'writing'! |
|
83 |
|
84 nextPutAttributeName:qName |
|
85 |
|
86 stream emphasis:#bold. |
|
87 super nextPutAttributeName:qName. |
|
88 stream emphasis:nil. |
|
89 |
|
90 "Created: / 17-04-2005 / 13:44:29 / janfrog" |
|
91 "Modified: / 22-04-2005 / 22:47:14 / janfrog" |
|
92 ! |
|
93 |
|
94 nextPutAttributeValue:aString |
|
95 |
|
96 stream |
|
97 emphasis:#color->self attributeValueColor. |
|
98 super nextPutAttributeValue:aString. |
|
99 stream |
|
100 emphasis:nil |
|
101 |
|
102 "Created: / 17-04-2005 / 13:44:29 / janfrog" |
|
103 "Modified: / 22-04-2005 / 22:45:26 / janfrog" |
|
104 ! |
|
105 |
|
106 nextPutComment:aString |
|
107 |
|
108 stream |
|
109 emphasis:(Array with:(#color->self commentColor) with:#italic). |
|
110 super nextPutComment:aString. |
|
111 stream |
|
112 emphasis:nil |
|
113 |
|
114 "Created: / 17-04-2005 / 13:44:29 / janfrog" |
|
115 "Modified: / 23-04-2005 / 09:22:08 / janfrog" |
|
116 ! |
|
117 |
|
118 nextPutElementPrefix:qName localName:anObject |
|
119 stream |
|
120 emphasis:#color -> self elementNameColor; |
|
121 nextPutAll:qName; |
|
122 emphasis:nil |
|
123 |
|
124 "Created: / 18-10-2005 / 10:50:19 / janfrog" |
|
125 ! |
|
126 |
|
127 nextPutPI:target data:data |
|
128 |
|
129 stream |
|
130 emphasis:(Array with: #color->self piColor with:#italic). |
|
131 |
|
132 super nextPutPI:target data:data. |
|
133 |
|
134 stream emphasis:nil |
|
135 |
|
136 "Created: / 23-04-2005 / 09:20:48 / janfrog" |
|
137 ! ! |
|
138 |
|
139 !XMLSyntaxHighlightingWriter class methodsFor:'documentation'! |
|
140 |
|
141 version |
|
142 ^ '$Header: /opt/data/cvs/stx/goodies/xmlsuite/XMLv2__XMLSyntaxHighlightingWriter.st,v 1.1.1.1 2005-11-01 22:07:10 vranyj1 Exp $' |
|
143 ! ! |