author | Stefan Vogel <sv@exept.de> |
Wed, 29 Nov 2017 11:12:11 +0100 | |
changeset 17815 | cacf624e47f3 |
parent 17658 | ad48583000a7 |
child 17877 | b1761a097d6e |
permissions | -rw-r--r-- |
9996 | 1 |
" |
2 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
"{ Package: 'stx:libtool' }" |
|
8779 | 13 |
|
14 |
"{ NameSpace: Tools }" |
|
15 |
||
16 |
ApplicationModel subclass:#Inspector2 |
|
10379 | 17 |
instanceVariableNames:'tabViewAspect navigationHistoryHolder navigationStateAspect |
11142 | 18 |
browser currentObjectHolder colorProfileHolder |
13805 | 19 |
toolbarBackgroundHolder evaluationLanguageHolder |
16815 | 20 |
evaluationLanguageList operationsMenuEnabledHolder' |
13805 | 21 |
classVariableNames:'LastExtent ColorProfiles EvaluationLanguageMap' |
8779 | 22 |
poolDictionaries:'' |
10460 | 23 |
category:'Interface-Inspector2' |
8779 | 24 |
! |
25 |
||
10597 | 26 |
Model subclass:#NavigationState |
17385 | 27 |
instanceVariableNames:'inspector theObject index tabs selectionIndex displayString' |
8779 | 28 |
classVariableNames:'' |
29 |
poolDictionaries:'' |
|
30 |
privateIn:Inspector2 |
|
31 |
! |
|
32 |
||
9996 | 33 |
!Inspector2 class methodsFor:'documentation'! |
34 |
||
35 |
copyright |
|
36 |
" |
|
37 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
38 |
All Rights Reserved |
|
39 |
||
40 |
This software is furnished under a license and may be used |
|
41 |
only in accordance with the terms of that license and with the |
|
42 |
inclusion of the above copyright notice. This software may not |
|
43 |
be provided or otherwise made available to, or used by, any |
|
44 |
other person. No title to or ownership of the software is |
|
45 |
hereby transferred. |
|
46 |
" |
|
10597 | 47 |
! |
48 |
||
11928 | 49 |
documentation |
10597 | 50 |
" |
51 |
an application for a multitab inspector |
|
52 |
extendable by the inspected object itself, by providing additional |
|
53 |
tabs via the inspector2XXX methods |
|
54 |
||
16819 | 55 |
Interface for objects: |
56 |
redefine |
|
57 |
inspectorExtraAttributes (to get additional pseudo-attributes into the left field list) |
|
58 |
inspectorExtraTabs (to get additional tabs into the tab list) |
|
59 |
inspectorExtraMenuOperations(to get additional operations menu items into the operations menu) |
|
60 |
||
61 |
the operations menu is invisible, if there are no operations. |
|
62 |
||
10597 | 63 |
[author:] |
64 |
Jan Vrani |
|
65 |
" |
|
66 |
! ! |
|
67 |
||
11142 | 68 |
!Inspector2 class methodsFor:'initialization'! |
69 |
||
70 |
initialize |
|
71 |
"Invoked at system start or when the class is dynamically loaded." |
|
72 |
||
73 |
"/ please change as required (and remove this comment) |
|
74 |
||
75 |
||
76 |
ColorProfiles := Dictionary new. |
|
77 |
ColorProfiles |
|
78 |
at: #default put: nil; "default color" |
|
79 |
at: #red put: Color red lighter lighter; |
|
80 |
at: #green put: Color green lighter; |
|
81 |
at: #blue put: Color blue lighter; |
|
82 |
at: #yellow put: Color yellow lighter; |
|
13805 | 83 |
at: #gray put: Color gray. |
11142 | 84 |
|
13805 | 85 |
EvaluationLanguageMap := Dictionary new. |
86 |
||
87 |
"Modified: / 26-10-2013 / 00:42:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11142 | 88 |
! ! |
89 |
||
10597 | 90 |
!Inspector2 class methodsFor:'help specs'! |
91 |
||
92 |
flyByHelpSpec |
|
93 |
"This resource specification was automatically generated |
|
94 |
by the UIHelpTool of ST/X." |
|
95 |
||
96 |
"Do not manually edit this!! If it is corrupted, |
|
97 |
the UIHelpTool may not be able to read the specification." |
|
98 |
||
99 |
" |
|
100 |
UIHelpTool openOnClass:Tools::Inspector2 |
|
101 |
" |
|
102 |
||
103 |
<resource: #help> |
|
104 |
||
105 |
^ super flyByHelpSpec addPairsFrom:#( |
|
106 |
||
107 |
#backwardInVisitingHistory |
|
108 |
'Move backward in the history of previously visited objects' |
|
109 |
||
110 |
#browseClassOfShownObject |
|
17200 | 111 |
'Open a SystemBrowser on the inspected object''s class' |
10597 | 112 |
|
113 |
#browseFile |
|
11134 | 114 |
'Open a FileBrowser on the file represented by the shown object' |
115 |
||
116 |
#editImage |
|
117 |
'Open an ImageEditor on the bitmap/image represented by the shown object' |
|
10597 | 118 |
|
119 |
#forwardInVisitingHistory |
|
120 |
'Move forward in the history of previously visited objects' |
|
121 |
||
11160 | 122 |
#colorProfile |
123 |
'Change the color profile' |
|
124 |
||
125 |
#refresh |
|
126 |
'Refresh for changed object' |
|
10597 | 127 |
|
128 |
) |
|
129 |
||
130 |
"Created: / 19-08-2011 / 08:52:33 / cg" |
|
11265 | 131 |
! |
132 |
||
133 |
helpSpec |
|
134 |
"This resource specification was automatically generated |
|
135 |
by the UIHelpTool of ST/X." |
|
136 |
||
137 |
"Do not manually edit this!! If it is corrupted, |
|
138 |
the UIHelpTool may not be able to read the specification." |
|
139 |
||
140 |
" |
|
141 |
UIHelpTool openOnClass:Tools::Inspector2 |
|
142 |
" |
|
143 |
||
144 |
<resource: #help> |
|
145 |
||
146 |
^ super helpSpec addPairsFrom:#( |
|
147 |
||
148 |
#colorProfile |
|
149 |
'' |
|
150 |
||
13805 | 151 |
#evaluationLanguage |
152 |
'Language used for evaluating expressions in code panes' |
|
153 |
||
11265 | 154 |
) |
9996 | 155 |
! ! |
8779 | 156 |
|
11142 | 157 |
!Inspector2 class methodsFor:'image specs'! |
158 |
||
159 |
settingsIcon |
|
160 |
||
13805 | 161 |
<resource: #image> |
11142 | 162 |
|
13805 | 163 |
^self settingsIcon6 |
164 |
||
11161 | 165 |
"Modified: / 19-01-2012 / 14:00:35 / cg" |
13805 | 166 |
"Modified: / 28-02-2012 / 21:59:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
11142 | 167 |
! |
168 |
||
169 |
settingsIcon1 |
|
170 |
"This resource specification was automatically generated |
|
171 |
by the ImageEditor of ST/X." |
|
15761 | 172 |
|
11142 | 173 |
"Do not manually edit this!! If it is corrupted, |
174 |
the ImageEditor may not be able to read the specification." |
|
15761 | 175 |
|
11142 | 176 |
" |
15761 | 177 |
self settingsIcon1 inspect |
178 |
ImageEditor openOnClass:self andSelector:#settingsIcon1 |
|
179 |
Icon flushCachedIcons |
|
180 |
" |
|
181 |
||
182 |
<resource: #image> |
|
11142 | 183 |
|
15761 | 184 |
^Icon |
185 |
constantNamed:'Tools::Inspector2 settingsIcon1' |
|
186 |
ifAbsentPut:[(Depth8Image new) width:24; height:24; bits:(ByteArray fromPackedString:' |
|
187 |
P$IBP$IBP$IBP$IBP$IBP$IBP$IBP$IBP$IBP$IBP$IBP$IBP$IBP$IBP$IBP$IBP$IU@@@@@@@@@@@/B#FV''9>_%#DJUTIBP$HJ(ZF!!V1V@_*UO*RQ-FGIA |
|
188 |
R2%N^DIBP$HJ_Z1:E32BEU$3(1PTEAPTEAQ''''4IBP$HJ)A%@+*9@PD@Y$&$T''I2\''I0IJ4IBP$I8Q%04 8NC 8L?]B)$L HB@ PT4IBP$I8&6(SN#(:N#A7 |
|
189 |
WR\2B@ HB@ RT4IBP$JVT#\7M3\7M209"7&J"(*J"(*''W$IBP$JVUE]WU5]WU6D]^X*J"()+"((>_DIBP$JV"DUEQTUEQPE&K(*J"+A K(*ET4IBP$H+] 0L |
|
190 |
C@2MH NMR"ZTI(]1ZGFXC$IBP$H+G8<5!!CU5*7T!!MT13SCV (CV Q4IBP$H+JJ-VAUZ+%IQV!!AX=E$$V\FU0J4IBP$H+[J.+F*.T%IRT$1,[F1,[F1-CJ4IB |
|
191 |
P$HN+7-Q^5EQTUEPW9^W%9^W%9].C$IBP$HN(''-QTUEQTRVUX&I"X&I"X&HKC$IBP$I<#HZ*****''U"Y&Y&Y&Y&Y&Y@M_DIBP$I<V(Z****** HF#(:N#(:N |
|
192 |
HBB^_DIBP$I<_8Z*******(Q#(:N#(8OC0R-_DIBP$JZ$ZZA*J ;X8$-RF=/G#X8A11D&$IBP$H#&)*Z&)*Z&)*Z&)*Z&)*Z&)*ZSTIBP$IBP$IBP$IBP$IB |
|
193 |
P$IBP$IBP$IBP$IBP$IBP$IBP$IBP$IBP$IBP$IBP$IBP$IB') ; colorMapFromArray:#[102 126 156 94 131 167 114 143 168 89 127 166 127 156 177 89 130 167 125 154 175 112 141 173 184 184 184 111 137 168 101 125 155 94 142 177 92 130 167 93 143 177 97 121 151 127 157 177 104 131 163 122 151 174 100 127 161 113 142 172 164 173 181 142 161 180 91 133 170 140 160 179 122 145 171 134 154 177 85 122 161 99 140 174 109 140 173 95 128 164 120 145 174 90 121 160 128 156 177 88 128 167 88 126 165 98 112 130 134 153 175 105 139 168 83 119 159 98 126 160 91 120 159 125 148 173 108 134 165 98 122 152 105 137 169 119 145 172 86 121 159 102 125 156 113 142 171 100 123 154 163 172 180 140 159 179 124 148 173 89 129 167 117 144 174 105 138 169 114 142 173 101 133 166 114 143 172 111 137 167 142 160 179 91 132 169 92 124 160 122 147 173 135 155 177 119 143 170 0 0 0 99 139 173 108 139 173 95 132 168 126 149 174 98 121 152 122 147 174 90 133 170 87 123 163 121 145 171 87 127 165 96 110 128 131 153 176 146 163 180 97 134 167 181 181 181 107 136 168 97 120 151 102 131 166 108 122 140 85 124 163 99 134 168 118 149 173 143 161 180 108 135 167 139 159 180 125 149 173 106 135 167 96 119 150 106 143 173 86 120 159 98 132 168 117 151 177 112 138 167 96 123 157 92 134 170 92 128 164 121 145 172 88 126 164 119 141 168 115 142 171 82 112 152 93 122 160 127 148 172 94 139 174 121 146 174 91 134 170 88 125 164 120 143 170 86 125 164 118 143 170 83 121 161 94 124 162 111 140 170 100 124 154 162 171 179 138 158 179 160 169 177 96 120 150 132 155 178 146 163 181 110 138 170 144 162 180 109 136 167 142 161 179 123 148 174 90 131 168 90 126 163 159 168 176 86 123 162 97 127 164 114 140 169 183 183 183 95 126 161 106 133 166 90 128 166 128 157 177 87 127 166 123 154 177 112 140 172 129 150 174 95 135 171 182 182 182 114 149 175 99 123 153 108 145 175 89 127 165 124 154 177 95 119 149 116 142 171 185 185 185 102 134 164 96 143 177 99 122 153 90 130 168 137 158 180 102 130 165 135 154 176 131 153 177 147 164 181 110 137 169 96 125 160 110 137 167 141 159 178 180 180 180 161 170 178 135 156 179 102 142 176 135 156 177 97 125 162 84 117 156]; mask:((ImageMask new) width:24; height:24; bits:(ByteArray fromPackedString:'@@@@@@@@O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<@@@@@@@@') ; yourself); yourself] |
|
11142 | 194 |
! |
195 |
||
196 |
settingsIcon2 |
|
197 |
"This resource specification was automatically generated |
|
198 |
by the ImageEditor of ST/X." |
|
15761 | 199 |
|
11142 | 200 |
"Do not manually edit this!! If it is corrupted, |
201 |
the ImageEditor may not be able to read the specification." |
|
15761 | 202 |
|
11142 | 203 |
" |
204 |
self settingsIcon2 inspect |
|
205 |
ImageEditor openOnClass:self andSelector:#settingsIcon2 |
|
15761 | 206 |
Icon flushCachedIcons |
207 |
" |
|
208 |
||
209 |
<resource: #image> |
|
210 |
||
211 |
^Icon |
|
212 |
constantNamed:'Tools::Inspector2 settingsIcon2' |
|
213 |
ifAbsentPut:[(Depth8Image new) width:24; height:24; bits:(ByteArray fromPackedString:' |
|
214 |
^G!!8^G!!8^G!!8^G!!8^G!!8^G!!8^G!!8^G!!8^G!!8^G!!8^G!!8^G!!8^G!!8^G!!8^G!!8^G!!8^G!!_UEQTUEQTUERLCGQVU%YVU''PLW7!!8^G L\''I2NQ@0VHEX"!!)USP4W |
|
215 |
M253CG!!8^G L"4(AT!!$YDABJZ$MCP4MCP4M^U''!!8^G L\6)*T5M*Z&)*J5]CA XFA XHU''!!8^G LB24-O#8>O#9>E7(,OV=/[6=BO7!!8^G LC5%9 HB@ AFB |
|
216 |
V L=[6=/[6<[O7!!8^G!!VBS,;N3,;N6I[]%5/[6=/[6<#AW!!8^G!!VJVM#X6M#X7-LWV=/[6=0[6<%O7!!8^G!!VB&1,[F1,[H5EA6=/[2\GA6=?O7!!8^G!!V!!FU% |
|
217 |
YVVFC!!VFK)EH$R85C#TNO7!!8^G!!VGD9.]V8 E"A.[$^OQ695]V95OG!!8^G!!VAAY@Y4@VRD!!@]RP^IBP$[TQ-U''!!8^G!!VWAXVXAYHRD!!H_ALSD1LSD1L3U''!!8 |
|
218 |
^G ?J#YHM$!!HRD!!$ 4%IRT%IRT%KO7!!8^G ?D#YHRD!!HRC,1JB (JB (JB"EO7!!8^G ?TQ=1\WE1@&!!7]7]7]7]7]2>NO7!!8^G ?@A=1\WE1\REOGQ4]GQ4] |
|
219 |
GQ5+O7!!8^G ?"Q=1\WE1\WD&GQ4]GQ5FQ$X2O7!!8^G"H$@!!)PTEAXQ!!&EG5=MH^@$E@8"G!!8^G :"H"H"H"H"H"H"H"H"H"H"H"HH''!!8^G!!8^G!!8^G!!8^G!!8 |
|
220 |
^G!!8^G!!8^G!!8^G!!8^G!!8^G!!8^G!!8^G!!8^G!!8^G!!8^G!!8^G!!8') ; colorMapFromArray:#[139 152 168 154 164 174 136 152 167 134 148 165 130 145 164 133 144 160 220 220 220 128 145 164 140 153 169 138 153 169 133 148 167 148 159 172 135 147 162 145 156 170 129 148 167 143 156 170 156 165 175 141 156 170 136 150 167 134 155 172 146 158 172 129 148 168 165 170 174 144 156 170 142 155 169 156 165 174 152 161 172 135 148 165 130 145 165 149 163 173 130 151 169 164 169 173 126 145 165 142 156 169 133 140 149 133 147 165 130 151 170 131 147 165 146 160 172 127 143 163 143 160 173 136 150 168 133 147 166 149 160 172 133 146 163 147 159 171 128 146 166 146 162 173 157 166 175 142 159 172 136 156 173 134 154 171 145 157 172 129 147 167 165 169 173 145 157 170 139 154 171 154 164 175 134 141 150 137 154 169 134 145 161 166 171 175 146 159 172 133 145 160 127 147 166 140 153 168 137 150 166 209 214 218 131 152 170 131 149 167 148 163 173 128 148 167 218 218 218 139 157 172 152 163 174 132 154 172 132 149 167 146 157 170 128 148 168 147 162 172 139 155 171 138 151 168 155 165 174 152 163 173 136 148 163 148 159 171 134 146 161 144 155 169 158 166 175 142 156 170 138 152 168 135 151 168 131 146 165 166 170 174 145 157 171 139 146 155 127 146 165 141 154 168 137 153 169 134 152 169 133 152 168 131 150 168 144 157 171 129 150 168 144 159 171 139 153 168 152 162 173 133 156 173 132 151 169 130 152 170 129 149 168 219 219 219 126 141 161 217 217 217 153 164 175 150 161 173 135 146 162 130 150 169 132 148 165 147 162 173 85 85 85 141 156 171 139 152 167 134 151 169 132 152 170 145 158 172 146 158 171 130 148 166 142 156 171 158 167 175 140 155 170 138 156 171 132 147 166 132 156 173 130 149 168 143 157 172 132 144 159 140 154 170 155 164 174 151 162 174 136 147 163 132 150 168 131 156 173 128 147 167 141 155 171 126 144 164]; mask:((ImageMask new) width:24; height:24; bits:(ByteArray fromPackedString:'@@@@@@@@O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<@@@@@@@@') ; yourself); yourself] |
|
11142 | 221 |
! |
222 |
||
223 |
settingsIcon3 |
|
224 |
"This resource specification was automatically generated |
|
225 |
by the ImageEditor of ST/X." |
|
15761 | 226 |
|
11142 | 227 |
"Do not manually edit this!! If it is corrupted, |
228 |
the ImageEditor may not be able to read the specification." |
|
15761 | 229 |
|
11142 | 230 |
" |
231 |
self settingsIcon3 inspect |
|
232 |
ImageEditor openOnClass:self andSelector:#settingsIcon3 |
|
15761 | 233 |
Icon flushCachedIcons |
234 |
" |
|
235 |
||
236 |
<resource: #image> |
|
237 |
||
238 |
^Icon |
|
239 |
constantNamed:'Tools::Inspector2 settingsIcon3' |
|
240 |
ifAbsentPut:[(Depth8Image new) width:24; height:24; bits:(ByteArray fromPackedString:' |
|
241 |
V%)ZV%)ZV%)ZV%)ZV%)ZV%)ZV%)ZV%)ZV%)ZV%)ZV%)ZV%)ZV%)ZV%)ZV%)ZV%)ZV%(YS$9NS$9NS$:_Z4ZT&)*Z%DY+FU)ZV%)+[F1,M$TUTJL9Q1)$_%&L |
|
242 |
[QXPQ%)ZV%)+Y),)Q8JBQW]GH51\WE1\WE2F&%)ZV%)+PQI@$IA@PD@RORI\@ HB@ I_[5)ZV%)FZAXOB@ HB@ ,\WL8"2X&I"X[''%)ZV%)F[)5"!!HRD!!C<] |
|
243 |
D7JKI"X&I"XK''%)ZV%*T"T=OS4=OS3I IWAJR$)JR$)]@5)ZV%*TZ"@ HB@ HEES\D)JR$(>R$)U@5)ZV%*T"*B (JB (A=MN4)JR%!!BN4)^''%)ZV%)/]FM# |
|
244 |
X6NQY8"Q @5TCR!!LK40N%5)ZV%)/QCE? W>\#Y0I_3E<LW<GA7<G!!5)ZV%)/)H58GG"MUEQ8 PD+@S(A^$%:[5)ZV%)/!!X6MKX5TUEQTEADQDQDQDQE!![5)Z |
|
245 |
V%*WMU\7U3\7M3^CJ)VU%YVU%YT^%5)ZV%*WI5\7M3\7M4<JP4MCP4MCP4L0%5)ZV%(C&@ZS$9NSU)%[V5-[V5-[V6T<@5)ZV%(CM@ZS$9NS$4,E(*J"(*J" |
|
246 |
%)Z!!@5)ZV%(CE0ZS$9NS$9L@(*J"(*H!!HRE9@5)ZV%*OZU==FA!!_ABPLK''U5T''ZD#$"R#5)ZV%(3#8>O#8>O#8>O#8>O#8>O#8>O^5)ZV%)ZV%)ZV%)ZV%)Z |
|
247 |
V%)ZV%)ZV%)ZV%)ZV%)ZV%)ZV%)ZV%)ZV%)ZV%)ZV%)ZV%)Z') ; colorMapFromArray:#[139 210 255 54 187 255 255 255 255 72 156 255 113 188 255 149 215 255 207 233 255 52 182 255 142 201 255 47 179 255 118 210 255 85 168 255 134 197 255 23 159 255 49 176 255 145 201 255 161 208 255 78 198 255 169 209 255 99 181 255 66 190 255 191 224 255 147 202 255 109 186 255 108 187 255 81 160 255 170 209 255 95 176 255 50 184 255 112 195 255 63 199 255 65 181 255 78 185 255 151 218 255 133 191 255 172 210 255 118 189 255 69 171 255 255 253 253 89 173 255 37 163 255 180 215 255 96 204 255 56 186 255 141 200 255 32 164 255 139 200 255 43 177 255 62 207 255 42 178 255 96 192 255 55 142 255 104 182 255 73 162 255 181 221 255 255 244 244 69 162 255 193 226 255 52 189 255 33 161 255 61 211 255 156 204 255 16 137 255 116 197 255 171 212 255 161 213 255 33 158 255 127 212 255 51 158 255 188 224 255 85 163 255 183 221 255 108 190 255 57 190 255 255 250 250 116 200 255 43 169 255 60 177 255 90 167 255 96 195 255 195 223 255 77 178 255 135 196 255 70 173 255 254 248 248 60 165 255 91 187 255 209 234 255 25 154 255 135 193 255 0 0 0 145 216 255 220 240 255 73 166 255 55 170 255 110 185 255 83 180 255 78 197 255 114 193 255 59 180 255 152 202 255 143 215 255 165 217 255 45 170 255 149 203 255 113 189 255 88 175 255 88 166 255 177 215 255 137 197 255 123 194 255 79 161 255 215 237 255 131 195 255 81 167 255 103 180 255 66 165 255 138 197 255 126 196 255 190 220 255 33 167 255 87 201 255 54 190 255 46 142 255 38 176 255 107 185 255 139 197 255 50 181 255 42 164 255 52 185 255 188 219 255 73 188 255 119 194 255 63 160 255 139 196 255 79 158 255 50 171 255 101 182 255 75 167 255 218 239 255 132 195 255 213 236 255 114 190 255 69 156 255 171 218 255 57 177 255 105 187 255 255 242 242 80 162 255 102 206 255 154 218 255 76 162 255 100 177 255 131 210 255 80 159 255 173 212 255 20 163 255 120 192 255 76 159 255 90 164 255 69 185 255 67 205 255 154 221 255 197 224 255 55 155 255]; mask:((ImageMask new) width:24; height:24; bits:(ByteArray fromPackedString:'@@@@@@@@O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<@@@@@@@@') ; yourself); yourself] |
|
11161 | 248 |
! |
249 |
||
250 |
settingsIcon4 |
|
251 |
"This resource specification was automatically generated |
|
252 |
by the ImageEditor of ST/X." |
|
15761 | 253 |
|
11161 | 254 |
"Do not manually edit this!! If it is corrupted, |
255 |
the ImageEditor may not be able to read the specification." |
|
15761 | 256 |
|
11161 | 257 |
" |
258 |
self settingsIcon4 inspect |
|
259 |
ImageEditor openOnClass:self andSelector:#settingsIcon4 |
|
15761 | 260 |
Icon flushCachedIcons |
261 |
" |
|
262 |
||
263 |
<resource: #image> |
|
264 |
||
265 |
^Icon |
|
266 |
constantNamed:'Tools::Inspector2 settingsIcon4' |
|
267 |
ifAbsentPut:[(Depth8Image new) width:24; height:24; bits:(ByteArray fromPackedString:' |
|
268 |
GQ4]GQ4]GQ4]GQ4]GQ4]GQ4]GQ4]GQ4]GQ4]GQ4]GQ4]GQ4]GQ4]GQ4]GQ4]GQ4]GQ4ZHB@ HB@ HB@VE3T^C0<OG#TWF!!4]GQ4WB0,KB"<S@B$$F3PPKATX |
|
269 |
L!!PGMQ4]GQ4WHPX1F2</K2 [MCP,KB0,KB0,C14]GQ4WA08+J2,+J2,NI"\''I2\''G1<_D!!4]GQ45IQP-LC@0LC@0LB(*J"(#H2L#AA4]GQ45BP4LFQ$0LC@0 |
|
270 |
H"8.K"8HB@ HAA4]GQ4^L3L3L3L3L3L3L3L3L3L3L3L3@Q4]GQ4^L3L3L3L3L3L3L3L3L3L3L3L3@Q4]GQ4^L3L3L3L3L3L3L3L3L3L3L3L3AA4]GQ4RL3L3 |
|
271 |
L3L3L3L3L3L3L3L3L3L3@!!4]GQ4RL3L3L3L3L3L3L3L3L3L3L3L3@14]GQ4RL3L3L3L3L3L3L3L3L3L3L3L3D!!4]GQ4RL3L3L3L3L3L3L3L3L3L3L3L3D!!4] |
|
272 |
GQ4BL3L3L3L3L3L3L3L3L3L3L3L3@!!4]GQ4BL3L3L3L3L3L3L3L3L3L3L3L3@!!4]GQ4AL3L3L3L3L3L3L3L3L3L3L3L3@Q4]GQ4AL3L3L3L3L3L3L3L3L3L3 |
|
273 |
L3L3@Q4]GQ4AL3L3L3L3L3L3L3L3L3L3L3L3@Q4]GQ4EL3L3L3L3L3L3L3L3L3L3L3L3AQ4]GQ4QAPTEAPTEAPTEAPTEAPTEAPTEGA4]GQ4]GQ4]GQ4]GQ4] |
|
274 |
GQ4]GQ4]GQ4]GQ4]GQ4]GQ4]GQ4]GQ4]GQ4]GQ4]GQ4]GQ4]') ; colorMapFromArray:#[255 255 195 72 156 255 76 162 255 79 158 255 76 159 255 69 156 255 255 255 173 255 255 160 255 255 85 255 255 123 255 255 181 255 255 177 255 255 113 255 255 120 255 255 169 80 159 255 255 255 152 55 142 255 79 161 255 255 255 191 255 255 147 255 255 134 90 164 255 88 166 255 255 255 131 255 255 118 81 160 255 255 255 183 46 142 255 0 0 0 80 162 255 255 255 109 90 167 255 255 255 165 255 255 99 255 255 95 255 255 193 255 255 149 255 255 156 255 255 132 255 255 190 255 255 197 255 255 102 255 255 171 255 255 138 255 255 145 254 255 80 255 255 188 254 254 142 255 255 180 255 255 136 101 182 255 255 255 170 85 163 255]; mask:((ImageMask new) width:24; height:24; bits:(ByteArray fromPackedString:'@@@@@@@@O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<@@@@@@@@') ; yourself); yourself] |
|
11161 | 275 |
! |
276 |
||
277 |
settingsIcon5 |
|
13805 | 278 |
|
279 |
<resource: #image> |
|
280 |
||
11161 | 281 |
^ GenericToolbarIconLibrary palette16x16Icon |
282 |
||
283 |
"Created: / 19-01-2012 / 14:00:24 / cg" |
|
13805 | 284 |
"Modified: / 18-02-2012 / 16:28:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
285 |
! |
|
286 |
||
287 |
settingsIcon6 |
|
288 |
"This resource specification was automatically generated |
|
289 |
by the ImageEditor of ST/X." |
|
14790 | 290 |
|
13805 | 291 |
"Do not manually edit this!! If it is corrupted, |
292 |
the ImageEditor may not be able to read the specification." |
|
14790 | 293 |
|
13805 | 294 |
" |
295 |
self settingsIcon6 inspect |
|
296 |
ImageEditor openOnClass:self andSelector:#settingsIcon6 |
|
14790 | 297 |
Icon flushCachedIcons |
298 |
" |
|
299 |
||
300 |
<resource: #image> |
|
301 |
||
302 |
^Icon |
|
303 |
constantNamed:'Tools::Inspector2 settingsIcon6' |
|
304 |
ifAbsentPut:[(Depth8Image new) width:25; height:25; bits:(ByteArray fromPackedString:' |
|
13805 | 305 |
(:N#(:N#(:N#(:N#(:N#(:N#(:N#(:N#(:IWY&Y&Y&Y1(!!8*J"4*J#""JCX6M3X6PJJ"YG]7]7]7]:H$O#8>O#8>(#MBP$IBP$J"(FA5]WU5]WV G3(:N#(: |
306 |
N*@+PTEAPTEA(I=X[7A/\F=/''1X1LSD1LSF_H34=OC0<OI>^T6-+Z6-+Z98QI2\''I2\''''!!,5MST5MSV^''T=''Y6]''Y6^]B2D!!HRD!!HY4TLC@0LB<0''Y1VX&I" |
|
307 |
X&I"''@<XFA XFA"\FRX&I"X&I)2[&9.[&9.[&9.[&9.[&9.[&9.[&9.[&9.[&V9;^7-;^8NY_(2L#H2L&I$]KB0.KB09&Y!!8#8>O#8>O&H&!!(ZF!!(ZFXIS<? |
|
308 |
O3<?O9"V](.K"8.K"9ZF''Y6]''Y6]%"@;N3,;N3.V%WRD!!XRD!!HRU_9&Y&Y&Y&YTWL#P2L#H2%YQ- HB@ HB@%G6U%YVU%YVTD"$)JR$)JYRSZW1<_G1<_IM9 |
|
309 |
$YFQ$YFQ$00"H"H"H"JS$WI:^''):^''*Q X:N#(:N#)DPF!!(ZF!!(Z$YBP$IBP$IBP$IBP$IBP$IBP$IBP$IBP$IBNTU=_W5=_Z(9FTEAPTEA]# \JB 4JB!!VN |
|
310 |
#U-3\7M3\7NMSFU%YVU%YX4IGA0\GA0\#X)U[F1,[F1,"$%!!XVE!!XVFJA!!LSD1LSD8*IT&!!(ZF!!(ZH%GVU1YWE%Y"PPNC 8NC :I"D-#X6M#X6NHQEQTUEQT |
|
14790 | 311 |
UH BB@ HB@ H"H]HW%9^W%9^!!4MNS$9NS$:G@@TEAPTEAX^BSU)ZV%)ZV(IER$)JR$)J DC@0LC@0NB (JB (JB (JB (JB (JB (JB (JB (JB @a') ; colorMapFromArray:#[88 88 211 89 89 220 91 91 215 94 94 231 96 96 219 97 97 234 99 99 224 100 100 217 101 101 239 103 103 227 105 105 229 211 88 88 170 88 211 105 106 229 106 106 243 220 89 89 176 89 220 215 91 91 174 91 215 110 110 248 211 88 170 111 111 242 219 96 96 178 96 219 231 94 94 220 89 176 185 94 231 215 91 174 114 114 252 177 100 217 217 100 100 224 99 99 182 99 224 234 97 97 189 97 234 219 96 178 227 103 103 186 103 227 231 94 185 239 101 101 217 100 177 193 101 239 229 105 105 224 99 182 188 105 229 229 106 105 188 106 229 234 97 188 234 97 189 243 106 106 197 106 243 227 103 186 198 106 243 239 101 193 229 105 188 229 106 188 242 111 111 198 111 242 248 110 110 202 110 248 243 106 197 243 106 198 252 114 114 206 114 252 242 111 198 248 110 202 252 114 206 88 170 211 91 174 215 89 176 220 100 177 217 96 178 219 88 197 88 99 182 224 94 185 231 91 201 91 103 186 227 89 205 89 97 189 234 211 170 88 105 188 229 100 204 100 96 206 96 215 174 91 101 193 239 99 209 99 220 176 89 217 177 100 219 178 96 106 197 243 94 216 94 103 213 103 106 198 243 111 198 242 97 219 97 105 216 105 224 182 99 110 202 248 231 185 94 101 223 101 227 186 103 114 206 252 229 188 105 234 189 97 106 228 106 170 211 88 111 228 111 239 193 101 110 232 110 174 215 91 177 217 100 243 197 106 243 198 106 242 198 111 176 220 89 114 236 114 178 219 96 248 202 110 182 224 99 252 206 114 186 227 103 211 211 211 185 231 94 188 229 105 189 234 97 215 215 215 217 217 217 219 219 219 193 239 101 220 220 220 223 223 223 198 242 111 197 243 106 198 243 106 224 224 224 225 225 225 226 226 226 227 227 227 228 228 228 202 248 110 229 229 229 230 230 230 231 231 231 206 252 114 233 233 233 234 234 234 235 235 235 236 236 236 237 237 237 239 239 239 240 240 240 241 241 241 242 242 242 243 243 243 244 244 244 245 245 245 246 246 246 248 248 248 249 249 249 250 250 250 251 251 251 252 252 252 253 253 253 254 254 254]; yourself] |
11142 | 312 |
! ! |
313 |
||
8779 | 314 |
!Inspector2 class methodsFor:'interface specs'! |
315 |
||
316 |
windowSpec |
|
317 |
"This resource specification was automatically generated |
|
318 |
by the UIPainter of ST/X." |
|
319 |
||
320 |
"Do not manually edit this!! If it is corrupted, |
|
321 |
the UIPainter may not be able to read the specification." |
|
322 |
||
323 |
" |
|
10425
c49cba2bd28e
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10423
diff
changeset
|
324 |
UIPainter new openOnClass:Tools::Inspector2 andSelector:#windowSpec |
c49cba2bd28e
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10423
diff
changeset
|
325 |
Tools::Inspector2 new openInterface:#windowSpec |
c49cba2bd28e
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10423
diff
changeset
|
326 |
Tools::Inspector2 open |
8779 | 327 |
" |
328 |
||
329 |
<resource: #canvas> |
|
330 |
||
331 |
^ |
|
13805 | 332 |
#(FullSpec |
333 |
name: windowSpec |
|
334 |
window: |
|
335 |
(WindowSpec |
|
336 |
label: 'Inspector2' |
|
337 |
name: 'Inspector2' |
|
338 |
labelChannel: windowTitleAspect |
|
339 |
min: (Point 0 0) |
|
340 |
bounds: (Rectangle 0 0 490 654) |
|
341 |
menu: mainMenu |
|
342 |
) |
|
343 |
component: |
|
344 |
(SpecCollection |
|
345 |
collection: ( |
|
346 |
(MenuPanelSpec |
|
347 |
name: 'ToolBar' |
|
348 |
layout: (LayoutFrame 0 0 0 0 0 1 40 0) |
|
349 |
backgroundChannel: toolbarBackgroundHolder |
|
350 |
menu: toolbarMenu |
|
351 |
textDefault: true |
|
8779 | 352 |
) |
13805 | 353 |
(NoteBookViewSpec |
354 |
name: 'NoteBook' |
|
355 |
layout: (LayoutFrame 0 0 40 0 0 1 0 1) |
|
356 |
model: tabSelectionIndexAspect |
|
357 |
menu: tabLabelsAspect |
|
358 |
useIndex: true |
|
359 |
fitLastRow: false |
|
360 |
canvas: tabViewAspect |
|
361 |
keepCanvasAlive: true |
|
362 |
) |
|
363 |
(ComboListSpec |
|
364 |
name: 'EvaluationLanguageCombo' |
|
365 |
layout: (LayoutFrame -200 1 7 0.0 -40 1 32 0) |
|
366 |
activeHelpKey: evaluationLanguage |
|
367 |
visibilityChannel: evaluationLanguageComboVisibleHolder |
|
368 |
model: evaluationLanguageHolder |
|
369 |
comboList: evaluationLanguageList |
|
370 |
useIndex: false |
|
371 |
postBuildCallback: postBuildEvaluationLanguageCombo: |
|
372 |
) |
|
373 |
) |
|
374 |
||
375 |
) |
|
376 |
) |
|
8779 | 377 |
! ! |
378 |
||
379 |
!Inspector2 class methodsFor:'menu specs'! |
|
380 |
||
15716 | 381 |
fileMenu |
382 |
"This resource specification was automatically generated |
|
383 |
by the MenuEditor of ST/X." |
|
384 |
||
385 |
"Do not manually edit this!! If it is corrupted, |
|
386 |
the MenuEditor may not be able to read the specification." |
|
387 |
||
388 |
||
389 |
" |
|
390 |
MenuEditor new openOnClass:Tools::Inspector2 andSelector:#mainMenu |
|
391 |
(Menu new fromLiteralArrayEncoding:(Tools::Inspector2 mainMenu)) startUp |
|
392 |
" |
|
393 |
||
394 |
<resource: #menu> |
|
395 |
||
396 |
^ |
|
397 |
#(Menu |
|
398 |
( |
|
399 |
(MenuItem |
|
400 |
label: 'Exit' |
|
401 |
itemValue: closeRequest |
|
402 |
) |
|
403 |
) |
|
404 |
nil |
|
405 |
nil |
|
406 |
) |
|
407 |
! |
|
408 |
||
409 |
helpMenu |
|
410 |
"This resource specification was automatically generated |
|
411 |
by the MenuEditor of ST/X." |
|
412 |
||
413 |
"Do not manually edit this!! If it is corrupted, |
|
414 |
the MenuEditor may not be able to read the specification." |
|
415 |
||
416 |
||
417 |
" |
|
418 |
MenuEditor new openOnClass:Tools::Inspector2 andSelector:#mainMenu |
|
419 |
(Menu new fromLiteralArrayEncoding:(Tools::Inspector2 mainMenu)) startUp |
|
420 |
" |
|
421 |
||
422 |
<resource: #menu> |
|
423 |
||
424 |
^ |
|
425 |
#(Menu |
|
426 |
( |
|
427 |
(MenuItem |
|
428 |
label: 'Inspector Documentation' |
|
429 |
itemValue: openDocumentation |
|
430 |
) |
|
431 |
(MenuItem |
|
432 |
label: '-' |
|
433 |
) |
|
434 |
(MenuItem |
|
435 |
label: 'About this Application...' |
|
436 |
itemValue: openAboutThisApplication |
|
437 |
) |
|
438 |
) |
|
439 |
nil |
|
440 |
nil |
|
441 |
) |
|
442 |
! |
|
443 |
||
11229 | 444 |
mainMenu |
445 |
"This resource specification was automatically generated |
|
446 |
by the MenuEditor of ST/X." |
|
447 |
||
448 |
"Do not manually edit this!! If it is corrupted, |
|
449 |
the MenuEditor may not be able to read the specification." |
|
450 |
||
451 |
||
452 |
" |
|
453 |
MenuEditor new openOnClass:Tools::Inspector2 andSelector:#mainMenu |
|
454 |
(Menu new fromLiteralArrayEncoding:(Tools::Inspector2 mainMenu)) startUp |
|
455 |
" |
|
456 |
||
457 |
<resource: #menu> |
|
458 |
||
459 |
^ |
|
460 |
#(Menu |
|
461 |
( |
|
462 |
(MenuItem |
|
463 |
label: 'File' |
|
17170 | 464 |
submenuChannel: fileMenu |
11229 | 465 |
) |
466 |
(MenuItem |
|
467 |
label: 'View' |
|
15716 | 468 |
submenuChannel: viewMenu |
11229 | 469 |
) |
12836 | 470 |
(MenuItem |
16815 | 471 |
label: 'Operations' |
16818 | 472 |
isVisible: operationsMenuEnabledHolder |
16815 | 473 |
submenuChannel: operationsMenu |
474 |
) |
|
475 |
(MenuItem |
|
15402 | 476 |
label: 'MENU_Help' |
12836 | 477 |
startGroup: conditionalRight |
15716 | 478 |
submenuChannel: helpMenu |
12836 | 479 |
) |
11229 | 480 |
) |
481 |
nil |
|
482 |
nil |
|
483 |
) |
|
484 |
! |
|
485 |
||
11142 | 486 |
settingsMenu |
487 |
"This resource specification was automatically generated |
|
488 |
by the MenuEditor of ST/X." |
|
489 |
||
490 |
"Do not manually edit this!! If it is corrupted, |
|
491 |
the MenuEditor may not be able to read the specification." |
|
492 |
||
493 |
||
494 |
" |
|
495 |
MenuEditor new openOnClass:Tools::Inspector2 andSelector:#settingsMenu |
|
496 |
(Menu new fromLiteralArrayEncoding:(Tools::Inspector2 settingsMenu)) startUp |
|
497 |
" |
|
498 |
||
499 |
<resource: #menu> |
|
500 |
||
501 |
^ |
|
502 |
#(Menu |
|
503 |
( |
|
504 |
(MenuItem |
|
505 |
label: 'Default' |
|
12836 | 506 |
nameKey: Default |
507 |
hideMenuOnActivated: false |
|
11142 | 508 |
choice: colorProfileHolder |
509 |
choiceValue: default |
|
510 |
) |
|
511 |
(MenuItem |
|
12836 | 512 |
label: '-' |
513 |
) |
|
514 |
(MenuItem |
|
11142 | 515 |
label: 'Red' |
12836 | 516 |
nameKey: Red |
517 |
hideMenuOnActivated: false |
|
11142 | 518 |
choice: colorProfileHolder |
519 |
choiceValue: red |
|
520 |
) |
|
521 |
(MenuItem |
|
522 |
label: 'Green' |
|
12836 | 523 |
nameKey: Green |
524 |
hideMenuOnActivated: false |
|
525 |
choice: colorProfileHolder |
|
11142 | 526 |
choiceValue: green |
527 |
) |
|
528 |
(MenuItem |
|
529 |
label: 'Blue' |
|
12836 | 530 |
nameKey: Blue |
531 |
hideMenuOnActivated: false |
|
532 |
choice: colorProfileHolder |
|
11142 | 533 |
choiceValue: blue |
534 |
) |
|
535 |
(MenuItem |
|
536 |
label: 'Yellow' |
|
12836 | 537 |
nameKey: Yellow |
538 |
hideMenuOnActivated: false |
|
539 |
choice: colorProfileHolder |
|
11142 | 540 |
choiceValue: yellow |
541 |
) |
|
542 |
(MenuItem |
|
543 |
label: 'Gray' |
|
12836 | 544 |
nameKey: Gray |
545 |
hideMenuOnActivated: false |
|
546 |
choice: colorProfileHolder |
|
11142 | 547 |
choiceValue: gray |
548 |
) |
|
549 |
) |
|
550 |
nil |
|
551 |
nil |
|
552 |
) |
|
553 |
! |
|
554 |
||
8779 | 555 |
toolbarMenu |
556 |
"This resource specification was automatically generated |
|
557 |
by the MenuEditor of ST/X." |
|
558 |
||
559 |
"Do not manually edit this!! If it is corrupted, |
|
560 |
the MenuEditor may not be able to read the specification." |
|
561 |
||
11142 | 562 |
|
8779 | 563 |
" |
10379 | 564 |
MenuEditor new openOnClass:Tools::Inspector2 andSelector:#toolbarMenu |
565 |
(Menu new fromLiteralArrayEncoding:(Tools::Inspector2 toolbarMenu)) startUp |
|
8779 | 566 |
" |
567 |
||
568 |
<resource: #menu> |
|
569 |
||
570 |
^ |
|
571 |
#(Menu |
|
572 |
( |
|
573 |
(MenuItem |
|
10597 | 574 |
activeHelpKey: backwardInVisitingHistory |
8779 | 575 |
enabled: backButtonEnabledHolder |
576 |
label: 'Back' |
|
577 |
itemValue: backButtonAction |
|
578 |
translateLabel: true |
|
10460 | 579 |
isButton: true |
10596 | 580 |
hideMenuOnActivated: false |
8779 | 581 |
submenuChannel: backButtonMenuChannel |
10596 | 582 |
labelImage: (ResourceRetriever ToolbarIconLibrary historyBackIcon) |
8779 | 583 |
) |
584 |
(MenuItem |
|
10597 | 585 |
activeHelpKey: forwardInVisitingHistory |
8779 | 586 |
enabled: forwardButtonEnabledHolder |
587 |
label: 'Forward' |
|
588 |
itemValue: forwardButtonAction |
|
589 |
translateLabel: true |
|
10460 | 590 |
isButton: true |
10596 | 591 |
hideMenuOnActivated: false |
8779 | 592 |
submenuChannel: forwardButtonMenuChannel |
10596 | 593 |
labelImage: (ResourceRetriever ToolbarIconLibrary historyForwardIcon) |
8779 | 594 |
) |
10379 | 595 |
(MenuItem |
596 |
label: '-' |
|
597 |
) |
|
598 |
(MenuItem |
|
10597 | 599 |
activeHelpKey: browseClassOfShownObject |
600 |
enabled: browseButtonEnabledHolder |
|
10379 | 601 |
label: 'Browse' |
602 |
itemValue: browseClassAction |
|
603 |
translateLabel: true |
|
604 |
isButton: true |
|
10596 | 605 |
hideMenuOnActivated: false |
606 |
labelImage: (ResourceRetriever ToolbarIconLibrary startNewSystemBrowserIcon) |
|
10379 | 607 |
) |
10597 | 608 |
(MenuItem |
609 |
activeHelpKey: browseFile |
|
610 |
label: 'Browse File' |
|
611 |
itemValue: browseFileAction |
|
612 |
translateLabel: true |
|
613 |
isButton: true |
|
614 |
isVisible: currentObjectIsFilename |
|
615 |
hideMenuOnActivated: false |
|
616 |
labelImage: (ResourceRetriever ToolbarIconLibrary startNewFileBrowserIcon) |
|
617 |
) |
|
10636 | 618 |
(MenuItem |
11134 | 619 |
activeHelpKey: editImage |
620 |
label: 'Edit the Image' |
|
621 |
itemValue: editImageAction |
|
622 |
translateLabel: true |
|
623 |
isButton: true |
|
624 |
isVisible: currentObjectIsImage |
|
625 |
hideMenuOnActivated: false |
|
626 |
labelImage: (ResourceRetriever ToolbarIconLibrary startImageEditorIcon) |
|
627 |
) |
|
628 |
(MenuItem |
|
11160 | 629 |
activeHelpKey: refresh |
10636 | 630 |
label: 'Refresh for Changed Object' |
631 |
itemValue: refreshTabs |
|
632 |
translateLabel: true |
|
633 |
isButton: true |
|
634 |
startGroup: right |
|
635 |
labelImage: (ResourceRetriever ToolbarIconLibrary reloadIcon) |
|
636 |
) |
|
11142 | 637 |
(MenuItem |
11160 | 638 |
activeHelpKey: colorProfile |
11142 | 639 |
label: 'Settings' |
640 |
translateLabel: true |
|
641 |
isButton: true |
|
11265 | 642 |
isVisible: false |
11142 | 643 |
submenuChannel: settingsMenu |
644 |
labelImage: (ResourceRetriever #'Tools::Inspector2' settingsIcon) |
|
645 |
) |
|
8779 | 646 |
) |
647 |
nil |
|
648 |
nil |
|
649 |
) |
|
15716 | 650 |
! |
651 |
||
652 |
viewMenu |
|
653 |
"This resource specification was automatically generated |
|
654 |
by the MenuEditor of ST/X." |
|
655 |
||
656 |
"Do not manually edit this!! If it is corrupted, |
|
657 |
the MenuEditor may not be able to read the specification." |
|
658 |
||
659 |
||
660 |
" |
|
661 |
MenuEditor new openOnClass:Tools::Inspector2 andSelector:#viewMenu |
|
662 |
(Menu new fromLiteralArrayEncoding:(Tools::Inspector2 viewMenu)) startUp |
|
663 |
" |
|
664 |
||
665 |
<resource: #menu> |
|
666 |
||
667 |
^ |
|
668 |
#(Menu |
|
669 |
( |
|
670 |
(MenuItem |
|
17590 | 671 |
label: 'Suppress Pseudo Slots (Extra Attribtues)' |
672 |
itemValue: suppressPseudoSlotsHolderChanged |
|
673 |
indication: suppressPseudoSlotsHolder |
|
674 |
) |
|
675 |
(MenuItem |
|
676 |
label: '-' |
|
677 |
) |
|
678 |
(MenuItem |
|
15716 | 679 |
label: 'Expand Arrays in "all xxx"-Lists' |
680 |
itemValue: expandArraysInAllList: |
|
681 |
indication: expandArraysInAllList |
|
682 |
) |
|
683 |
(MenuItem |
|
684 |
label: 'Alphabetical' |
|
685 |
itemValue: showAlphabeticalHolderChanged |
|
686 |
indication: showAlphabeticalHolder |
|
687 |
) |
|
688 |
(MenuItem |
|
689 |
label: '-' |
|
690 |
) |
|
691 |
(MenuItem |
|
692 |
label: 'Color Setting' |
|
693 |
submenuChannel: settingsMenu |
|
694 |
) |
|
695 |
) |
|
696 |
nil |
|
697 |
nil |
|
698 |
) |
|
17590 | 699 |
|
700 |
"Modified: / 18-07-2017 / 15:21:11 / cg" |
|
8779 | 701 |
! ! |
702 |
||
703 |
!Inspector2 class methodsFor:'startup'! |
|
704 |
||
705 |
openOn: anObject |
|
706 |
||
12515 | 707 |
^ self new openOn: anObject. |
8779 | 708 |
|
709 |
"Modified: / 17-02-2008 / 10:29:45 / janfrog" |
|
10311 | 710 |
"Modified (format): / 11-07-2011 / 22:28:03 / cg" |
13132 | 711 |
! |
712 |
||
713 |
openOn: anObject title:aString |
|
714 |
||
715 |
^ self new |
|
716 |
openOn: anObject; |
|
717 |
windowTitle:aString |
|
718 |
||
719 |
" |
|
720 |
self openOn:(Array new:3) |
|
721 |
self openOn:(Array new:3) title:'my array' |
|
722 |
" |
|
8779 | 723 |
! ! |
724 |
||
725 |
!Inspector2 class methodsFor:'testing'! |
|
726 |
||
727 |
testSimpleShow |
|
728 |
|ins| |
|
729 |
||
730 |
ins := Inspector2 openOn:4. |
|
731 |
ins inspect:10. |
|
732 |
ins inspect:42. |
|
733 |
ins inspect:'dead one'. |
|
734 |
ins inspect:'rolled back'. |
|
735 |
||
736 |
"/ins inspectItem: (ins history at: 3). "/ Rollback history, zustanou jen prvni 3 |
|
737 |
||
738 |
ins inspect:'xFuj'. |
|
739 |
||
740 |
"Modified: / 11-01-2008 / 20:36:37 / janfrog" |
|
741 |
! ! |
|
742 |
||
743 |
!Inspector2 methodsFor:'accessing'! |
|
744 |
||
10597 | 745 |
backButtonEnabled:value |
746 |
^ self backButtonEnabledHolder value:value |
|
8779 | 747 |
|
748 |
"Created: / 12-01-2008 / 19:14:35 / janfrog" |
|
10597 | 749 |
"Modified (format): / 19-08-2011 / 08:59:41 / cg" |
8779 | 750 |
! |
751 |
||
752 |
currentObject |
|
753 |
^ self navigationState theObject |
|
754 |
||
755 |
"Created: / 13-01-2008 / 10:14:47 / janfrog" |
|
756 |
"Modified: / 17-02-2008 / 09:49:01 / janfrog" |
|
757 |
! |
|
758 |
||
759 |
currentState |
|
760 |
^ self navigationHistoryHolder currentItem |
|
761 |
||
762 |
"Created: / 21-02-2008 / 19:39:45 / janfrog" |
|
763 |
"Modified: / 27-02-2008 / 11:56:55 / janfrog" |
|
764 |
! |
|
765 |
||
10597 | 766 |
forwardButtonEnabled:value |
767 |
^ self forwardButtonEnabledHolder value:value |
|
8779 | 768 |
|
769 |
"Created: / 12-01-2008 / 19:14:48 / janfrog" |
|
10597 | 770 |
"Modified (format): / 19-08-2011 / 08:59:45 / cg" |
8779 | 771 |
! |
772 |
||
773 |
navigationState |
|
10379 | 774 |
^ self navigationHistoryHolder value currentItem |
8779 | 775 |
|
776 |
"Created: / 17-02-2008 / 09:49:01 / janfrog" |
|
777 |
"Modified: / 21-02-2008 / 19:34:14 / janfrog" |
|
10379 | 778 |
"Modified: / 22-07-2011 / 19:13:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8779 | 779 |
! |
780 |
||
781 |
navigationState:historyItem |
|
10379 | 782 |
self navigationHistoryHolder "subjectChannel:" value currentItem:historyItem. |
8779 | 783 |
|
784 |
"/self fixNavigation. "Nevola se kvuli problemu s prekreslovanim" |
|
785 |
"/self updateTabs. |
|
786 |
||
787 |
"Created: / 17-02-2008 / 09:49:11 / janfrog" |
|
788 |
"Modified: / 21-02-2008 / 19:47:26 / janfrog" |
|
10379 | 789 |
"Modified: / 22-07-2011 / 19:13:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10597 | 790 |
"Modified: / 19-08-2011 / 09:16:38 / cg" |
8779 | 791 |
! ! |
792 |
||
793 |
!Inspector2 methodsFor:'aspects'! |
|
794 |
||
795 |
backButtonEnabledHolder |
|
796 |
"return/create the 'backButtonEnabledHolder' value holder (automatically generated)" |
|
797 |
||
798 |
^(AspectAdaptor forAspect:#canGoBack) |
|
799 |
subjectChannel: self navigationHistoryHolder |
|
800 |
||
801 |
"Created: / 12-01-2008 / 19:13:49 / janfrog" |
|
802 |
"Modified: / 27-02-2008 / 12:11:30 / janfrog" |
|
803 |
! |
|
804 |
||
10597 | 805 |
browseButtonEnabledHolder |
806 |
^ BlockValue |
|
807 |
with:[:m | m notNil] |
|
808 |
argument:self navigationStateAspect |
|
809 |
||
810 |
"Created: / 19-08-2011 / 09:22:47 / cg" |
|
811 |
! |
|
812 |
||
11142 | 813 |
colorProfileHolder |
814 |
"return/create the 'colorProfileHolder' value holder (automatically generated)" |
|
815 |
||
816 |
colorProfileHolder isNil ifTrue:[ |
|
817 |
colorProfileHolder := ValueHolder with: #default. |
|
818 |
]. |
|
819 |
^ colorProfileHolder |
|
820 |
||
821 |
"Modified: / 17-01-2012 / 12:54:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
822 |
! |
|
823 |
||
10597 | 824 |
currentObjectHolder |
825 |
currentObjectHolder isNil ifTrue:[ |
|
13805 | 826 |
currentObjectHolder := ValueHolder new. |
827 |
currentObjectHolder addDependent: self. |
|
10597 | 828 |
]. |
829 |
^ currentObjectHolder |
|
830 |
||
831 |
"Created: / 27-02-2008 / 12:05:22 / janfrog" |
|
832 |
"Created: / 19-08-2011 / 08:58:48 / cg" |
|
13805 | 833 |
"Modified: / 26-10-2013 / 00:34:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10597 | 834 |
! |
835 |
||
836 |
currentObjectIsFilename |
|
837 |
^ BlockValue |
|
17125 | 838 |
with:[:o | o isProtoObject not and:[o isFilename] ] |
10597 | 839 |
argument:self currentObjectHolder |
840 |
||
841 |
"Created: / 19-08-2011 / 08:56:27 / cg" |
|
842 |
! |
|
843 |
||
11134 | 844 |
currentObjectIsImage |
845 |
^ BlockValue |
|
17125 | 846 |
with:[:o | o isProtoObject not and:[o isImage] ] |
11134 | 847 |
argument:self currentObjectHolder |
848 |
||
849 |
"Created: / 15-01-2012 / 10:06:28 / cg" |
|
850 |
! |
|
851 |
||
13805 | 852 |
evaluationLanguageComboVisibleHolder |
853 |
<resource: #uiAspect> |
|
854 |
||
855 |
"/ Do not show language combo when language is Smalltalk. |
|
856 |
"/ For those not working with multiple languages is too disturbing. |
|
857 |
^ BlockValue |
|
16899 | 858 |
with:[:o | o class programmingLanguage notNil and:[o class programmingLanguage isSmalltalk not] ] |
13805 | 859 |
argument:self currentObjectHolder |
860 |
||
861 |
"Modified (comment): / 25-10-2013 / 19:39:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
862 |
! |
|
863 |
||
864 |
evaluationLanguageHolder |
|
865 |
<resource: #uiAspect> |
|
866 |
||
867 |
evaluationLanguageHolder isNil ifTrue:[ |
|
868 |
evaluationLanguageHolder := ValueHolder new. |
|
869 |
evaluationLanguageHolder addDependent:self. |
|
870 |
]. |
|
871 |
^ evaluationLanguageHolder. |
|
872 |
||
873 |
"Modified: / 26-10-2013 / 00:43:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
874 |
! |
|
875 |
||
876 |
evaluationLanguageList |
|
877 |
<resource: #uiAspect> |
|
878 |
||
879 |
evaluationLanguageList isNil ifTrue:[ |
|
880 |
evaluationLanguageList := ValueHolder new. |
|
881 |
]. |
|
882 |
^ evaluationLanguageList. |
|
883 |
! |
|
884 |
||
11229 | 885 |
expandArraysInAllList |
886 |
^ InspectorView expandArraysInAllLists |
|
887 |
||
888 |
"Created: / 30-01-2012 / 16:52:46 / cg" |
|
889 |
! |
|
890 |
||
891 |
expandArraysInAllList:aBoolean |
|
892 |
InspectorView expandArraysInAllLists:aBoolean |
|
893 |
||
894 |
"Created: / 30-01-2012 / 16:53:15 / cg" |
|
895 |
! |
|
896 |
||
8779 | 897 |
forwardButtonEnabledHolder |
898 |
"return/create the 'backButtonEnabledHolder' value holder (automatically generated)" |
|
899 |
||
900 |
^(AspectAdaptor forAspect:#canGoForward) |
|
901 |
subjectChannel: self navigationHistoryHolder |
|
902 |
||
903 |
"Created: / 12-01-2008 / 19:13:49 / janfrog" |
|
904 |
"Modified: / 27-02-2008 / 12:11:26 / janfrog" |
|
905 |
! |
|
906 |
||
907 |
navigationHistoryHolder |
|
908 |
"return/create the 'currentItemHolder' value holder (automatically generated)" |
|
909 |
||
910 |
navigationHistoryHolder isNil ifTrue:[ |
|
911 |
navigationHistoryHolder := Tools::NavigationHistory new. |
|
912 |
]. |
|
913 |
^ navigationHistoryHolder |
|
914 |
||
915 |
"Created: / 21-02-2008 / 19:34:14 / janfrog" |
|
916 |
! |
|
917 |
||
918 |
navigationStateAspect |
|
10597 | 919 |
navigationStateAspect isNil ifTrue:[ |
920 |
navigationStateAspect := (AspectAdaptor forAspect:#currentItem) |
|
921 |
subjectChannel:self navigationHistoryHolder |
|
922 |
]. |
|
923 |
^ navigationStateAspect |
|
8779 | 924 |
|
925 |
"Created: / 27-02-2008 / 12:05:22 / janfrog" |
|
10597 | 926 |
"Modified (format): / 19-08-2011 / 08:59:10 / cg" |
8779 | 927 |
! |
928 |
||
16815 | 929 |
operationsMenuEnabledHolder |
930 |
operationsMenuEnabledHolder isNil ifTrue:[ |
|
931 |
operationsMenuEnabledHolder := false asValue. |
|
932 |
]. |
|
933 |
^ operationsMenuEnabledHolder |
|
934 |
! |
|
935 |
||
15716 | 936 |
showAlphabeticalHolder |
937 |
^ builder booleanValueAspectFor:#showAlphabeticalHolder |
|
938 |
! |
|
939 |
||
16549 | 940 |
sortOrderHolder |
941 |
^ builder |
|
942 |
valueAspectFor:#sortOrderHolder |
|
943 |
initialValue:(InspectorView defaultSortOrder) |
|
944 |
! |
|
945 |
||
17590 | 946 |
suppressPseudoSlotsHolder |
947 |
^ builder booleanValueAspectFor:#suppressPseudoSlotsHolder |
|
948 |
||
949 |
"Created: / 18-07-2017 / 15:21:36 / cg" |
|
950 |
! |
|
951 |
||
8779 | 952 |
tabLabelsAspect |
953 |
^ (AspectAdaptor forAspect:#tabLabels) |
|
10597 | 954 |
subjectChannel:self navigationStateAspect |
8779 | 955 |
|
956 |
"Created: / 16-01-2008 / 17:29:52 / janfrog" |
|
957 |
"Modified: / 27-02-2008 / 12:05:32 / janfrog" |
|
10597 | 958 |
"Modified (format): / 19-08-2011 / 08:59:21 / cg" |
8779 | 959 |
! |
960 |
||
961 |
tabSelectionIndexAspect |
|
962 |
^ ((AspectAdaptor forAspect:#selectionIndex) |
|
963 |
subjectChannel:self navigationStateAspect) |
|
964 |
onChangeEvaluate:[ self tabViewAspect changed ]; |
|
965 |
yourself |
|
966 |
||
967 |
"Created: / 16-01-2008 / 17:29:29 / janfrog" |
|
968 |
"Modified: / 27-02-2008 / 12:06:05 / janfrog" |
|
969 |
! |
|
970 |
||
971 |
tabViewAspect |
|
10597 | 972 |
tabViewAspect isNil ifTrue:[ |
973 |
tabViewAspect := (AspectAdaptor forAspect:#selectionView) |
|
974 |
subjectChannel:self navigationStateAspect |
|
975 |
]. |
|
8779 | 976 |
^ tabViewAspect |
977 |
||
978 |
"Created: / 16-01-2008 / 17:30:05 / janfrog" |
|
979 |
"Modified: / 27-02-2008 / 12:05:46 / janfrog" |
|
10597 | 980 |
"Modified (format): / 19-08-2011 / 08:59:35 / cg" |
8779 | 981 |
! |
982 |
||
11142 | 983 |
toolbarBackgroundHolder |
984 |
"return/create the 'toolbarBackgroundHolder' value holder (automatically generated)" |
|
985 |
||
986 |
toolbarBackgroundHolder isNil ifTrue:[ |
|
987 |
toolbarBackgroundHolder := BlockValue |
|
988 |
with: [:profile| |
|
989 |
| clr | |
|
990 |
||
991 |
clr := ColorProfiles at: profile value. |
|
992 |
clr isNil ifTrue:[ |
|
993 |
clr := MenuPanel defaultBackgroundColor |
|
994 |
]. |
|
995 |
clr. |
|
996 |
] argument: self colorProfileHolder |
|
997 |
]. |
|
998 |
^ toolbarBackgroundHolder |
|
999 |
||
1000 |
"Modified: / 17-01-2012 / 13:04:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1001 |
! |
|
1002 |
||
8779 | 1003 |
windowTitleAspect |
1004 |
^ (AspectAdaptor forAspect:#displayString) |
|
1005 |
subjectChannel:self navigationStateAspect |
|
1006 |
||
1007 |
"Created: / 17-02-2008 / 08:42:21 / janfrog" |
|
1008 |
"Modified: / 27-02-2008 / 12:05:56 / janfrog" |
|
1009 |
! ! |
|
1010 |
||
13805 | 1011 |
!Inspector2 methodsFor:'change & update'! |
1012 |
||
1013 |
update:something with:aParameter from:changedObject |
|
1014 |
"Invoked when an object that I depend upon sends a change notification." |
|
1015 |
||
1016 |
"stub code automatically generated - please change as required" |
|
1017 |
||
1018 |
changedObject == currentObjectHolder ifTrue:[ |
|
1019 |
self updateEvaluationLanguageList. |
|
16815 | 1020 |
self updateOperationsMenu. |
13805 | 1021 |
^ self. |
1022 |
]. |
|
1023 |
changedObject == evaluationLanguageHolder ifTrue:[ |
|
1024 |
self updateEvaluationLanguage. |
|
1025 |
^ self. |
|
1026 |
]. |
|
1027 |
super update:something with:aParameter from:changedObject |
|
1028 |
||
1029 |
"Modified: / 26-10-2013 / 00:44:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1030 |
! |
|
1031 |
||
1032 |
updateEvaluationLanguage |
|
13966
6ab4e7ae274a
Fix for evaluation language.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13945
diff
changeset
|
1033 |
| evaluationLanguage objectsLanguage lastLanguage | |
13805 | 1034 |
|
1035 |
evaluationLanguage := self evaluationLanguageHolder value. |
|
1036 |
"/ Remember user's selection for future... |
|
13966
6ab4e7ae274a
Fix for evaluation language.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13945
diff
changeset
|
1037 |
objectsLanguage := self currentObject class programmingLanguage. |
6ab4e7ae274a
Fix for evaluation language.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13945
diff
changeset
|
1038 |
lastLanguage := EvaluationLanguageMap at: objectsLanguage ifAbsent: [ objectsLanguage ]. |
6ab4e7ae274a
Fix for evaluation language.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13945
diff
changeset
|
1039 |
lastLanguage ~~ evaluationLanguage ifTrue:[ |
6ab4e7ae274a
Fix for evaluation language.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13945
diff
changeset
|
1040 |
EvaluationLanguageMap at: objectsLanguage put: evaluationLanguage |
6ab4e7ae274a
Fix for evaluation language.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13945
diff
changeset
|
1041 |
]. |
13805 | 1042 |
"/ Update compiler class in all inspectors... |
1043 |
self setDoItActionForLanguage: evaluationLanguage. |
|
1044 |
||
1045 |
"Created: / 26-10-2013 / 00:36:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13966
6ab4e7ae274a
Fix for evaluation language.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13945
diff
changeset
|
1046 |
"Modified: / 18-02-2014 / 23:03:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13805 | 1047 |
! |
1048 |
||
1049 |
updateEvaluationLanguageList |
|
1050 |
| currentObject currentObjectLanguage | |
|
1051 |
||
1052 |
currentObject := self currentObject. |
|
16899 | 1053 |
currentObjectLanguage := currentObject class programmingLanguage ? SmalltalkLanguage instance. |
1054 |
currentObjectLanguage isSmalltalk ifTrue:[ |
|
1055 |
self evaluationLanguageList value: (Array with: currentObjectLanguage). |
|
1056 |
] ifFalse:[ |
|
13805 | 1057 |
self evaluationLanguageList value: (Array with: currentObjectLanguage with: SmalltalkLanguage instance) |
1058 |
]. |
|
1059 |
||
1060 |
self evaluationLanguageHolder value:(EvaluationLanguageMap at: currentObjectLanguage ifAbsent:[currentObjectLanguage]) |
|
1061 |
||
1062 |
"Created: / 26-10-2013 / 00:40:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
16815 | 1063 |
! |
1064 |
||
1065 |
updateOperationsMenu |
|
1066 |
|items| |
|
17125 | 1067 |
|
1068 |
currentObjectHolder value isProtoObject ifFalse:[ |
|
1069 |
items := currentObjectHolder value inspectorExtraMenuOperations. |
|
1070 |
]. |
|
16815 | 1071 |
self operationsMenuEnabledHolder value:(items notEmptyOrNil). |
13805 | 1072 |
! ! |
1073 |
||
12734 | 1074 |
!Inspector2 methodsFor:'configuration'! |
1075 |
||
1076 |
hideHashes:aBoolean |
|
1077 |
"compatibiliy with InspectorView - must be implemented" |
|
1078 |
||
1079 |
#todo |
|
1080 |
! |
|
1081 |
||
1082 |
hideMessages:aBoolean |
|
1083 |
"compatibiliy with InspectorView - must be implemented" |
|
1084 |
||
1085 |
#todo |
|
12736 | 1086 |
! |
1087 |
||
12891 | 1088 |
maxItemsInHistory:aNumber |
1089 |
self navigationHistoryHolder value maxItemsInHistory:aNumber |
|
1090 |
! |
|
1091 |
||
12736 | 1092 |
suppressPseudoSlots:aBoolean |
1093 |
"compatibiliy with InspectorView - must be implemented" |
|
1094 |
||
1095 |
#todo |
|
12734 | 1096 |
! ! |
1097 |
||
10379 | 1098 |
!Inspector2 methodsFor:'menu'! |
1099 |
||
1100 |
backButtonMenuChannel |
|
1101 |
^ [ self navigationHistoryHolder goBackMenu ] |
|
1102 |
||
1103 |
"Created: / 12-01-2008 / 18:57:08 / janfrog" |
|
1104 |
"Modified: / 22-02-2008 / 16:57:46 / janfrog" |
|
1105 |
! |
|
1106 |
||
1107 |
forwardButtonMenuChannel |
|
1108 |
^ [ self navigationHistoryHolder goForwardMenu ] |
|
1109 |
||
1110 |
"Created: / 12-01-2008 / 18:57:30 / janfrog" |
|
1111 |
"Modified: / 22-02-2008 / 16:58:11 / janfrog" |
|
12836 | 1112 |
! |
1113 |
||
16815 | 1114 |
operationsMenu |
17099 | 1115 |
"return an inspected-object-specific operations menu" |
1116 |
||
16815 | 1117 |
|items menu| |
1118 |
||
1119 |
items := currentObjectHolder value inspectorExtraMenuOperations. |
|
1120 |
items isEmptyOrNil ifTrue:[^ nil]. |
|
1121 |
||
1122 |
menu := Menu new. |
|
1123 |
items do:[:eachPair | |
|
17099 | 1124 |
|xLatedLabel| |
1125 |
||
1126 |
"/ mhm - should the translation come from the inspected object's resources? |
|
1127 |
xLatedLabel := resources string:eachPair first. |
|
16815 | 1128 |
menu addItem:(MenuItem |
17099 | 1129 |
label:xLatedLabel |
16815 | 1130 |
itemValue:eachPair second). |
1131 |
]. |
|
1132 |
^ menu |
|
1133 |
! |
|
1134 |
||
12836 | 1135 |
settingsMenu |
1136 |
|m| |
|
1137 |
||
1138 |
m := self class settingsMenu decodeAsLiteralArray. |
|
1139 |
m itemsDo:[:eachItem | |
|
1140 |
|lbl labelWithColor clr| |
|
1141 |
||
1142 |
lbl := resources string:eachItem label. |
|
1143 |
(eachItem choiceValue ? #default) ~~ #default ifTrue:[ |
|
1144 |
clr := Color perform:eachItem choiceValue. |
|
1145 |
labelWithColor := lbl asText backgroundColorizeAllWith:clr. |
|
1146 |
clr brightness < 0.5 ifTrue:[ |
|
16505 | 1147 |
labelWithColor := labelWithColor withColor:Color white. |
12836 | 1148 |
]. |
1149 |
eachItem label:labelWithColor. |
|
1150 |
]. |
|
1151 |
]. |
|
1152 |
^ m |
|
10379 | 1153 |
! ! |
1154 |
||
1155 |
!Inspector2 methodsFor:'menu actions'! |
|
8779 | 1156 |
|
1157 |
backButtonAction |
|
10320 | 1158 |
self navigationHistoryHolder goBack. |
1159 |
self updateWindowLabel |
|
8779 | 1160 |
|
1161 |
"Modified: / 21-02-2008 / 19:40:23 / janfrog" |
|
10320 | 1162 |
"Modified: / 15-07-2011 / 16:26:28 / cg" |
8779 | 1163 |
! |
1164 |
||
10379 | 1165 |
browseClassAction |
10636 | 1166 |
"open a class browser, or try to add a tab to the previously opened class browser" |
10597 | 1167 |
|
10460 | 1168 |
| class | |
10379 | 1169 |
|
1170 |
class := self currentObject class. |
|
8779 | 1171 |
|
13225 | 1172 |
"/ browser notNil ifTrue:[ |
1173 |
"/ "/ try to add a tab to the already opened browser |
|
1174 |
"/ (browser isKindOf:Tools::NewSystemBrowser) ifTrue:[ |
|
1175 |
"/ browser spawnClassBrowserFor:(Array with:class) in:#newBuffer. |
|
1176 |
"/ "/ browser spawnSingleClassBrowserFor:class in:#newBuffer. |
|
1177 |
"/ browser window raise. |
|
1178 |
"/ ^ self. |
|
1179 |
"/ ]. |
|
1180 |
"/ ]. |
|
15716 | 1181 |
|
10597 | 1182 |
"/ if that fails, open a new one |
17658 | 1183 |
SystemBrowser default openInClass:class selector:nil "/ browseSingleClass: class |
10379 | 1184 |
|
1185 |
"Modified: / 23-07-2011 / 11:28:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
17658 | 1186 |
"Modified: / 01-09-2017 / 14:22:33 / cg" |
10597 | 1187 |
! |
1188 |
||
1189 |
browseFileAction |
|
1190 |
"open a filebrowser on the file represented by the current object" |
|
1191 |
||
1192 |
| fn | |
|
1193 |
||
1194 |
fn := self currentObject asFilename. |
|
17646 | 1195 |
FileBrowser default openOn:fn |
10597 | 1196 |
|
1197 |
"Created: / 19-08-2011 / 09:29:44 / cg" |
|
17646 | 1198 |
"Modified: / 01-09-2017 / 14:05:57 / cg" |
8779 | 1199 |
! |
1200 |
||
11142 | 1201 |
changeColorAction: color |
1202 |
||
1203 |
self toolbarBackgroundHolder value: (Color perform: color asSymbol) |
|
1204 |
||
1205 |
"Created: / 17-01-2012 / 01:03:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1206 |
! |
|
1207 |
||
11134 | 1208 |
editImageAction |
1209 |
"open an imageEditor on the current object" |
|
1210 |
||
1211 |
| img | |
|
1212 |
||
1213 |
img := self currentObject. |
|
1214 |
ImageEditor openOnImage:img. |
|
1215 |
||
1216 |
"Created: / 15-01-2012 / 10:08:29 / cg" |
|
1217 |
! |
|
1218 |
||
8779 | 1219 |
forwardButtonAction |
10320 | 1220 |
self navigationHistoryHolder goForward. |
1221 |
self updateWindowLabel |
|
8779 | 1222 |
|
1223 |
"Created: / 21-02-2008 / 19:52:03 / janfrog" |
|
10320 | 1224 |
"Modified: / 15-07-2011 / 16:26:33 / cg" |
10636 | 1225 |
! |
1226 |
||
12836 | 1227 |
openDocumentation |
1228 |
HTMLDocumentView openFullOnDocumentationFile:'tools/misc/TOP.html#INSPECTOR'. |
|
1229 |
! |
|
1230 |
||
10636 | 1231 |
refreshTabs |
1232 |
self navigationHistoryHolder currentItem refreshTabs. |
|
1233 |
self tabViewAspect changed. |
|
1234 |
||
1235 |
"/ sel := selectionIndex. |
|
1236 |
"/ self selectionIndex:nil. |
|
1237 |
"/ self selectionIndex:sel. |
|
1238 |
||
1239 |
"Created: / 21-08-2011 / 08:23:00 / cg" |
|
15716 | 1240 |
! |
1241 |
||
1242 |
showAlphabeticalHolderChanged |
|
1243 |
self navigationHistoryHolder currentItem tabViews do:[:each | |
|
1244 |
(each isKindOf:InspectorView) ifTrue:[ |
|
1245 |
each showAlphabetical:(self showAlphabeticalHolder value) |
|
1246 |
] |
|
1247 |
]. |
|
17590 | 1248 |
! |
1249 |
||
1250 |
suppressPseudoSlotsHolderChanged |
|
1251 |
self navigationHistoryHolder currentItem tabViews do:[:each | |
|
1252 |
(each isKindOf:InspectorView) ifTrue:[ |
|
1253 |
each suppressPseudoSlots:(self suppressPseudoSlotsHolder value) |
|
1254 |
] |
|
1255 |
]. |
|
1256 |
||
1257 |
"Created: / 18-07-2017 / 15:22:02 / cg" |
|
8779 | 1258 |
! ! |
1259 |
||
1260 |
!Inspector2 methodsFor:'opening'! |
|
1261 |
||
10311 | 1262 |
closeDownViews |
1263 |
LastExtent := self window extent. |
|
1264 |
super closeDownViews. |
|
1265 |
||
1266 |
"Created: / 11-07-2011 / 22:33:47 / cg" |
|
1267 |
! |
|
1268 |
||
8779 | 1269 |
inspect:anObject |
13966
6ab4e7ae274a
Fix for evaluation language.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13945
diff
changeset
|
1270 |
| objectsLanguage | |
6ab4e7ae274a
Fix for evaluation language.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13945
diff
changeset
|
1271 |
|
15184
f20011c9afc6
Extracted creation of navigation state so custom subclasses may override and customize.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15178
diff
changeset
|
1272 |
self navigationHistoryHolder currentItem:(self navigationStateFor: anObject). |
10597 | 1273 |
self window notNil ifTrue:[ |
10320 | 1274 |
self updateWindowLabel |
1275 |
]. |
|
13966
6ab4e7ae274a
Fix for evaluation language.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13945
diff
changeset
|
1276 |
objectsLanguage := anObject class programmingLanguage. |
6ab4e7ae274a
Fix for evaluation language.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13945
diff
changeset
|
1277 |
self evaluationLanguageHolder value:(EvaluationLanguageMap at: objectsLanguage ifAbsent: [ objectsLanguage ]). |
14711
e98d36d360de
Update evaluation language in #inspect: to reflect current setting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14449
diff
changeset
|
1278 |
"/ Must force update - it can happen that language doesn't change (value is the same) |
15071 | 1279 |
"/ but inspectors are new and thus would use default language for evaluation. |
14711
e98d36d360de
Update evaluation language in #inspect: to reflect current setting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14449
diff
changeset
|
1280 |
self updateEvaluationLanguage. |
8779 | 1281 |
|
1282 |
"Modified: / 27-02-2008 / 12:06:52 / janfrog" |
|
10320 | 1283 |
"Modified: / 15-07-2011 / 16:26:03 / cg" |
10597 | 1284 |
"Modified (format): / 19-08-2011 / 09:01:20 / cg" |
15184
f20011c9afc6
Extracted creation of navigation state so custom subclasses may override and customize.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15178
diff
changeset
|
1285 |
"Modified: / 04-02-2015 / 15:27:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8779 | 1286 |
! |
1287 |
||
1288 |
openOn: anObject |
|
16549 | 1289 |
self createBuilder. |
10311 | 1290 |
self inspect: anObject. |
15295 | 1291 |
self openWithExtent:LastExtent. |
8779 | 1292 |
|
1293 |
"Modified: / 13-01-2008 / 13:55:27 / janfrog" |
|
10311 | 1294 |
"Modified: / 11-07-2011 / 22:31:42 / cg" |
10320 | 1295 |
! |
1296 |
||
16549 | 1297 |
postBuildEvaluationLanguageCombo: aComboBoxView |
1298 |
"/ aComboBoxView font: (aComboBoxView font asSize: (aComboBoxView font size * 1.5) rounded) |
|
1299 |
||
1300 |
"Modified: / 26-10-2013 / 01:00:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1301 |
! |
|
1302 |
||
10320 | 1303 |
postBuildWith:aBuilder |
11373 | 1304 |
super postBuildWith:aBuilder. |
14711
e98d36d360de
Update evaluation language in #inspect: to reflect current setting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14449
diff
changeset
|
1305 |
self updateWindowLabel. |
10320 | 1306 |
|
1307 |
"Created: / 15-07-2011 / 16:25:36 / cg" |
|
14711
e98d36d360de
Update evaluation language in #inspect: to reflect current setting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14449
diff
changeset
|
1308 |
"Modified: / 12-08-2014 / 20:01:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10320 | 1309 |
! |
1310 |
||
1311 |
updateWindowLabel |
|
14449 | 1312 |
"not only the label is updated; |
1313 |
also the current inspected object is fetched from the navigation state" |
|
1314 |
||
10423
8215f496b6de
changed: #updateWindowLabel
Claus Gittinger <cg@exept.de>
parents:
10392
diff
changeset
|
1315 |
|currentItem object| |
10320 | 1316 |
|
10423
8215f496b6de
changed: #updateWindowLabel
Claus Gittinger <cg@exept.de>
parents:
10392
diff
changeset
|
1317 |
(currentItem := self navigationHistoryHolder currentItem) notNil ifTrue:[ |
8215f496b6de
changed: #updateWindowLabel
Claus Gittinger <cg@exept.de>
parents:
10392
diff
changeset
|
1318 |
object := currentItem theObject. |
8215f496b6de
changed: #updateWindowLabel
Claus Gittinger <cg@exept.de>
parents:
10392
diff
changeset
|
1319 |
]. |
10597 | 1320 |
self currentObjectHolder value:object. |
10320 | 1321 |
self window label:(InspectorView commonLabelFor:object). |
1322 |
||
1323 |
"Created: / 15-07-2011 / 16:25:42 / cg" |
|
8779 | 1324 |
! ! |
1325 |
||
13805 | 1326 |
!Inspector2 methodsFor:'private'! |
1327 |
||
15184
f20011c9afc6
Extracted creation of navigation state so custom subclasses may override and customize.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15178
diff
changeset
|
1328 |
navigationStateFor: anObject |
15282
18ce7c39bd7d
When inspecting a new object, try to keep page selection.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15184
diff
changeset
|
1329 |
| current new | |
18ce7c39bd7d
When inspecting a new object, try to keep page selection.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15184
diff
changeset
|
1330 |
|
18ce7c39bd7d
When inspecting a new object, try to keep page selection.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15184
diff
changeset
|
1331 |
new := NavigationState for: anObject. |
17385 | 1332 |
new inspector:self. |
15282
18ce7c39bd7d
When inspecting a new object, try to keep page selection.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15184
diff
changeset
|
1333 |
current := self currentState. |
18ce7c39bd7d
When inspecting a new object, try to keep page selection.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15184
diff
changeset
|
1334 |
(current notNil "and:[anObject isKindOf: current theObject class]") ifTrue:[ |
18ce7c39bd7d
When inspecting a new object, try to keep page selection.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15184
diff
changeset
|
1335 |
| currentTabLabel newSelectionIndex | |
18ce7c39bd7d
When inspecting a new object, try to keep page selection.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15184
diff
changeset
|
1336 |
|
18ce7c39bd7d
When inspecting a new object, try to keep page selection.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15184
diff
changeset
|
1337 |
currentTabLabel := current tabLabels at: current selectionIndex. |
18ce7c39bd7d
When inspecting a new object, try to keep page selection.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15184
diff
changeset
|
1338 |
newSelectionIndex := new tabLabels indexOf: currentTabLabel. |
18ce7c39bd7d
When inspecting a new object, try to keep page selection.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15184
diff
changeset
|
1339 |
newSelectionIndex ~~ 0 ifTrue:[ |
18ce7c39bd7d
When inspecting a new object, try to keep page selection.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15184
diff
changeset
|
1340 |
new selectionIndex: newSelectionIndex. |
18ce7c39bd7d
When inspecting a new object, try to keep page selection.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15184
diff
changeset
|
1341 |
]. |
15716 | 1342 |
new tabViews do:[:each | |
1343 |
(each isKindOf:InspectorView) ifTrue:[ |
|
17590 | 1344 |
each showAlphabetical:(self showAlphabeticalHolder value). |
1345 |
each suppressPseudoSlots:(self suppressPseudoSlotsHolder value) |
|
15716 | 1346 |
] |
1347 |
]. |
|
15282
18ce7c39bd7d
When inspecting a new object, try to keep page selection.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15184
diff
changeset
|
1348 |
]. |
18ce7c39bd7d
When inspecting a new object, try to keep page selection.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15184
diff
changeset
|
1349 |
^ new |
15184
f20011c9afc6
Extracted creation of navigation state so custom subclasses may override and customize.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15178
diff
changeset
|
1350 |
|
f20011c9afc6
Extracted creation of navigation state so custom subclasses may override and customize.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15178
diff
changeset
|
1351 |
"Created: / 04-02-2015 / 15:27:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
15282
18ce7c39bd7d
When inspecting a new object, try to keep page selection.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15184
diff
changeset
|
1352 |
"Modified: / 13-02-2015 / 20:44:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
17590 | 1353 |
"Modified: / 18-07-2017 / 15:25:51 / cg" |
15184
f20011c9afc6
Extracted creation of navigation state so custom subclasses may override and customize.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15178
diff
changeset
|
1354 |
! |
f20011c9afc6
Extracted creation of navigation state so custom subclasses may override and customize.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15178
diff
changeset
|
1355 |
|
13805 | 1356 |
setDoItActionForLanguage: language |
1357 |
self currentState tabViews do:[:view | |
|
1358 |
(view respondsTo: #workspace) ifTrue:[ |
|
16549 | 1359 |
view workspace |
1360 |
editedLanguage: language; |
|
1361 |
doItAction: |
|
1362 |
[:theCode | |
|
1363 |
|evaluator| |
|
13805 | 1364 |
|
16549 | 1365 |
(evaluator := language evaluatorClass) notNil ifTrue:[ |
1366 |
evaluator |
|
1367 |
evaluate:theCode in:nil |
|
1368 |
receiver:self currentObject |
|
1369 |
notifying:view workspace |
|
1370 |
logged:true ifFail:nil |
|
1371 |
] ifFalse:[ |
|
1372 |
'object''s class provides no evaluator' |
|
1373 |
] |
|
1374 |
]. |
|
13805 | 1375 |
]. |
1376 |
] |
|
1377 |
||
1378 |
"Created: / 26-10-2013 / 01:13:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
15522
92e5dd55bfd6
Set #editedLanguage for all workspaces
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15402
diff
changeset
|
1379 |
"Modified: / 10-03-2015 / 09:46:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13805 | 1380 |
! ! |
13168 | 1381 |
|
16662 | 1382 |
|
8779 | 1383 |
!Inspector2::NavigationState class methodsFor:'creating classes'! |
1384 |
||
10597 | 1385 |
for:anObject |
1386 |
|item| |
|
1387 |
||
1388 |
item := self new. |
|
1389 |
item theObject:anObject. |
|
1390 |
^ item. |
|
1391 |
||
1392 |
"Modified (format): / 19-08-2011 / 09:24:40 / cg" |
|
8779 | 1393 |
! ! |
1394 |
||
1395 |
!Inspector2::NavigationState class methodsFor:'documentation'! |
|
1396 |
||
9996 | 1397 |
version |
15716 | 1398 |
^'$Header$' |
9996 | 1399 |
! |
1400 |
||
8779 | 1401 |
version_SVN |
15716 | 1402 |
^'$Id$' |
8779 | 1403 |
! ! |
1404 |
||
1405 |
!Inspector2::NavigationState methodsFor:'accessing'! |
|
1406 |
||
16549 | 1407 |
application:anInspectorApp |
17385 | 1408 |
<resource: #obsolete> |
1409 |
inspector := anInspectorApp. |
|
16549 | 1410 |
! |
1411 |
||
8779 | 1412 |
index |
1413 |
^ index |
|
1414 |
! |
|
1415 |
||
1416 |
index:something |
|
1417 |
index := something. |
|
1418 |
! |
|
1419 |
||
17385 | 1420 |
inspector |
1421 |
^ inspector |
|
1422 |
! |
|
1423 |
||
1424 |
inspector:anInspectorApp |
|
1425 |
inspector := anInspectorApp. |
|
1426 |
||
1427 |
"Modified (format): / 11-02-2017 / 10:14:31 / cg" |
|
1428 |
! |
|
1429 |
||
8779 | 1430 |
selectionIndex |
10875 | 1431 |
selectionIndex isNil ifTrue:[^1]. |
8779 | 1432 |
selectionIndex < 1 ifTrue:[^1]. |
1433 |
selectionIndex > tabs size ifTrue:[^tabs size]. |
|
1434 |
^selectionIndex |
|
1435 |
||
1436 |
"Created: / 16-01-2008 / 17:24:27 / janfrog" |
|
1437 |
"Modified: / 17-02-2008 / 10:20:35 / janfrog" |
|
10875 | 1438 |
"Modified: / 18-11-2011 / 15:00:01 / cg" |
8779 | 1439 |
! |
1440 |
||
1441 |
selectionIndex: anInteger |
|
1442 |
selectionIndex := anInteger. |
|
1443 |
self changed:#selectionIndex |
|
1444 |
||
1445 |
"Created: / 16-01-2008 / 17:27:52 / janfrog" |
|
1446 |
"Modified: / 17-02-2008 / 09:46:45 / janfrog" |
|
1447 |
! |
|
1448 |
||
1449 |
selectionView |
|
1450 |
||
1451 |
|tab| |
|
1452 |
||
16899 | 1453 |
tab := self tabs at:self selectionIndex ifAbsent:nil. |
1454 |
^ tab isNil ifTrue:[nil] ifFalse:[tab view]. |
|
8779 | 1455 |
|
1456 |
"Created: / 16-01-2008 / 17:31:19 / janfrog" |
|
1457 |
! |
|
1458 |
||
1459 |
tabLabels |
|
1460 |
||
1461 |
^self tabs collect:[:tab | tab label] |
|
1462 |
||
1463 |
"Created: / 16-01-2008 / 17:14:07 / janfrog" |
|
1464 |
! |
|
1465 |
||
1466 |
tabViews |
|
1467 |
||
14158
9367f43bf074
Performance fixes in Inspector2:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13966
diff
changeset
|
1468 |
^self tabs collect:[:tab | tab viewOrNil] |
8779 | 1469 |
|
1470 |
"Created: / 16-01-2008 / 17:14:13 / janfrog" |
|
14158
9367f43bf074
Performance fixes in Inspector2:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13966
diff
changeset
|
1471 |
"Modified: / 24-03-2014 / 18:23:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8779 | 1472 |
! |
1473 |
||
1474 |
tabs |
|
1475 |
||
10875 | 1476 |
tabs isNil ifTrue:[self initializeTabs]. |
8779 | 1477 |
^tabs |
1478 |
||
1479 |
"Created: / 16-01-2008 / 16:51:53 / janfrog" |
|
10875 | 1480 |
"Modified: / 18-11-2011 / 15:00:05 / cg" |
8779 | 1481 |
! |
1482 |
||
1483 |
theObject |
|
1484 |
^ theObject |
|
1485 |
! |
|
1486 |
||
1487 |
theObject:anObject |
|
1488 |
theObject := anObject. |
|
10597 | 1489 |
self changed |
8779 | 1490 |
|
1491 |
"Modified: / 17-02-2008 / 08:38:44 / janfrog" |
|
10597 | 1492 |
"Modified: / 19-08-2011 / 09:16:25 / cg" |
8779 | 1493 |
! ! |
1494 |
||
1495 |
!Inspector2::NavigationState methodsFor:'comparing'! |
|
1496 |
||
1497 |
= anotherState |
|
1498 |
||
1499 |
^self class == anotherState class |
|
1500 |
and:[self theObject == anotherState theObject] |
|
1501 |
||
1502 |
"Created: / 21-02-2008 / 19:39:01 / janfrog" |
|
1503 |
! |
|
1504 |
||
1505 |
hash |
|
1506 |
||
1507 |
^theObject hash |
|
1508 |
||
1509 |
"Created: / 21-02-2008 / 19:38:08 / janfrog" |
|
1510 |
! ! |
|
1511 |
||
1512 |
!Inspector2::NavigationState methodsFor:'displaying'! |
|
1513 |
||
13084 | 1514 |
displayOn:aGCOrStream |
1515 |
||
1516 |
"/ what a kludge - Dolphin and Squeak mean: printOn: a stream; |
|
17428 | 1517 |
"/ old ST80 means: draw-yourself on a GC. |
13084 | 1518 |
aGCOrStream isStream ifFalse:[ |
1519 |
^ super displayOn:aGCOrStream. |
|
1520 |
]. |
|
8779 | 1521 |
|
10392 | 1522 |
displayString isNil ifTrue:[ |
11280 | 1523 |
Error handle:[:ex | |
1524 |
displayString := '*ERROR*' |
|
1525 |
] do:[ |
|
17815 | 1526 |
displayString := theObject displayString contractAtEndTo:15. |
11280 | 1527 |
]. |
17125 | 1528 |
displayString := displayString , ' [', (theObject class name ? '???') , ']' |
10392 | 1529 |
]. |
13084 | 1530 |
aGCOrStream nextPutAll:displayString. |
8779 | 1531 |
|
1532 |
"Created: / 21-02-2008 / 19:53:07 / janfrog" |
|
11582
4daadd615c71
lazy setup of embedded browser brings up inspector much faster
Claus Gittinger <cg@exept.de>
parents:
11373
diff
changeset
|
1533 |
"Modified: / 13-06-2012 / 14:40:34 / cg" |
17428 | 1534 |
"Modified (comment): / 22-02-2017 / 16:48:59 / cg" |
17815 | 1535 |
"Modified: / 28-11-2017 / 19:12:56 / stefan" |
8779 | 1536 |
! ! |
1537 |
||
1538 |
!Inspector2::NavigationState methodsFor:'initialization'! |
|
1539 |
||
15178
8cf5ae14559b
Inspector2 refactoring: do add some tabs automagically and unconditionally.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15071
diff
changeset
|
1540 |
initializeTab: selector |
16662 | 1541 |
"Initializes an extra tab specified by given selector" |
14232
0801fd0e860c
Allow for extra inspector tabs to be specified also by method annotated
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14189
diff
changeset
|
1542 |
|
0801fd0e860c
Allow for extra inspector tabs to be specified also by method annotated
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14189
diff
changeset
|
1543 |
| tab | |
0801fd0e860c
Allow for extra inspector tabs to be specified also by method annotated
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14189
diff
changeset
|
1544 |
|
17125 | 1545 |
[ |
17127 | 1546 |
(selector == #inspector2TabForBasicInspect and:[theObject isProtoObject]) ifTrue:[ |
1547 |
"kludge for ProtoObject, which does neither implement this selector |
|
17125 | 1548 |
nor #perform:" |
1549 |
tab := Tools::Inspector2Tab new |
|
1550 |
priority: 90; |
|
1551 |
label:'Basic'; |
|
17127 | 1552 |
view: (InspectorView new inspect:theObject); |
17125 | 1553 |
yourself |
1554 |
] ifFalse:[ |
|
1555 |
tab := theObject perform:selector. |
|
1556 |
]. |
|
16662 | 1557 |
] on: Error do:[:ex| |
1558 |
"/ for debugging: |
|
1559 |
"/ ex reject. |
|
16725 | 1560 |
Logger error:'inspector setup: %1' with:ex description. |
16662 | 1561 |
tab := Tools::Inspector2Tab new |
17385 | 1562 |
inspector:inspector; |
16662 | 1563 |
label:selector; |
1564 |
text:(ex description, Character cr, Character cr, |
|
1565 |
ex suspendedContext fullPrintAllString) |
|
1566 |
]. |
|
1567 |
||
1568 |
(tab isKindOf:Tools::Inspector2Tab) ifTrue:[ |
|
16549 | 1569 |
tabs add: tab. |
17385 | 1570 |
tab inspector:inspector. |
14232
0801fd0e860c
Allow for extra inspector tabs to be specified also by method annotated
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14189
diff
changeset
|
1571 |
] |
0801fd0e860c
Allow for extra inspector tabs to be specified also by method annotated
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14189
diff
changeset
|
1572 |
|
15178
8cf5ae14559b
Inspector2 refactoring: do add some tabs automagically and unconditionally.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15071
diff
changeset
|
1573 |
"Created: / 03-02-2015 / 11:03:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
17385 | 1574 |
"Modified: / 11-02-2017 / 10:16:42 / cg" |
14232
0801fd0e860c
Allow for extra inspector tabs to be specified also by method annotated
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14189
diff
changeset
|
1575 |
! |
0801fd0e860c
Allow for extra inspector tabs to be specified also by method annotated
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14189
diff
changeset
|
1576 |
|
15178
8cf5ae14559b
Inspector2 refactoring: do add some tabs automagically and unconditionally.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15071
diff
changeset
|
1577 |
initializeTabs |
16662 | 1578 |
| selectors | |
14232
0801fd0e860c
Allow for extra inspector tabs to be specified also by method annotated
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14189
diff
changeset
|
1579 |
|
15178
8cf5ae14559b
Inspector2 refactoring: do add some tabs automagically and unconditionally.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15071
diff
changeset
|
1580 |
tabs := OrderedCollection new. |
14232
0801fd0e860c
Allow for extra inspector tabs to be specified also by method annotated
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14189
diff
changeset
|
1581 |
|
0801fd0e860c
Allow for extra inspector tabs to be specified also by method annotated
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14189
diff
changeset
|
1582 |
"/ Old style - tabs are specified by method #inspector2Tabs |
17153 | 1583 |
(theObject isProtoObject or:[theObject isNil or:[theObject isStructure]]) ifTrue:[ |
1584 |
"kludge for ProtoObject and Structure, which does not implement this selector |
|
17125 | 1585 |
nor #perform: -- see #initializeTab:" |
1586 |
selectors := #(inspector2TabForBasicInspect). |
|
1587 |
] ifFalse:[ |
|
1588 |
selectors := theObject inspector2Tabs. |
|
1589 |
]. |
|
1590 |
selectors := selectors asSet. |
|
14232
0801fd0e860c
Allow for extra inspector tabs to be specified also by method annotated
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14189
diff
changeset
|
1591 |
|
15861 | 1592 |
"/ New style - tab are defined by methods with <inspector2Tab> annotation |
16662 | 1593 |
theObject class withAllSuperclassesDo:[:eachClass| |
1594 |
eachClass selectorsAndMethodsDo:[:eachSelector :method | |
|
1595 |
(selectors includes: eachSelector) ifFalse:[ |
|
14354
2e253818719a
Fix in #initializeExtraTabs: - when searching for annotated methods, search superclasses too!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14260
diff
changeset
|
1596 |
(method hasAnnotation: #inspector2Tab) ifTrue:[ |
16662 | 1597 |
selectors add: eachSelector. |
14354
2e253818719a
Fix in #initializeExtraTabs: - when searching for annotated methods, search superclasses too!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14260
diff
changeset
|
1598 |
]. |
13168 | 1599 |
]. |
14232
0801fd0e860c
Allow for extra inspector tabs to be specified also by method annotated
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14189
diff
changeset
|
1600 |
]. |
14354
2e253818719a
Fix in #initializeExtraTabs: - when searching for annotated methods, search superclasses too!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14260
diff
changeset
|
1601 |
]. |
16725 | 1602 |
|
1603 |
selectors do:[:eachSelector| self initializeTab: eachSelector ]. |
|
1604 |
||
1605 |
tabs := tabs sort:[:a :b| a priority > b priority]. |
|
8779 | 1606 |
|
1607 |
"Created: / 16-01-2008 / 16:54:28 / janfrog" |
|
1608 |
"Modified: / 17-02-2008 / 10:08:04 / janfrog" |
|
15178
8cf5ae14559b
Inspector2 refactoring: do add some tabs automagically and unconditionally.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15071
diff
changeset
|
1609 |
"Modified: / 03-02-2015 / 11:06:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10636 | 1610 |
! |
1611 |
||
1612 |
refreshTabs |
|
1613 |
self initializeTabs. |
|
1614 |
||
1615 |
"Created: / 21-08-2011 / 08:23:11 / cg" |
|
8779 | 1616 |
! ! |
1617 |
||
1618 |
!Inspector2 class methodsFor:'documentation'! |
|
1619 |
||
10425
c49cba2bd28e
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10423
diff
changeset
|
1620 |
version |
15716 | 1621 |
^ '$Header$' |
10425
c49cba2bd28e
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10423
diff
changeset
|
1622 |
! |
c49cba2bd28e
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10423
diff
changeset
|
1623 |
|
8807 | 1624 |
version_CVS |
15716 | 1625 |
^ '$Header$' |
8807 | 1626 |
! |
1627 |
||
8816 | 1628 |
version_CVS_jvrany |
15716 | 1629 |
^ '$Header$' |
9996 | 1630 |
! |
1631 |
||
1632 |
version_SVN |
|
15716 | 1633 |
^ '$Id$' |
8779 | 1634 |
! ! |
11142 | 1635 |
|
12357 | 1636 |
|
11142 | 1637 |
Inspector2 initialize! |