author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Sun, 16 Dec 2012 21:04:02 +0100 | |
branch | directory_structure_refactoring |
changeset 1899 | 800c0f76adce |
parent 1818 | 2e5ed72e7dfd |
child 1879 | 7d232ff32dde |
permissions | -rw-r--r-- |
1530 | 1 |
"{ Package: 'stx:libjava/tools' }" |
2 |
||
3 |
AbstractSettingsApplication subclass:#JavaSettingsApplication |
|
1558 | 4 |
instanceVariableNames:'javaReleaseHolder javaReleaseList javaHomeHolder |
1569 | 5 |
javaReleaseIsCustomHolder javaClassPathHolder |
1590 | 6 |
javaSourceDirectoriesHolder infoPanel' |
1530 | 7 |
classVariableNames:'' |
8 |
poolDictionaries:'' |
|
9 |
category:'Languages-Java-Tools' |
|
10 |
! |
|
11 |
||
1561 | 12 |
ApplicationModel subclass:#PathEditor |
1571 | 13 |
instanceVariableNames:'selectionHolder pathListEffectiveHolder pathListHolder pathList |
14 |
treeList treeView treeListItemForUserDefined' |
|
1561 | 15 |
classVariableNames:'' |
16 |
poolDictionaries:'' |
|
17 |
privateIn:JavaSettingsApplication |
|
18 |
! |
|
19 |
||
1592 | 20 |
SimpleDialog subclass:#PathElementEditor |
21 |
instanceVariableNames:'nameHolder pathHolder enabledHolder' |
|
22 |
classVariableNames:'' |
|
23 |
poolDictionaries:'' |
|
24 |
privateIn:JavaSettingsApplication::PathEditor |
|
25 |
! |
|
26 |
||
1571 | 27 |
HierarchicalList subclass:#PathElementList |
28 |
instanceVariableNames:'userItem userCategory' |
|
1561 | 29 |
classVariableNames:'' |
30 |
poolDictionaries:'' |
|
31 |
privateIn:JavaSettingsApplication::PathEditor |
|
32 |
! |
|
33 |
||
1571 | 34 |
HierarchicalItem subclass:#Category |
35 |
instanceVariableNames:'origin label' |
|
36 |
classVariableNames:'' |
|
37 |
poolDictionaries:'' |
|
38 |
privateIn:JavaSettingsApplication::PathEditor::PathElementList |
|
39 |
! |
|
40 |
||
41 |
HierarchicalItem subclass:#Item |
|
1569 | 42 |
instanceVariableNames:'element x' |
1561 | 43 |
classVariableNames:'' |
44 |
poolDictionaries:'' |
|
1571 | 45 |
privateIn:JavaSettingsApplication::PathEditor::PathElementList |
1561 | 46 |
! |
47 |
||
1530 | 48 |
|
49 |
!JavaSettingsApplication class methodsFor:'initialization'! |
|
50 |
||
51 |
initialize |
|
52 |
||
53 |
self installInSettings |
|
54 |
||
55 |
"Created: / 23-06-2005 / 09:27:10 / masca" |
|
56 |
! |
|
57 |
||
58 |
installInSettings |
|
59 |
||
60 |
Smalltalk addStartBlock:[ |
|
61 |
AbstractLauncherApplication |
|
62 |
addSettingsApplicationByClass:self name withName:'Java' icon:self defaultIcon |
|
63 |
] |
|
64 |
||
65 |
"Created: / 23-06-2005 / 09:27:10 / masca" |
|
66 |
"Modified: / 19-07-2012 / 11:26:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
67 |
! ! |
|
68 |
||
69 |
!JavaSettingsApplication class methodsFor:'image specs'! |
|
70 |
||
71 |
defaultIcon |
|
72 |
^ self libjavaCupIconInTree |
|
73 |
||
74 |
"Created: / 19-07-2012 / 11:26:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
75 |
! |
|
76 |
||
77 |
libjavaCupIcon |
|
78 |
"This resource specification was automatically generated |
|
79 |
by the ImageEditor of ST/X." |
|
80 |
||
81 |
"Do not manually edit this!! If it is corrupted, |
|
82 |
the ImageEditor may not be able to read the specification." |
|
83 |
||
84 |
" |
|
85 |
self libjavaCupIcon inspect |
|
86 |
ImageEditor openOnClass:self andSelector:#libjavaCupIcon |
|
87 |
Icon flushCachedIcons |
|
88 |
" |
|
89 |
||
90 |
<resource: #image> |
|
91 |
||
92 |
^Icon |
|
93 |
constantNamed:'JavaSettingsApplication libjavaCupIcon' |
|
94 |
ifAbsentPut:[(Depth24Image new) width: 66; height: 66; photometric:(#rgb); bitsPerSample:(#(8 8 8)); samplesPerPixel:(3); bits:(ByteArray fromPackedString:' |
|
95 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
96 |
?????????????????????????????????_O)?/_1???????????????????????????????????????????????????????????????????????????????? |
|
97 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
98 |
?????????????????????????????????????????????????????????/+7<+E4???????????????????????????????????????????????????????? |
|
99 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
100 |
????????????????????????????????????????????????????????????????????????????????????:8X(?/#2???????????????????????????? |
|
101 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
102 |
????????????????????????????????????????????????????????????????????????????????????????????????????????????:(D >MZ6???? |
|
103 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
104 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
105 |
??????????;>:G\N=\FQ???????????????????????????????????????????????????????????????????????????????????????????????????? |
|
106 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
107 |
?????????????????????????????????N7_96<@<;*D???????????????????????????????????????????????????????????????????????????? |
|
108 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
109 |
????????????????????????????????????????????????????????=\FQ96<@=,&_???????????????????????????????????????????????????? |
|
110 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
111 |
??????????????????????????????????????????????????????????????????????????????;=:8 ,96<@>>#W???????????????????????????? |
|
112 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
113 |
????????????????????????????????????????????????????????????????????????????????????????????????????=,"]96<@:8$.???????? |
|
114 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
115 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
116 |
?N/\:G\N96<@=,&_???????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
117 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
118 |
?????????????????????_G'':(L$96<@:8X)??7;???????????????????????????????????????????????????????????????????????????????? |
|
119 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
120 |
?????????????????????????????????????????_G'':(P%96<@97DC>.GJ???????????????????????????????????????????????????????????? |
|
121 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
122 |
?????????????????????????????????????????????????????????????OC$;H,196<@96<@<;"A???????????????????????????????????????? |
|
123 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
124 |
????????????????????????????????????????????????????????????????????????????????>.KL:W8Z96<@96<@;99T??;>???????????????? |
|
125 |
?????????????????_W.???????????????????????????????????????????????????????????????????????????????????????????????????? |
|
126 |
????????????????????????????????????????????????????????????????????????????????????????????????????=<6'':GTJ96<@96<@;))M |
|
127 |
?//8????????????????????????>>[S<;Y>=\JS?_W.???????????????????????????????????????????????????????????????????????????? |
|
128 |
?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????/39 |
|
129 |
<Z5.96<@96<@96<@;95R?/39?????????????????/''5=\VY;H,2;Y@;>>WQ???????????????????????????????????????????????????????????? |
|
130 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
131 |
?????????????????_K(;I@:96<@96<@96<@<*90??7<?????????????/39=\NT:''8[:GPH=\FR??7<???????????????????????????????????????? |
|
132 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
133 |
?????????????????????????????????????N+Z:(L#96<@96<@97DC=\NT????????????????>]&;:(H!!96<@:8 ->>''X???????????????????????? |
|
134 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
135 |
????????????????????????????????????????????????????????>.GJ:W,U96<@96<@:GXL>MV4??????????????7;<;U<97@B96<@;:AW?/#2???? |
|
136 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
137 |
????????????????????????????????????????????????????????????????????????????>>SP:W$Q96<@96<@:GXL>-?F?????????????//8;)%J |
|
138 |
96<@96<@<Z-+??;>???????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
139 |
?????????????????????????????????????????????????????????????????????????????????????????????????/_0:(H"96<@96<@97DD>]": |
|
140 |
??????????????;>;)1O96<@96<@<Z))??;>???????????????????????????????????????????????????????????????????????????????????? |
|
141 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
142 |
<Z-*96<@96<@96<@=K.F????????????????=\FQ96<@96<@;H04??7<???????????????????????????????????????????????????????????????? |
|
143 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
144 |
?????????????????????_W.:GLG96<@96<@:(L$??7;?????????????/''5:W$Q96<@96<@==F-???????????????????????????????????????????? |
|
145 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
146 |
????????????????????????????????????????????>M^896<@96<@96<@=\BP????????????????=,2$96<@96<@96<@?_K(???????????????????? |
|
147 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
148 |
????????????????????????????????????????????????????????????????????>MR296<@96<@96<@>>#V????????????????<;Q;96<@96<@96<@ |
|
149 |
>>_T???????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
150 |
?????????????????????????????????????????????????????????????????????????????????????????????OC$96<@96<@96<@?/#2???????? |
|
151 |
????????<Z-+96<@96<@96<@<;"B???????????????????????????????????????????????????????????????????????????????????????????? |
|
152 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
153 |
:8 -96<@96<@?OC$????????????????=\NT96<@96<@96<@:W$Q?_O*???????????????????????????????????????????????????????????????? |
|
154 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
155 |
????????????????????????=<6&96<@96<@==F.????????????????>>[R96<@96<@96<@96<@<J]$???????????????????????????????????????? |
|
156 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
157 |
??????????????????????????????????????????????????7<;H8796<@;))M????????????????????;)]F96<@96<@96<@96<@=<:)???????????? |
|
158 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
159 |
?????????????????????????????????????????????????????????????????????????????N3^:G\N96<@>.KL????????????????>].?97@B96<@ |
|
160 |
96<@96<@:W0W?/_0???????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
161 |
????????????????????????????????????????????????????????????????????????????????????????????????????????=<6''97@A;)]G??;> |
|
162 |
????????????????<;Q;96<@96<@96<@96<@=K6K???????????????????????????????????????????????????????????????????????????????? |
|
163 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
164 |
????????????=\VX96<@=\VY??????????????????7;;I@:96<@96<@96<@;91P???????????????????????????????????????????????????????? |
|
165 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
166 |
????????????????????????????????????????<;]?:W P?N?#????????????????>>#W:GLG96<@96<@;9=U???????????????????????????????? |
|
167 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
168 |
????????????????????????????????????????????????????????????????????=\RW;YH>??7<????????????????;))M96<@96<@=<:(???????? |
|
169 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
170 |
????????????????????????????????????????????????????????????????????????????????????????????????=\NT=,&_???????????????? |
|
171 |
<*9096<@:(L$?/+7???????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
172 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
173 |
????>]*=?/''5????????????;99S:GPH>.KK????????????????????????????????????????9.713M+#2-#"9>72???????????????????????????? |
|
174 |
????????????????????????????????????????????????????????????????????????????????????????????????????>O+;6NO*-\''V*LCO2-#" |
|
175 |
:^?3??????????????????????????????;=?????????_G'':W0W>].?????????????????????????????????????9.71);?O+LOR$J?CV8"%T8J!!_*F9 |
|
176 |
7>#.????????????????????????????????????????????????????????????????????????????????????????????????????????????:?G4+<WT |
|
177 |
]Y.4W(*''$;GD3M+#>/3<??????????????????????????????????????????????;><;"A>>#W???????????????????????????????????????????? |
|
178 |
????????????=/#:"**?T8J!!V(^%6^O*???????????????????????????????????????????????????????????????????????????????????????? |
|
179 |
????????5>K)"Z&>UXN"T8J!!''[_I=O_9?????????????????????????????????????????????????????????/_1??7<???????????????????????? |
|
180 |
????????>O+;9^31?/??????????????????????>/3<ZYJ-T8J!![)Z0?/?????????????????????????????????????????????????????????????? |
|
181 |
????????????????????????????.<7ZUHJ!!T8J!!T8J!!T8J!!,L[T;/O6???????????????????????????????????????????????????????????????? |
|
182 |
=?'';8.+/3]/$.,7Y)[;N$Z?C_JB7Z)N.'';''J<?[8????????????????????????????);?OT8J!!T8J!!7._-???????????????????????????????????? |
|
183 |
????????????????????????????????????????????????????8^''. JN:UXN"T8J!!T8J!!T8J!!T8J!!ZYJ-^Y:6!!ZZ<$J?C&KSG&KSG&KSG&KSG%;SF#J3@ |
|
184 |
!!ZZ<_:J9]Y.3Z)N.XH.(U(R"T8J!!T8J!!T8J!!U8V#\9*3%KGD-L''V9^31????????????????????????????????????-\+WT8J!!T8J!!4=?''???????????? |
|
185 |
????????????????????????????????????????????????????????????????????????????????????<_W72=''#*<KQ&+WH"Z&>^):6Z)N.W(*''W(*'' |
|
186 |
VHZ$T8J!!T8J!!T8J!!UHJ!!W(*''XH2(Z)N.[YV/_ZF8$+CC)K7M-\+W2-#"7>_-?O7=????????????????????????????????????????????????????%+OF |
|
187 |
T8J!!UHJ!!<OS7???????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
188 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
189 |
????????????????<_W7WH"&T8J!!"Z&>???????????????????????????????????????????????????????????????????????????????????????? |
|
190 |
????????????????????????????????????=O_9???????????????????????????????????????????????????????????????????????????????? |
|
191 |
?????????????????????????????????????/??":/@T8J!!XX2):^?3???????????????????????????????????????????????????????????????? |
|
192 |
????????????????????????????????????????????????????:N;2"**?.,7Y???????????????????????????????????????????????????????? |
|
193 |
????????????????????????????????????????????????????????????([/LT8J!!XH2(6>W+???????????????????????????????????????????? |
|
194 |
????????????????????????????????????????????????????????????????????????8>/0WH"&T8J!!);?O>/3<???????????????????????????? |
|
195 |
????????????????????????????>O+;7N[,/-C\(+/L4-?''????????????????????????????>/3<$+CDT8J!!^I65:N;2???????????????????????? |
|
196 |
????????????????????????????????????????????????????????????????????????????????????????????????5NC''UHJ!!T8J!!T8J!!VHZ$]925 |
|
197 |
!!*^=$Z?C''[_I*LCO+<WS+<WS+<WS+<WS*LCO&;[H#*7A JJ9ZYJ-UHJ!!T8J!!T8J!!T8J!!UXN"''K_I;/O6????????????????8^''/\)&2Z9R.0MG\?/?????? |
|
198 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
199 |
????3=3%_ZF8UHN"T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!U(R#\)&2&[WG1MS_;?S7????????=/#:*\CP |
|
200 |
#J/@3M+#?/;>???????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
201 |
????????????????????????????????????<OS72M_!!*\GP%+OF!!JZ<\I^1Z)N.Z)N.Z)N.Z)N.Z)N.Z)N.\9*3 JJ9$+CC*,GQ0-O^7._->?3=???????? |
|
202 |
????????????????6^O*>O+;???????????????????????????????????????????????????????????????????????????????????????????????? |
|
203 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
204 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
205 |
?????????????????????????????????????????????????????????????????????????????????????????????O7=???????????????????????? |
|
206 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
207 |
????????????????????????????????????????????????????????????????????????????????????????????????????????????5>K)!!JZ<;_K5 |
|
208 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
209 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
210 |
????????4M7%UHJ!!T8J!!"**?0-K]8.+/<OS7?_;>?????????????????????/;>;/O66.S+/,?[(;3M"J&>,,_U>/3<???????????????????????????? |
|
211 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
212 |
????????????????????????????????4-?''UHN"T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!W(*''Z)N.Z)N.Z)N.Y)B+U(R#T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!X86)*\GP |
|
213 |
;?S7???????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
214 |
????????????????????????????????????????????????????????????4-?'']).4T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!! |
|
215 |
T8J!!T8J!!T8J!!UHN"_ZB8/=C\>O+;???????????????????????????????????????????????????????????????????????????????????????????? |
|
216 |
????????????????????????????????????????????????????????;/O64-;&1=[ 1-W =O_9????????????????8^''.+\OR!!JZ<XH.(T8J!!T8J!!T8J!! |
|
217 |
T8J!!T8J!!T8J!!T8J!!T8J!!XH2(_ZF8&+WH1]W_</W8???????????????????????????????????????????????????????????????????????????????? |
|
218 |
????????????????????????????????????????????????????????????????????9^31'';''K[)Z0]).4+,SS6.S+=/'':???????????????????????? |
|
219 |
????????????=_#98N#.7^[,7^[,7^[,7>#.;_K5>/3<????????????????????????????????????????????????????????????????????5^C(=?''; |
|
220 |
????????????????????????????????????????????????????????????????????????????????????9^31!!*^=UHJ!!]Y.36>W+???????????????? |
|
221 |
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
222 |
????????????????''[#J1-W ????????????????????????????????????????????????????????????????????????????????0MG\U8V#T8J!!T8J!! |
|
223 |
+,SS???????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
224 |
????????????????????????????>_/<2=''# :V;#J3@>//<???????????????????????????????????????????????????????????????????????? |
|
225 |
????????^Y66T8J!!T8J!!T8J!!T8J!![)Z0(;3M2=''#;OG5?/?????????????????????????????????????????????????????????????????????????? |
|
226 |
????????????????????????????????</W86>W+1MS_(K+K^Y66WH"&#J/@5^G(?????????????_;>=O_9???????????????????????????????????? |
|
227 |
????????????????????????????????9>;2%[KEYH:*T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!VHZ$[9^0"J">''+#J*\GP-L''V0MG\2-''"4];&4];&4];&4];&4];& |
|
228 |
4];&4];&4];&4];&1-W 1-W 1MS_-</X*,GQ''[#J$J?C!!JV<\9&2WH&&T8J!!UHJ!![9Z0&[WG1-[ =O_9????????????????:/C4#J/@=_#9???????????? |
|
229 |
????????????????????????????????????????????????????????????????????;_K55NC''/L;[)[7N#J3@]925YX>+U(R"T8J!!T8J!!T8J!!T8J!!T8J!! |
|
230 |
T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!U8V#Y9B,_ZB8%+OF,L[T3-3$=O_9?????????????????????/;>3=3%#J/@ |
|
231 |
XX2)5NC''???????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
232 |
?/??;?O67>_-4];&1-[ /L;[,,_U*LCO(;3M(;3M(;3M(;3M(;3M)+;N+<WS,\_U/,?[2-#"5.G)8.+/</W8?????????????????????????????????/?? |
|
233 |
9^310]K]$+CCXX2)U8V#%[KE:?C4???????????????????????????????????????????????????????????????????????????????????????????? |
|
234 |
?????????????????/??7>#.;_K5?/;>???????????????????????????????????????????????????????????????????????????????????????? |
|
235 |
</W85>K).,7Y''K_I_*F9WX&''T8J!!UHN"]925+\OR;?O6???????????????????????????????????????????????????????????????????????????? |
|
236 |
????????????????????????????????????????????=O_9.,7Y&KSG"**? JN:$Z?C([/L(;3M);?O+<WS+<WS.L3X.,7Y.,7Y.,7Y.,7Y.,7Y-</X*<KQ |
|
237 |
(K+K%KKE"**?^):6ZIF,VHV$T8J!!T8J!!WX&''\9&2$+CC,<#U4=?''=O_9???????????????????????????????????????????????????????????????? |
|
238 |
????????????????????????????????????????????????????????????????????????????????????????<OS78^''.3-3$/=C\+<WT*,GQ(;3M&+WH |
|
239 |
&KSG&KSG&KSG&KSG&KSG&KSG&KSG(;3M+\OR-\''V/,?[3=3%8>+0=?'';???????????????????????????????????????????????????????????????? |
|
240 |
????????????????????????') ; yourself] |
|
241 |
! |
|
242 |
||
243 |
libjavaCupIconInTree |
|
244 |
"This resource specification was automatically generated |
|
245 |
by the ImageEditor of ST/X." |
|
246 |
||
247 |
"Do not manually edit this!! If it is corrupted, |
|
248 |
the ImageEditor may not be able to read the specification." |
|
249 |
||
250 |
" |
|
251 |
self libjavaCupIconInTree inspect |
|
252 |
ImageEditor openOnClass:self andSelector:#libjavaCupIconInTree |
|
253 |
Icon flushCachedIcons |
|
254 |
" |
|
255 |
||
256 |
<resource: #image> |
|
257 |
||
258 |
^Icon |
|
259 |
constantNamed:'JavaSettingsApplication libjavaCupIconInTree' |
|
260 |
ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
261 |
G1<_G1<_G1<_G1<_G1<_G1<_G1<_G1<_G1<_G1<_G1<_G1<_G1<_G1<_G1<_G1<_G1<_G1<_G1<_G1<_G1<_G1<_G1<_G1<_G1<_G1<_C1<_G1<_G1<_G1<_ |
|
262 |
G1<_G1<_G1<_DA<_G1<_G1<_G1<_G1<_G1<_G1<_DA<_DQ<_G1<_G1<_G1<_G1<_G1<_DA<_D!!<_G1<_G1<_G1<_G1<_G1<_DA<_DA<_G1<_G1<_G1<_G1<_ |
|
263 |
G1<_G1@_G1@_G1<_G1<_G1<_G1<_G1<_G1<NG1<PC1<_G1<_G1<_G1<_G1<_G1<_G08_G1@_G1<_G1<_G1<_G1<_G1<_G1<_G1<PG1<_G1<_G1<_G1<_G1<_ |
|
264 |
G1<_G1<_G1<_G1<HG1<_G1<_G1<_BP0B@ HCB H_G1<_G0 _G1<_G1<_G1<_G1<_G1<_G1<_G04_G1<_G1<_G1<_B ,B@ HMA $_G1<_G1<_G1<_G1<_G1<_ |
|
265 |
G1<_G1<_G1<_G1<_G1<_G1<_G1<_BQ<_G1<HG1<_G1<_G1<_G1<_G1<_G1<DCP4GG1<_G1<_G1<_G1<_G0$_G1<_G1<_G1<_G1<_G1<_G1<_G1<_G0(AB (J |
|
266 |
B TA@A<_G1<_G1<_G1<_G1<_G1<_G1<_G1<_G1<_G1<_G0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[82 129 161 83 129 160 83 129 161 83 129 162 84 129 160 84 129 161 82 130 161 82 130 162 83 130 160 83 130 161 83 130 162 84 130 161 82 131 161 83 131 161 231 110 0 230 111 0 231 111 0 231 112 0 232 112 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255]; mask:((ImageMask new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@ @@A@@@BP@@D @@I@@@I@@@I @@D @@@ @@@A@A? @@A@@?0@@@@@@P @@O@@D@@@A?0@@@@@') ; yourself); yourself] |
|
267 |
! ! |
|
268 |
||
269 |
!JavaSettingsApplication class methodsFor:'interface opening'! |
|
270 |
||
271 |
open |
|
272 |
||
273 |
| settingsApp | |
|
274 |
||
275 |
settingsApp := SettingsDialog new. |
|
276 |
settingsApp addApplClass:self fullName |
|
277 |
withName:'Java'. |
|
278 |
settingsApp showRoot: false. |
|
279 |
settingsApp selectedItem value: |
|
280 |
(settingsApp applicationList root children anyOne). |
|
281 |
settingsApp open. |
|
282 |
||
283 |
"Created: / 19-07-2012 / 11:25:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
284 |
! ! |
|
285 |
||
286 |
!JavaSettingsApplication class methodsFor:'interface specs'! |
|
287 |
||
288 |
windowSpec |
|
289 |
"This resource specification was automatically generated |
|
290 |
by the UIPainter of ST/X." |
|
291 |
||
292 |
"Do not manually edit this!! If it is corrupted, |
|
293 |
the UIPainter may not be able to read the specification." |
|
294 |
||
295 |
" |
|
296 |
UIPainter new openOnClass:JavaSettingsApplication andSelector:#windowSpec |
|
297 |
JavaSettingsApplication new openInterface:#windowSpec |
|
298 |
JavaSettingsApplication open |
|
299 |
" |
|
300 |
||
301 |
<resource: #canvas> |
|
302 |
||
303 |
^ |
|
304 |
#(FullSpec |
|
305 |
name: windowSpec |
|
306 |
window: |
|
307 |
(WindowSpec |
|
1558 | 308 |
label: 'Java Settings' |
309 |
name: 'Java Settings' |
|
1530 | 310 |
min: (Point 10 10) |
311 |
bounds: (Rectangle 0 0 695 627) |
|
312 |
) |
|
313 |
component: |
|
314 |
(SpecCollection |
|
315 |
collection: ( |
|
316 |
(LabelSpec |
|
317 |
label: ' Java Settings' |
|
318 |
name: 'SubVersiSettingsTitle' |
|
319 |
layout: (LayoutFrame 0 0 0 0 0 1 66 0) |
|
320 |
style: (FontDescription helvetica medium roman 18 #'iso10646-1') |
|
321 |
backgroundColor: (Color 100.0 100.0 100.0) |
|
322 |
translateLabel: true |
|
323 |
adjust: left |
|
324 |
) |
|
325 |
(LabelSpec |
|
326 |
label: 'Icon' |
|
1561 | 327 |
name: 'JavaIcon' |
1530 | 328 |
layout: (LayoutFrame -75 1 0 0 0 1 66 0) |
329 |
hasCharacterOrientedLabel: false |
|
330 |
backgroundColor: (Color 100.0 100.0 100.0) |
|
331 |
translateLabel: true |
|
332 |
labelChannel: libjavaCupIcon |
|
333 |
) |
|
1590 | 334 |
(SubCanvasSpec |
335 |
name: 'InfoPanel' |
|
336 |
layout: (LayoutFrame 0 0 67 0 0 1 107 0) |
|
337 |
level: 0 |
|
338 |
initiallyInvisible: true |
|
339 |
hasHorizontalScrollBar: false |
|
340 |
hasVerticalScrollBar: false |
|
341 |
clientKey: infoPanel |
|
342 |
createNewBuilder: false |
|
343 |
) |
|
1530 | 344 |
(VerticalPanelViewSpec |
345 |
name: 'Controls' |
|
346 |
layout: (LayoutFrame 0 0 70 0 0 1 0 1) |
|
347 |
horizontalLayout: fit |
|
348 |
verticalLayout: topFit |
|
349 |
horizontalSpace: 3 |
|
350 |
verticalSpace: 3 |
|
351 |
component: |
|
352 |
(SpecCollection |
|
353 |
collection: ( |
|
1558 | 354 |
(FramedBoxSpec |
355 |
label: 'Basic Settings' |
|
356 |
name: 'JavaReleasePanel' |
|
357 |
labelPosition: topLeft |
|
358 |
translateLabel: true |
|
359 |
component: |
|
360 |
(SpecCollection |
|
361 |
collection: ( |
|
362 |
(ComboListSpec |
|
363 |
name: 'ReleaseList' |
|
364 |
layout: (LayoutFrame 100 0 0 0 0 1 25 0) |
|
365 |
model: javaReleaseHolder |
|
366 |
comboList: javaReleaseList |
|
367 |
useIndex: false |
|
368 |
) |
|
369 |
(LabelSpec |
|
370 |
label: 'Release:' |
|
371 |
name: 'ReleaseLabel' |
|
372 |
layout: (LayoutFrame 0 0 0 0 100 0 25 0) |
|
373 |
translateLabel: true |
|
374 |
adjust: left |
|
375 |
) |
|
376 |
(LabelSpec |
|
377 |
label: 'JAVA_HOME' |
|
378 |
name: 'JAVA_HOME_Label' |
|
379 |
layout: (LayoutFrame 0 0 30 0 100 0 55 0) |
|
380 |
translateLabel: true |
|
381 |
adjust: left |
|
382 |
) |
|
383 |
(FilenameInputFieldSpec |
|
384 |
name: 'JAVA_HOME' |
|
385 |
layout: (LayoutFrame 100 0 30 0 -55 1 55 0) |
|
386 |
enableChannel: javaReleaseIsCustomHolder |
|
387 |
model: javaHomeHolder |
|
1590 | 388 |
immediateAccept: true |
1558 | 389 |
acceptOnPointerLeave: true |
390 |
) |
|
391 |
(ActionButtonSpec |
|
392 |
label: 'Browse' |
|
393 |
name: 'JAVA_HOME_Browse' |
|
394 |
layout: (LayoutFrame -50 1 30 0 0 1 55 0) |
|
395 |
translateLabel: true |
|
396 |
model: doBrowseJavaHome |
|
397 |
enableChannel: javaReleaseIsCustomHolder |
|
398 |
) |
|
399 |
) |
|
400 |
||
401 |
) |
|
402 |
extent: (Point 695 95) |
|
403 |
) |
|
1569 | 404 |
(VariableVerticalPanelSpec |
405 |
name: 'VariableVerticalPanel1' |
|
1561 | 406 |
component: |
407 |
(SpecCollection |
|
408 |
collection: ( |
|
1569 | 409 |
(FramedBoxSpec |
410 |
label: 'Classpath' |
|
411 |
name: 'ClasspathPanel' |
|
412 |
labelPosition: topLeft |
|
413 |
translateLabel: true |
|
414 |
component: |
|
415 |
(SpecCollection |
|
416 |
collection: ( |
|
417 |
(SubCanvasSpec |
|
418 |
name: 'SubCanvas1' |
|
419 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
420 |
level: 0 |
|
421 |
hasHorizontalScrollBar: false |
|
422 |
hasVerticalScrollBar: false |
|
423 |
majorKey: #'JavaSettingsApplication::PathEditor' |
|
424 |
minorKey: windowSpec |
|
425 |
subAspectHolders: |
|
426 |
(Array |
|
427 |
||
428 |
(SubChannelInfoSpec |
|
1571 | 429 |
subAspect: pathListEffectiveHolder |
430 |
aspect: javaClassPathEffectiveAspect |
|
431 |
) |
|
432 |
(SubChannelInfoSpec |
|
433 |
subAspect: pathListHolder |
|
1569 | 434 |
aspect: javaClassPathHolder |
435 |
) |
|
436 |
) |
|
437 |
createNewApplication: true |
|
438 |
createNewBuilder: true |
|
439 |
) |
|
440 |
) |
|
441 |
||
1561 | 442 |
) |
1569 | 443 |
) |
444 |
(FramedBoxSpec |
|
445 |
label: 'Sources' |
|
446 |
name: 'SourcePathPanel' |
|
447 |
labelPosition: topLeft |
|
448 |
translateLabel: true |
|
449 |
component: |
|
450 |
(SpecCollection |
|
451 |
collection: ( |
|
452 |
(SubCanvasSpec |
|
453 |
name: 'SubCanvas2' |
|
454 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
455 |
level: 0 |
|
456 |
hasHorizontalScrollBar: false |
|
457 |
hasVerticalScrollBar: false |
|
458 |
majorKey: #'JavaSettingsApplication::PathEditor' |
|
459 |
minorKey: windowSpec |
|
460 |
subAspectHolders: |
|
461 |
(Array |
|
462 |
||
463 |
(SubChannelInfoSpec |
|
1571 | 464 |
subAspect: pathListEffectiveHolder |
465 |
aspect: javaSourceDirectoriesEffectiveAspect |
|
466 |
) |
|
467 |
(SubChannelInfoSpec |
|
468 |
subAspect: pathListHolder |
|
469 |
aspect: javaSourceDirectoriesHolder |
|
1569 | 470 |
) |
471 |
) |
|
472 |
createNewApplication: true |
|
473 |
createNewBuilder: true |
|
474 |
) |
|
475 |
) |
|
476 |
||
477 |
) |
|
1561 | 478 |
) |
479 |
) |
|
480 |
||
481 |
) |
|
1558 | 482 |
extent: (Point 695 459) |
1569 | 483 |
handles: (Any 0.5 1.0) |
1530 | 484 |
) |
485 |
) |
|
486 |
||
487 |
) |
|
488 |
) |
|
489 |
) |
|
490 |
||
491 |
) |
|
492 |
) |
|
493 |
! ! |
|
494 |
||
1571 | 495 |
!JavaSettingsApplication methodsFor:'accessing-private'! |
496 |
||
497 |
javaClassPathEffective |
|
498 |
| rel | |
|
499 |
||
500 |
rel := self javaReleaseHolder value. |
|
501 |
^rel isNil ifTrue:[ |
|
502 |
#() |
|
503 |
] ifFalse:[ |
|
504 |
Java effectiveClassPathForRelease: rel |
|
505 |
] |
|
506 |
||
507 |
"Created: / 30-07-2012 / 19:39:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
508 |
! |
|
509 |
||
1586
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
510 |
javaClassPathLiteralArray |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
511 |
^self javaClassPathHolder value asOrderedCollection literalArrayEncoding |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
512 |
|
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
513 |
"Created: / 02-08-2012 / 10:04:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
514 |
! |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
515 |
|
1571 | 516 |
javaSourceDirectoriesEffective |
517 |
| rel | |
|
518 |
||
519 |
rel := self javaReleaseHolder value. |
|
520 |
^rel isNil ifTrue:[ |
|
521 |
#() |
|
522 |
] ifFalse:[ |
|
523 |
Java effectiveSourceDirectoriesForRelease: rel |
|
524 |
] |
|
525 |
||
526 |
"Created: / 30-07-2012 / 19:39:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1586
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
527 |
! |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
528 |
|
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
529 |
javaSourcePathLiteralArray |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
530 |
^self javaSourceDirectoriesHolder value asOrderedCollection literalArrayEncoding |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
531 |
|
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
532 |
"Created: / 02-08-2012 / 10:04:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1571 | 533 |
! ! |
534 |
||
1558 | 535 |
!JavaSettingsApplication methodsFor:'actions'! |
536 |
||
537 |
doBrowseJavaHome |
|
538 |
<resource: #uiCallback> |
|
539 |
||
540 |
| java_home | |
|
541 |
||
542 |
java_home := Dialog requestDirectoryName:(resources string:'JAVA_HOME directory'). |
|
543 |
java_home notEmptyOrNil ifTrue:[ |
|
544 |
self javaHomeHolder value: java_home |
|
545 |
] |
|
546 |
||
547 |
"Modified: / 27-07-2012 / 00:20:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
548 |
! ! |
|
549 |
||
550 |
!JavaSettingsApplication methodsFor:'aspects'! |
|
551 |
||
1590 | 552 |
infoPanel |
553 |
infoPanel isNil ifTrue:[ |
|
554 |
infoPanel := Tools::InlineMessageDialog new. |
|
555 |
]. |
|
556 |
^ infoPanel |
|
557 |
||
558 |
"Created: / 09-02-2012 / 19:23:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
559 |
! |
|
560 |
||
1571 | 561 |
javaClassPathEffectiveAspect |
562 |
"return/create the 'javaClassPathHolder' value holder (automatically generated)" |
|
563 |
||
564 |
^BlockValue with: [:rel | self javaClassPathEffective] argument: self javaReleaseHolder |
|
565 |
||
566 |
"Created: / 30-07-2012 / 19:38:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
567 |
! |
|
568 |
||
1561 | 569 |
javaClassPathHolder |
570 |
"return/create the 'javaClassPathHolder' value holder (automatically generated)" |
|
571 |
||
572 |
javaClassPathHolder isNil ifTrue:[ |
|
573 |
javaClassPathHolder := ValueHolder new. |
|
1571 | 574 |
javaClassPathHolder addDependent:self. |
1561 | 575 |
]. |
576 |
^ javaClassPathHolder |
|
577 |
! |
|
578 |
||
579 |
javaClassPathHolder:something |
|
580 |
"set the 'javaClassPathHolder' value holder (automatically generated)" |
|
581 |
||
1571 | 582 |
|oldValue newValue| |
583 |
||
584 |
javaClassPathHolder notNil ifTrue:[ |
|
585 |
oldValue := javaClassPathHolder value. |
|
586 |
javaClassPathHolder removeDependent:self. |
|
587 |
]. |
|
1561 | 588 |
javaClassPathHolder := something. |
1571 | 589 |
javaClassPathHolder notNil ifTrue:[ |
590 |
javaClassPathHolder addDependent:self. |
|
591 |
]. |
|
592 |
newValue := javaClassPathHolder value. |
|
593 |
oldValue ~~ newValue ifTrue:[ |
|
594 |
self update:#value with:newValue from:javaClassPathHolder. |
|
595 |
]. |
|
1561 | 596 |
! |
597 |
||
1558 | 598 |
javaHomeHolder |
599 |
<resource: #uiAspect> |
|
600 |
||
601 |
javaHomeHolder isNil ifTrue:[ |
|
602 |
javaHomeHolder := AspectAdaptor forAspect: #javaHome. |
|
603 |
javaHomeHolder subjectChannel: self javaReleaseHolder. |
|
604 |
javaHomeHolder onChangeSend:#updateModifiedChannel to:self |
|
605 |
]. |
|
606 |
^ javaHomeHolder. |
|
607 |
||
608 |
"Created: / 27-07-2012 / 00:06:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
609 |
! |
|
610 |
||
611 |
javaReleaseHolder |
|
612 |
<resource: #uiAspect> |
|
613 |
||
614 |
javaReleaseHolder isNil ifTrue:[ |
|
615 |
javaReleaseHolder := Java release asValue. |
|
1561 | 616 |
javaReleaseHolder onChangeSend:#updateModifiedChannel to:self. |
617 |
javaReleaseHolder onChangeSend:#updatePaths to:self. |
|
1558 | 618 |
]. |
619 |
^ javaReleaseHolder. |
|
620 |
||
1561 | 621 |
"Modified: / 27-07-2012 / 18:30:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1558 | 622 |
! |
623 |
||
624 |
javaReleaseIsCustomHolder |
|
625 |
<resource: #uiAspect> |
|
626 |
||
627 |
javaReleaseIsCustomHolder isNil ifTrue:[ |
|
628 |
javaReleaseIsCustomHolder := AspectAdaptor forAspect: #isCustom. |
|
629 |
javaReleaseIsCustomHolder subjectChannel: self javaReleaseHolder |
|
630 |
]. |
|
631 |
^ javaReleaseIsCustomHolder. |
|
632 |
||
633 |
"Created: / 27-07-2012 / 00:07:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
634 |
! |
|
635 |
||
636 |
javaReleaseList |
|
637 |
<resource: #uiAspect> |
|
638 |
||
639 |
||
640 |
javaReleaseList isNil ifTrue:[ |
|
641 |
javaReleaseList := JavaRelease all asList |
|
642 |
]. |
|
643 |
^ javaReleaseList. |
|
644 |
||
645 |
"Modified: / 27-07-2012 / 00:13:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1569 | 646 |
! |
647 |
||
1571 | 648 |
javaSourceDirectoriesEffectiveAspect |
1569 | 649 |
"return/create the 'javaClassPathHolder' value holder (automatically generated)" |
650 |
||
1571 | 651 |
^BlockValue with: [:rel | self javaSourceDirectoriesEffective] argument: self javaReleaseHolder |
652 |
||
653 |
"Created: / 30-07-2012 / 19:39:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
654 |
! |
|
655 |
||
656 |
javaSourceDirectoriesHolder |
|
657 |
"return/create the 'javaSourceDirectoriesHolder' value holder (automatically generated)" |
|
658 |
||
659 |
javaSourceDirectoriesHolder isNil ifTrue:[ |
|
660 |
javaSourceDirectoriesHolder := ValueHolder new. |
|
661 |
javaSourceDirectoriesHolder addDependent:self. |
|
1569 | 662 |
]. |
1571 | 663 |
^ javaSourceDirectoriesHolder |
1569 | 664 |
! |
665 |
||
1571 | 666 |
javaSourceDirectoriesHolder:something |
667 |
"set the 'javaSourceDirectoriesHolder' value holder (automatically generated)" |
|
668 |
||
669 |
|oldValue newValue| |
|
1569 | 670 |
|
1571 | 671 |
javaSourceDirectoriesHolder notNil ifTrue:[ |
672 |
oldValue := javaSourceDirectoriesHolder value. |
|
673 |
javaSourceDirectoriesHolder removeDependent:self. |
|
674 |
]. |
|
675 |
javaSourceDirectoriesHolder := something. |
|
676 |
javaSourceDirectoriesHolder notNil ifTrue:[ |
|
677 |
javaSourceDirectoriesHolder addDependent:self. |
|
678 |
]. |
|
679 |
newValue := javaSourceDirectoriesHolder value. |
|
680 |
oldValue ~~ newValue ifTrue:[ |
|
681 |
self update:#value with:newValue from:javaSourceDirectoriesHolder. |
|
682 |
]. |
|
1558 | 683 |
! ! |
684 |
||
1561 | 685 |
!JavaSettingsApplication methodsFor:'change & update'! |
686 |
||
687 |
updatePaths |
|
688 |
||
1571 | 689 |
self javaClassPathHolder value: (currentUserPrefs javaClassPathDecoded) asList. |
690 |
self javaSourceDirectoriesHolder value: (currentUserPrefs javaSourcePathDecoded) asList. |
|
1561 | 691 |
|
692 |
"Created: / 27-07-2012 / 18:34:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
693 |
! ! |
|
694 |
||
1558 | 695 |
!JavaSettingsApplication methodsFor:'protocol'! |
696 |
||
697 |
basicReadSettings |
|
698 |
| rel | |
|
699 |
||
700 |
rel := currentUserPrefs javaRelease. |
|
701 |
(rel isNil and:[Java notNil]) ifTrue:[ |
|
702 |
rel := Java release |
|
703 |
]. |
|
704 |
||
705 |
self javaReleaseHolder value: rel. |
|
1561 | 706 |
self updatePaths. |
1558 | 707 |
|
1561 | 708 |
"Modified: / 27-07-2012 / 18:47:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1558 | 709 |
! |
710 |
||
711 |
basicSaveSettings |
|
712 |
self javaReleaseHolder value notNil ifTrue:[ |
|
713 |
currentUserPrefs javaReleaseSelector: self javaReleaseHolder value selector. |
|
714 |
] ifFalse:[ |
|
715 |
currentUserPrefs javaReleaseSelector: nil. |
|
1586
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
716 |
]. |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
717 |
currentUserPrefs javaClassPath: self javaClassPathLiteralArray. |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
718 |
currentUserPrefs javaSourcePath: self javaSourcePathLiteralArray. |
1558 | 719 |
|
1586
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
720 |
"Modified: / 02-08-2012 / 10:05:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1558 | 721 |
! |
722 |
||
723 |
helpFilename |
|
724 |
"subclasses must return the relative name of a helpFile |
|
725 |
in the doc/online/<language>/help directory. |
|
726 |
Or nil, if no help is available." |
|
727 |
||
1604 | 728 |
^ '../programming/java-installation.html#config' |
1558 | 729 |
|
1604 | 730 |
"Modified: / 14-08-2012 / 18:57:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1558 | 731 |
! ! |
732 |
||
733 |
!JavaSettingsApplication methodsFor:'queries'! |
|
734 |
||
735 |
hasUnsavedChanges |
|
736 |
"superclass AbstractSettingsApplication says that I am responsible to implement this method" |
|
737 |
||
738 |
| prefRel setRel | |
|
739 |
||
1561 | 740 |
prefRel := currentUserPrefs javaRelease. |
741 |
setRel := self javaReleaseHolder value. |
|
1558 | 742 |
|
1590 | 743 |
(setRel validateJavaHome: self javaHomeHolder value) ifFalse:[ |
744 |
self infoPanel |
|
745 |
reset; |
|
746 |
beWarning; |
|
747 |
message: (resources string: 'JAVA_HOME is not valid'); |
|
748 |
show. |
|
749 |
^ false "/ Hack, this effectively disables the "Apply" button... |
|
750 |
] ifTrue:[ |
|
751 |
self infoPanel hide. |
|
752 |
]. |
|
753 |
||
1558 | 754 |
prefRel ~~ setRel ifTrue:[ ^ true ]. |
755 |
||
1571 | 756 |
(self |
757 |
hasUnsavedChangesInUserEntriesInPath: self javaClassPathHolder value |
|
758 |
comparedTo: currentUserPrefs javaClassPathDecoded) |
|
759 |
ifTrue:[ ^true ]. |
|
760 |
||
761 |
(self |
|
762 |
hasUnsavedChangesInUserEntriesInPath: self javaSourceDirectoriesHolder value |
|
763 |
comparedTo: currentUserPrefs javaSourcePathDecoded) |
|
764 |
ifTrue:[ ^true ]. |
|
765 |
||
766 |
||
767 |
||
1558 | 768 |
|
769 |
^false |
|
770 |
||
1590 | 771 |
"Modified: / 10-08-2012 / 16:28:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1571 | 772 |
! |
773 |
||
774 |
hasUnsavedChangesInUserEntriesInPath: currentPath comparedTo: originalPath |
|
775 |
||
776 |
currentPath size ~~ originalPath size ifTrue:[ ^ true ]. |
|
777 |
||
1586
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
778 |
currentPath with: originalPath do:[:current :original| |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
779 |
current ~= original ifTrue:[ ^ true ] |
1571 | 780 |
]. |
1586
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
781 |
^false |
1571 | 782 |
|
783 |
"Created: / 30-07-2012 / 18:40:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1561 | 784 |
! ! |
785 |
||
1571 | 786 |
!JavaSettingsApplication::PathEditor class methodsFor:'interface specs'! |
787 |
||
788 |
windowSpec |
|
789 |
"This resource specification was automatically generated |
|
790 |
by the UIPainter of ST/X." |
|
791 |
||
792 |
"Do not manually edit this!! If it is corrupted, |
|
793 |
the UIPainter may not be able to read the specification." |
|
794 |
||
795 |
" |
|
796 |
UIPainter new openOnClass:JavaSettingsApplication::PathEditor andSelector:#windowSpec |
|
797 |
JavaSettingsApplication::PathEditor new openInterface:#windowSpec |
|
798 |
JavaSettingsApplication::PathEditor open |
|
799 |
" |
|
800 |
||
801 |
<resource: #canvas> |
|
802 |
||
803 |
^ |
|
804 |
#(FullSpec |
|
805 |
name: windowSpec |
|
806 |
window: |
|
807 |
(WindowSpec |
|
808 |
label: 'NewApplication' |
|
809 |
name: 'NewApplication' |
|
810 |
bounds: (Rectangle 0 0 300 300) |
|
811 |
) |
|
812 |
component: |
|
813 |
(SpecCollection |
|
814 |
collection: ( |
|
815 |
(HierarchicalListViewSpec |
|
816 |
name: 'PathList' |
|
817 |
layout: (LayoutFrame 0 0 0 0 -82 1 0 1) |
|
818 |
model: selectionHolder |
|
819 |
hasHorizontalScrollBar: true |
|
820 |
hasVerticalScrollBar: true |
|
821 |
listModel: treeList |
|
1586
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
822 |
useIndex: false |
1571 | 823 |
highlightMode: line |
824 |
useDefaultIcons: false |
|
825 |
postBuildCallback: postBuildTreeView: |
|
826 |
) |
|
827 |
(VerticalPanelViewSpec |
|
828 |
name: 'Buttons1' |
|
829 |
layout: (LayoutFrame -80 1 0 0 0 1 -22 1) |
|
830 |
horizontalLayout: fit |
|
831 |
verticalLayout: top |
|
832 |
horizontalSpace: 5 |
|
833 |
verticalSpace: 3 |
|
834 |
component: |
|
835 |
(SpecCollection |
|
836 |
collection: ( |
|
837 |
(ActionButtonSpec |
|
838 |
label: 'Add...' |
|
839 |
name: 'ButtonAdd' |
|
840 |
activeHelpKey: addPathElement |
|
841 |
translateLabel: true |
|
842 |
model: actionAdd |
|
843 |
extent: (Point 80 22) |
|
844 |
) |
|
845 |
(ActionButtonSpec |
|
846 |
label: 'Edit...' |
|
847 |
name: 'ButtonEdit' |
|
848 |
activeHelpKey: editPathElement |
|
849 |
translateLabel: true |
|
850 |
model: actionEdit |
|
851 |
enableChannel: canEditHolder |
|
852 |
extent: (Point 80 22) |
|
853 |
) |
|
854 |
(ActionButtonSpec |
|
855 |
label: 'Move Up' |
|
856 |
name: 'ButtonModeUp' |
|
857 |
activeHelpKey: modePathElementUp |
|
858 |
translateLabel: true |
|
859 |
model: actionMoveUp |
|
860 |
enableChannel: canMoveUpHolder |
|
861 |
extent: (Point 80 22) |
|
862 |
) |
|
863 |
(ActionButtonSpec |
|
864 |
label: 'Move Down' |
|
865 |
name: 'ButtonModeDown' |
|
866 |
activeHelpKey: modePathElementDown |
|
867 |
translateLabel: true |
|
868 |
model: actionMoveDown |
|
869 |
enableChannel: canMoveDownHolder |
|
870 |
extent: (Point 80 22) |
|
871 |
) |
|
872 |
(LabelSpec |
|
873 |
name: 'SpacingLabel' |
|
874 |
translateLabel: true |
|
875 |
extent: (Point 80 22) |
|
876 |
) |
|
877 |
(ActionButtonSpec |
|
878 |
label: 'Remove' |
|
879 |
name: 'ButtonRemove' |
|
880 |
activeHelpKey: removePathElement |
|
881 |
translateLabel: true |
|
882 |
model: actionRemove |
|
883 |
enableChannel: canEditHolder |
|
884 |
extent: (Point 80 22) |
|
885 |
) |
|
886 |
) |
|
887 |
||
888 |
) |
|
889 |
) |
|
890 |
) |
|
891 |
||
892 |
) |
|
893 |
) |
|
894 |
! ! |
|
1561 | 895 |
|
896 |
!JavaSettingsApplication::PathEditor class methodsFor:'plugIn spec'! |
|
897 |
||
898 |
aspectSelectors |
|
899 |
"This resource specification was automatically generated |
|
900 |
by the UIPainter of ST/X." |
|
901 |
||
902 |
"Do not manually edit this. If it is corrupted, |
|
903 |
the UIPainter may not be able to read the specification." |
|
904 |
||
905 |
"Return a description of exported aspects; |
|
906 |
these can be connected to aspects of an embedding application |
|
907 |
(if this app is embedded in a subCanvas)." |
|
908 |
||
909 |
^ #( |
|
1586
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
910 |
#pathListEffectiveHolder |
1571 | 911 |
#pathListHolder |
1561 | 912 |
#selectionHolder |
913 |
). |
|
914 |
||
915 |
! ! |
|
916 |
||
917 |
!JavaSettingsApplication::PathEditor methodsFor:'actions'! |
|
918 |
||
919 |
actionAdd |
|
1592 | 920 |
|
921 |
| dlg | |
|
922 |
dlg := PathElementEditor new. |
|
923 |
dlg enabled: true. |
|
924 |
dlg open ifTrue:[ |
|
925 |
| el | |
|
1561 | 926 |
|
1592 | 927 |
el := JavaPathElement newFromUser: dlg path. |
928 |
el name: dlg name. |
|
929 |
el enabled: dlg enabled. |
|
930 |
self pathList add: el. |
|
931 |
] |
|
1561 | 932 |
|
1592 | 933 |
"Modified: / 10-08-2012 / 19:17:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1561 | 934 |
! |
935 |
||
936 |
actionEdit |
|
937 |
||
1592 | 938 |
| sel dlg | |
939 |
sel := self selectionHolder value. |
|
940 |
sel origin ~~ JavaPathElement originUser ifTrue:[ ^ self ]. |
|
941 |
dlg := PathElementEditor new. |
|
942 |
dlg name: sel element name. |
|
943 |
dlg path: sel element pathName. |
|
944 |
dlg enabled: sel element enabled. |
|
945 |
dlg open ifTrue:[ |
|
946 |
sel element name: dlg name. |
|
947 |
sel element pathName: dlg path. |
|
948 |
sel element enabled: dlg enabled. |
|
1596 | 949 |
self updateModifiedChannel. |
1592 | 950 |
treeView invalidate. |
951 |
] |
|
1561 | 952 |
|
1596 | 953 |
"Modified: / 13-08-2012 / 22:52:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1561 | 954 |
! |
955 |
||
956 |
actionMoveDown |
|
1586
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
957 |
| sel | |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
958 |
sel := self selectionHolder value. |
1590 | 959 |
sel origin ~~ JavaPathElement originUser ifTrue:[ ^ self ]. |
960 |
self treeList moveDown: sel. |
|
961 |
self selectionHolder value: sel. |
|
1561 | 962 |
|
1590 | 963 |
"Modified: / 10-08-2012 / 17:11:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1561 | 964 |
! |
965 |
||
966 |
actionMoveUp |
|
1590 | 967 |
| sel | |
968 |
sel := self selectionHolder value. |
|
969 |
sel origin ~~ JavaPathElement originUser ifTrue:[ ^ self ]. |
|
970 |
self treeList moveUp: sel. |
|
971 |
self selectionHolder value: sel. |
|
1561 | 972 |
|
1590 | 973 |
"Modified: / 10-08-2012 / 17:11:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1561 | 974 |
! |
975 |
||
976 |
actionRemove |
|
1586
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
977 |
| sel | |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
978 |
sel := self selectionHolder value. |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
979 |
self selectionHolder value: nil. |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
980 |
sel isNil ifTrue:[ ^ self ]. |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
981 |
self path remove: sel element. |
1561 | 982 |
|
1586
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
983 |
"Modified: / 02-08-2012 / 09:58:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1561 | 984 |
! ! |
985 |
||
986 |
!JavaSettingsApplication::PathEditor methodsFor:'aspects'! |
|
987 |
||
1571 | 988 |
path |
989 |
^self pathList value |
|
1561 | 990 |
|
1571 | 991 |
"Created: / 30-07-2012 / 18:35:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1561 | 992 |
! |
993 |
||
1571 | 994 |
pathList |
995 |
"return/create the 'pathList' value holder (automatically generated)" |
|
996 |
||
997 |
pathList isNil ifTrue:[ |
|
998 |
pathList := ValueHolder new. |
|
999 |
pathList addDependent:self. |
|
1000 |
]. |
|
1001 |
^ pathList |
|
1002 |
! |
|
1003 |
||
1004 |
pathList:something |
|
1005 |
"set the 'pathList' value holder (automatically generated)" |
|
1561 | 1006 |
|
1007 |
|oldValue newValue| |
|
1008 |
||
1571 | 1009 |
self assert: (something isNil or:[something isList]). |
1010 |
||
1011 |
pathList notNil ifTrue:[ |
|
1012 |
oldValue := pathList value. |
|
1013 |
pathList removeDependent:self. |
|
1014 |
]. |
|
1015 |
pathList := something. |
|
1016 |
pathList notNil ifTrue:[ |
|
1017 |
pathList addDependent:self. |
|
1018 |
]. |
|
1019 |
newValue := pathList value. |
|
1020 |
oldValue ~~ newValue ifTrue:[ |
|
1021 |
self update:#value with:newValue from:pathList. |
|
1022 |
]. |
|
1023 |
||
1024 |
"Modified: / 30-07-2012 / 18:39:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1025 |
! |
|
1026 |
||
1027 |
pathListEffectiveHolder |
|
1028 |
"return/create the 'pathListEffectiveHolder' value holder (automatically generated)" |
|
1029 |
||
1030 |
pathListEffectiveHolder isNil ifTrue:[ |
|
1031 |
pathListEffectiveHolder := ValueHolder new. |
|
1032 |
pathListEffectiveHolder addDependent:self. |
|
1033 |
]. |
|
1034 |
^ pathListEffectiveHolder |
|
1035 |
! |
|
1036 |
||
1037 |
pathListEffectiveHolder:something |
|
1038 |
"set the 'pathListEffectiveHolder' value holder (automatically generated)" |
|
1039 |
||
1040 |
|oldValue newValue| |
|
1041 |
||
1042 |
pathListEffectiveHolder notNil ifTrue:[ |
|
1043 |
oldValue := pathListEffectiveHolder value. |
|
1044 |
pathListEffectiveHolder removeDependent:self. |
|
1561 | 1045 |
]. |
1571 | 1046 |
pathListEffectiveHolder := something. |
1047 |
pathListEffectiveHolder notNil ifTrue:[ |
|
1048 |
pathListEffectiveHolder addDependent:self. |
|
1049 |
]. |
|
1050 |
newValue := pathListEffectiveHolder value. |
|
1051 |
oldValue ~~ newValue ifTrue:[ |
|
1052 |
self update:#value with:newValue from:pathListEffectiveHolder. |
|
1053 |
]. |
|
1054 |
! |
|
1055 |
||
1056 |
pathListHolder |
|
1057 |
"return/create the 'pathListHolder' value holder (automatically generated)" |
|
1058 |
||
1059 |
pathListHolder isNil ifTrue:[ |
|
1060 |
pathListHolder := ValueHolder new. |
|
1061 |
pathListHolder addDependent:self. |
|
1561 | 1062 |
]. |
1571 | 1063 |
^ pathListHolder |
1064 |
! |
|
1065 |
||
1066 |
pathListHolder:something |
|
1067 |
"set the 'pathListHolder' value holder (automatically generated)" |
|
1068 |
||
1069 |
|oldValue newValue| |
|
1070 |
||
1071 |
pathListHolder notNil ifTrue:[ |
|
1072 |
oldValue := pathListHolder value. |
|
1073 |
pathListHolder removeDependent:self. |
|
1074 |
]. |
|
1075 |
pathListHolder := something. |
|
1076 |
pathListHolder notNil ifTrue:[ |
|
1077 |
pathListHolder addDependent:self. |
|
1078 |
]. |
|
1079 |
newValue := pathListHolder value. |
|
1561 | 1080 |
oldValue ~~ newValue ifTrue:[ |
1571 | 1081 |
self update:#value with:newValue from:pathListHolder. |
1561 | 1082 |
]. |
1083 |
! |
|
1084 |
||
1085 |
selectionHolder |
|
1086 |
"return/create the 'selectionHolder' value holder (automatically generated)" |
|
1087 |
||
1088 |
selectionHolder isNil ifTrue:[ |
|
1089 |
selectionHolder := ValueHolder new. |
|
1090 |
]. |
|
1091 |
^ selectionHolder |
|
1092 |
! |
|
1093 |
||
1094 |
selectionHolder:something |
|
1095 |
"set the 'selectionHolder' value holder (automatically generated)" |
|
1096 |
||
1097 |
selectionHolder := something. |
|
1098 |
! |
|
1099 |
||
1100 |
treeList |
|
1101 |
||
1102 |
treeList isNil ifTrue:[ |
|
1571 | 1103 |
treeList := PathElementList new. |
1561 | 1104 |
treeList application: self. |
1105 |
treeList showRoot: false. |
|
1571 | 1106 |
treeList buildTree |
1561 | 1107 |
]. |
1108 |
^treeList |
|
1109 |
||
1110 |
"Created: / 27-07-2012 / 18:36:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1111 |
! ! |
|
1112 |
||
1586
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1113 |
!JavaSettingsApplication::PathEditor methodsFor:'aspects-queries'! |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1114 |
|
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1115 |
canEditHolder |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1116 |
|
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1117 |
^BlockValue |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1118 |
with:[:sel| |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1119 |
sel notNil |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1120 |
and:[sel isPathElementItem |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1121 |
and:[sel origin == JavaPathElement originUser]]. |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1122 |
] argument: self selectionHolder |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1123 |
|
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1124 |
"Created: / 02-08-2012 / 16:08:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1125 |
! |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1126 |
|
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1127 |
canMoveDownHolder |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1128 |
|
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1129 |
^BlockValue |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1130 |
with:[:sel| |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1131 |
sel notNil |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1132 |
and:[sel isPathElementItem |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1133 |
and:[sel origin == JavaPathElement originUser |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1134 |
and:[sel parent children last ~~ sel]]] |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1135 |
] argument: self selectionHolder |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1136 |
|
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1137 |
"Created: / 02-08-2012 / 16:12:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1138 |
! |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1139 |
|
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1140 |
canMoveUpHolder |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1141 |
|
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1142 |
^BlockValue |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1143 |
with:[:sel| |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1144 |
sel notNil |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1145 |
and:[sel isPathElementItem |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1146 |
and:[sel origin == JavaPathElement originUser |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1147 |
and:[sel parent children first ~~ sel]]] |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1148 |
] argument: self selectionHolder |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1149 |
|
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1150 |
"Created: / 02-08-2012 / 16:13:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1151 |
! ! |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1152 |
|
1561 | 1153 |
!JavaSettingsApplication::PathEditor methodsFor:'change & update'! |
1154 |
||
1155 |
update:something with:aParameter from:changedObject |
|
1156 |
"Invoked when an object that I depend upon sends a change notification." |
|
1157 |
||
1158 |
"stub code automatically generated - please change as required" |
|
1159 |
||
1571 | 1160 |
changedObject == pathListHolder ifTrue:[ |
1161 |
self pathList: pathListHolder value. |
|
1162 |
self treeList buildTree. |
|
1163 |
^self. |
|
1164 |
]. |
|
1165 |
||
1166 |
changedObject == pathList ifTrue:[ |
|
1167 |
self updateModifiedChannel. |
|
1168 |
something == #insert: ifTrue:[ |
|
1169 |
self treeList updateAfterInsertAt: aParameter. |
|
1170 |
^self. |
|
1171 |
]. |
|
1586
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1172 |
something == #removeFrom: ifTrue:[ |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1173 |
self treeList updateAfterRemoveFrom: aParameter first to: aParameter second. |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1174 |
^self. |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1175 |
]. |
1571 | 1176 |
something == #value ifTrue:[ |
1177 |
self updateTree. |
|
1178 |
^self. |
|
1179 |
]. |
|
1590 | 1180 |
|
1181 |
something == #at: ifTrue:[ |
|
1182 |
^self. |
|
1183 |
]. |
|
1184 |
||
1571 | 1185 |
self breakPoint: #jv. |
1186 |
self updateTree. |
|
1561 | 1187 |
^ self. |
1188 |
]. |
|
1189 |
super update:something with:aParameter from:changedObject |
|
1190 |
||
1590 | 1191 |
"Modified: / 10-08-2012 / 17:11:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1571 | 1192 |
! |
1193 |
||
1194 |
updateModifiedChannel |
|
1195 |
masterApplication notNil ifTrue:[ |
|
1196 |
masterApplication perform: #updateModifiedChannel ifNotUnderstood:[]. |
|
1197 |
]. |
|
1198 |
||
1199 |
"Created: / 30-07-2012 / 20:11:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1561 | 1200 |
! |
1201 |
||
1202 |
updateTree |
|
1571 | 1203 |
self treeList buildTree |
1561 | 1204 |
|
1205 |
"Created: / 27-07-2012 / 18:16:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1206 |
! ! |
|
1207 |
||
1571 | 1208 |
!JavaSettingsApplication::PathEditor methodsFor:'event processing'! |
1209 |
||
1210 |
buttonPress:button x:x y:y view:aView |
|
1211 |
||
1212 |
| itemIndex item | |
|
1213 |
||
1214 |
button ~= 1 ifTrue:[^aView buttonPress:button x:x y:y]. |
|
1215 |
||
1216 |
itemIndex := aView yVisibleToLineNr:y. |
|
1217 |
itemIndex isNil ifTrue:[^self]. |
|
1218 |
itemIndex == 0 ifTrue:[^self]. |
|
1219 |
itemIndex > aView list size ifTrue:[^self]. |
|
1220 |
item := aView list at: itemIndex. |
|
1221 |
item isPathElementCategoryItem ifTrue:[ |
|
1222 |
^aView buttonPress:button x:x y:y |
|
1223 |
]. |
|
1224 |
((aView left + x) between: ((item x ? 0) - 16) and: (item x ? 0)) ifFalse:[ |
|
1225 |
^aView buttonPress:button x:x y:y |
|
1226 |
]. |
|
1227 |
||
1590 | 1228 |
item origin ~~ JavaPathElement originRelease ifTrue:[ |
1229 |
item enabled: item enabled not. |
|
1230 |
self updateModifiedChannel. |
|
1231 |
aView invalidate |
|
1232 |
]. |
|
1571 | 1233 |
|
1234 |
"Created: / 08-12-2009 / 14:12:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1235 |
"Modified: / 18-11-2011 / 14:55:41 / cg" |
|
1590 | 1236 |
"Modified: / 10-08-2012 / 16:43:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1571 | 1237 |
! |
1238 |
||
1239 |
handlesButtonPress:button inView:aView |
|
1240 |
||
1241 |
^treeView scrolledView == aView |
|
1242 |
||
1243 |
"Created: / 08-12-2009 / 14:08:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1244 |
! ! |
|
1569 | 1245 |
|
1246 |
!JavaSettingsApplication::PathEditor methodsFor:'hooks'! |
|
1247 |
||
1248 |
postBuildTreeView: aView |
|
1249 |
||
1250 |
treeView := aView. |
|
1251 |
treeView scrolledView delegate: self. |
|
1252 |
||
1253 |
"Created: / 29-11-2011 / 14:56:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1254 |
! ! |
|
1255 |
||
1592 | 1256 |
!JavaSettingsApplication::PathEditor::PathElementEditor class methodsFor:'help specs'! |
1257 |
||
1258 |
helpSpec |
|
1259 |
"This resource specification was automatically generated |
|
1260 |
by the UIHelpTool of ST/X." |
|
1261 |
||
1262 |
"Do not manually edit this!! If it is corrupted, |
|
1263 |
the UIHelpTool may not be able to read the specification." |
|
1264 |
||
1265 |
" |
|
1266 |
UIHelpTool openOnClass:JavaSettingsApplication::PathEditor::PathElementEditor |
|
1267 |
" |
|
1268 |
||
1269 |
<resource: #help> |
|
1270 |
||
1271 |
^ super helpSpec addPairsFrom:#( |
|
1272 |
||
1273 |
#enabled |
|
1274 |
'When unchecked, path element is ignored by the runtime system' |
|
1275 |
||
1276 |
#name |
|
1277 |
'Human readable name displayed in user interface (defaults to filename)' |
|
1278 |
||
1279 |
#path |
|
1280 |
'Path to directory or .jar or .zip file' |
|
1281 |
||
1282 |
) |
|
1283 |
! ! |
|
1284 |
||
1285 |
!JavaSettingsApplication::PathEditor::PathElementEditor class methodsFor:'interface specs'! |
|
1286 |
||
1287 |
windowSpec |
|
1288 |
"This resource specification was automatically generated |
|
1289 |
by the UIPainter of ST/X." |
|
1290 |
||
1291 |
"Do not manually edit this!! If it is corrupted, |
|
1292 |
the UIPainter may not be able to read the specification." |
|
1293 |
||
1294 |
" |
|
1295 |
UIPainter new openOnClass:JavaSettingsApplication::PathEditor::PathElementEditor andSelector:#windowSpec |
|
1296 |
JavaSettingsApplication::PathEditor::PathElementEditor new openInterface:#windowSpec |
|
1297 |
JavaSettingsApplication::PathEditor::PathElementEditor open |
|
1298 |
" |
|
1299 |
||
1300 |
<resource: #canvas> |
|
1301 |
||
1302 |
^ |
|
1303 |
#(FullSpec |
|
1304 |
name: windowSpec |
|
1305 |
window: |
|
1306 |
(WindowSpec |
|
1307 |
label: 'Path Element' |
|
1308 |
name: 'Path Element' |
|
1309 |
min: (Point 10 10) |
|
1310 |
bounds: (Rectangle 0 0 558 123) |
|
1311 |
) |
|
1312 |
component: |
|
1313 |
(SpecCollection |
|
1314 |
collection: ( |
|
1315 |
(ViewSpec |
|
1316 |
name: 'Content' |
|
1317 |
layout: (LayoutFrame 0 0 0 0 0 1 -30 1) |
|
1318 |
component: |
|
1319 |
(SpecCollection |
|
1320 |
collection: ( |
|
1321 |
(LabelSpec |
|
1322 |
label: 'Name:' |
|
1323 |
name: 'Label15' |
|
1324 |
layout: (LayoutFrame 9 0 9 0 70 0 31 0) |
|
1325 |
activeHelpKey: packageMatchPattern |
|
1326 |
translateLabel: true |
|
1327 |
adjust: right |
|
1328 |
) |
|
1329 |
(InputFieldSpec |
|
1330 |
name: 'NameField' |
|
1331 |
layout: (LayoutFrame 71 0 9 0 -9 1 31 0) |
|
1332 |
activeHelpKey: name |
|
1333 |
enableChannel: useManager |
|
1334 |
model: nameHolder |
|
1335 |
) |
|
1336 |
(LabelSpec |
|
1337 |
label: 'Path:' |
|
1338 |
name: 'Label16' |
|
1339 |
layout: (LayoutFrame 9 0 39 0 70 0 61 0) |
|
1340 |
activeHelpKey: path |
|
1341 |
translateLabel: true |
|
1342 |
adjust: right |
|
1343 |
) |
|
1344 |
(FilenameInputFieldSpec |
|
1345 |
name: 'FilenameEntryField1' |
|
1346 |
layout: (LayoutFrame 71 0 39 0 -9 1 61 0) |
|
1347 |
activeHelpKey: manager |
|
1348 |
model: pathHolder |
|
1349 |
) |
|
1350 |
(CheckBoxSpec |
|
1351 |
label: 'Enabled' |
|
1352 |
name: 'CheckBox1' |
|
1353 |
layout: (LayoutFrame 66 0 71 0 193 0 90 0) |
|
1354 |
activeHelpKey: enabled |
|
1355 |
model: enabledHolder |
|
1356 |
translateLabel: true |
|
1357 |
) |
|
1358 |
) |
|
1359 |
||
1360 |
) |
|
1361 |
) |
|
1362 |
(HorizontalPanelViewSpec |
|
1363 |
name: 'Buttons' |
|
1364 |
layout: (LayoutFrame 0 0 -30 1 0 1 0 1) |
|
1365 |
horizontalLayout: fit |
|
1366 |
verticalLayout: center |
|
1367 |
horizontalSpace: 3 |
|
1368 |
verticalSpace: 3 |
|
1369 |
reverseOrderIfOKAtLeft: true |
|
1370 |
component: |
|
1371 |
(SpecCollection |
|
1372 |
collection: ( |
|
1373 |
(ActionButtonSpec |
|
1374 |
label: 'Cancel' |
|
1375 |
name: 'Button2' |
|
1376 |
translateLabel: true |
|
1377 |
model: doCancel |
|
1378 |
extent: (Point 277 22) |
|
1379 |
) |
|
1380 |
(ActionButtonSpec |
|
1381 |
label: 'OK' |
|
1382 |
name: 'Button1' |
|
1383 |
translateLabel: true |
|
1384 |
model: doAccept |
|
1385 |
enableChannel: doAcceptEnabled |
|
1386 |
extent: (Point 278 22) |
|
1387 |
) |
|
1388 |
) |
|
1389 |
||
1390 |
) |
|
1391 |
) |
|
1392 |
) |
|
1393 |
||
1394 |
) |
|
1395 |
) |
|
1396 |
! ! |
|
1397 |
||
1398 |
!JavaSettingsApplication::PathEditor::PathElementEditor methodsFor:'accessing'! |
|
1399 |
||
1400 |
enabled |
|
1401 |
^ self enabledHolder value |
|
1402 |
||
1403 |
"Created: / 10-08-2012 / 19:00:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1404 |
! |
|
1405 |
||
1406 |
enabled: aBoolean |
|
1407 |
self enabledHolder value: aBoolean |
|
1408 |
||
1409 |
"Created: / 10-08-2012 / 18:59:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1410 |
! |
|
1411 |
||
1412 |
name |
|
1413 |
^self nameHolder value |
|
1414 |
||
1415 |
"Created: / 10-08-2012 / 19:00:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1416 |
! |
|
1417 |
||
1418 |
name: aString |
|
1419 |
self nameHolder value: aString |
|
1420 |
||
1421 |
"Created: / 10-08-2012 / 19:00:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1422 |
! |
|
1423 |
||
1424 |
path |
|
1425 |
^self pathHolder value |
|
1426 |
||
1427 |
"Created: / 10-08-2012 / 18:59:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1428 |
! |
|
1429 |
||
1430 |
path: path |
|
1431 |
self pathHolder value: path |
|
1432 |
||
1433 |
"Created: / 10-08-2012 / 18:59:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1434 |
! ! |
|
1435 |
||
1436 |
!JavaSettingsApplication::PathEditor::PathElementEditor methodsFor:'aspects'! |
|
1437 |
||
1438 |
doAcceptEnabled |
|
1439 |
<resource: #uiAspect> |
|
1440 |
||
1441 |
|holder| |
|
1442 |
||
1443 |
(holder := builder bindingAt:#doAcceptEnabled) isNil ifTrue:[ |
|
1444 |
holder := BlockValue |
|
1445 |
with: [:path | path value notEmptyOrNil ] |
|
1446 |
argument: self pathHolder. |
|
1447 |
||
1448 |
builder aspectAt:#doAcceptEnabled put:holder. |
|
1449 |
]. |
|
1450 |
^ holder. |
|
1451 |
||
1452 |
"Modified: / 10-08-2012 / 18:56:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1453 |
! |
|
1454 |
||
1455 |
enabledHolder |
|
1456 |
<resource: #uiAspect> |
|
1457 |
||
1458 |
"automatically generated by UIPainter ..." |
|
1459 |
||
1460 |
"*** the code below creates a default model when invoked." |
|
1461 |
"*** (which may not be the one you wanted)" |
|
1462 |
"*** Please change as required and accept it in the browser." |
|
1463 |
"*** (and replace this comment by something more useful ;-)" |
|
1464 |
||
1465 |
enabledHolder isNil ifTrue:[ |
|
1466 |
enabledHolder := true asValue. |
|
1467 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
1468 |
"/ enabledHolder addDependent:self. |
|
1469 |
"/ enabledHolder onChangeSend:#enabledHolderChanged to:self. |
|
1470 |
]. |
|
1471 |
^ enabledHolder. |
|
1472 |
! |
|
1473 |
||
1474 |
nameHolder |
|
1475 |
<resource: #uiAspect> |
|
1476 |
||
1477 |
"automatically generated by UIPainter ..." |
|
1478 |
||
1479 |
"*** the code below creates a default model when invoked." |
|
1480 |
"*** (which may not be the one you wanted)" |
|
1481 |
"*** Please change as required and accept it in the browser." |
|
1482 |
"*** (and replace this comment by something more useful ;-)" |
|
1483 |
||
1484 |
nameHolder isNil ifTrue:[ |
|
1485 |
nameHolder := ValueHolder new. |
|
1486 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
1487 |
"/ nameHolder addDependent:self. |
|
1488 |
"/ nameHolder onChangeSend:#nameHolderChanged to:self. |
|
1489 |
]. |
|
1490 |
^ nameHolder. |
|
1491 |
! |
|
1492 |
||
1493 |
pathHolder |
|
1494 |
<resource: #uiAspect> |
|
1495 |
||
1496 |
"automatically generated by UIPainter ..." |
|
1497 |
||
1498 |
"*** the code below creates a default model when invoked." |
|
1499 |
"*** (which may not be the one you wanted)" |
|
1500 |
"*** Please change as required and accept it in the browser." |
|
1501 |
"*** (and replace this comment by something more useful ;-)" |
|
1502 |
||
1503 |
pathHolder isNil ifTrue:[ |
|
1504 |
pathHolder := ValueHolder new. |
|
1505 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
1506 |
"/ pathHolder addDependent:self. |
|
1507 |
"/ pathHolder onChangeSend:#pathHolderChanged to:self. |
|
1508 |
]. |
|
1509 |
^ pathHolder. |
|
1510 |
! ! |
|
1511 |
||
1571 | 1512 |
!JavaSettingsApplication::PathEditor::PathElementList methodsFor:'accessing'! |
1513 |
||
1514 |
allElements |
|
1515 |
^self application pathListEffectiveHolder value |
|
1516 |
||
1517 |
"Created: / 30-07-2012 / 19:42:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1518 |
! |
|
1519 |
||
1520 |
userElements |
|
1521 |
^self application pathList |
|
1522 |
||
1523 |
"Created: / 30-07-2012 / 19:42:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1524 |
! ! |
|
1525 |
||
1590 | 1526 |
!JavaSettingsApplication::PathEditor::PathElementList methodsFor:'actions'! |
1527 |
||
1528 |
moveDown: item |
|
1529 |
| parent index tmp | |
|
1530 |
parent := item parent. |
|
1531 |
index := parent children indexOf: item. |
|
1532 |
index >= parent children size ifTrue: [ ^ self ]. |
|
1533 |
||
1534 |
tmp := parent children at: index + 1. |
|
1535 |
parent children at: index + 1 put: (parent children at: index). |
|
1536 |
parent children at: index put: tmp. |
|
1537 |
||
1538 |
tmp := self userElements at: index + 1. |
|
1539 |
self userElements at: index + 1 put: (self userElements at: index). |
|
1540 |
self userElements at: index put: tmp. |
|
1541 |
||
1542 |
parent childrenOrderChanged. |
|
1543 |
self application selectionHolder changed: #value |
|
1544 |
||
1545 |
"Created: / 10-08-2012 / 17:15:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1546 |
! |
|
1547 |
||
1548 |
moveUp: item |
|
1549 |
| parent index tmp | |
|
1550 |
parent := item parent. |
|
1551 |
index := parent children indexOf: item. |
|
1552 |
index < 1 ifTrue: [ ^ self ]. |
|
1553 |
||
1554 |
tmp := parent children at: index - 1. |
|
1555 |
parent children at: index - 1 put: (parent children at: index). |
|
1556 |
parent children at: index put: tmp. |
|
1557 |
||
1558 |
tmp := self userElements at: index - 1. |
|
1559 |
self userElements at: index - 1 put: (self userElements at: index). |
|
1560 |
self userElements at: index put: tmp. |
|
1561 |
||
1562 |
parent childrenOrderChanged. |
|
1563 |
self application selectionHolder changed: #value |
|
1564 |
||
1565 |
"Created: / 10-08-2012 / 17:05:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1566 |
! ! |
|
1567 |
||
1571 | 1568 |
!JavaSettingsApplication::PathEditor::PathElementList methodsFor:'building'! |
1569 |
||
1570 |
buildTree |
|
1571 |
| rt | |
|
1572 |
||
1573 |
rt := Category new |
|
1574 |
addIfNotNil: (self buildCategory: JavaPathElement originRelease); |
|
1575 |
addIfNotNil: (self buildCategory: JavaPathElement originPackage); |
|
1576 |
addIfNotNil: (self buildCategory: JavaPathElement originEnvironment); |
|
1577 |
addIfNotNil: (userCategory := self buildCategory: JavaPathElement originUser); |
|
1578 |
yourself. |
|
1579 |
userCategory expand. |
|
1580 |
self root: rt. |
|
1581 |
||
1582 |
"Created: / 30-07-2012 / 19:00:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1583 |
! ! |
|
1584 |
||
1585 |
!JavaSettingsApplication::PathEditor::PathElementList methodsFor:'building-private'! |
|
1561 | 1586 |
|
1587 |
buildCategory: origin |
|
1588 |
| cat elements | |
|
1589 |
||
1571 | 1590 |
elements := self elementsForOrigin: origin. |
1561 | 1591 |
(elements isEmptyOrNil and:[origin ~~ JavaPathElement originUser]) ifTrue:[ ^ nil ]. |
1571 | 1592 |
cat := Category new origin: origin. |
1593 |
cat children: (elements collect:[:e| (self buildElement: e) parent: cat]). |
|
1561 | 1594 |
^cat |
1595 |
||
1596 |
"Created: / 27-07-2012 / 18:26:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1597 |
! |
|
1598 |
||
1571 | 1599 |
buildElement: element |
1600 |
^Item new element: element. |
|
1561 | 1601 |
|
1571 | 1602 |
"Created: / 27-07-2012 / 18:46:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1561 | 1603 |
! |
1604 |
||
1571 | 1605 |
elementsForOrigin: origin |
1606 |
^origin == JavaPathElement originUser ifTrue:[ |
|
1607 |
self userElements |
|
1608 |
] ifFalse:[ |
|
1609 |
self allElements select:[:e|e origin = origin] |
|
1610 |
]. |
|
1561 | 1611 |
|
1571 | 1612 |
"Created: / 30-07-2012 / 19:42:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1561 | 1613 |
! ! |
1614 |
||
1571 | 1615 |
!JavaSettingsApplication::PathEditor::PathElementList methodsFor:'change & update'! |
1616 |
||
1617 |
updateAfterInsertAt: index |
|
1586
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1618 |
| el item | |
1571 | 1619 |
|
1620 |
el := self userElements at: index. |
|
1621 |
self assert: el origin = JavaPathElement originUser. |
|
1586
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1622 |
userCategory add: (item := self buildElement: el) beforeIndex: index. |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1623 |
item parent expand. |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1624 |
self application selectionHolder value: item. |
1571 | 1625 |
|
1626 |
"Created: / 30-07-2012 / 19:46:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1586
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1627 |
! |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1628 |
|
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1629 |
updateAfterRemoveFrom: start to: stop |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1630 |
|
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1631 |
userCategory removeFromIndex:start toIndex: stop |
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1632 |
|
45694b771d99
- JavaSettingsApplication improved (can add/remove paths)
vranyj1
parents:
1571
diff
changeset
|
1633 |
"Created: / 02-08-2012 / 09:56:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1571 | 1634 |
! ! |
1635 |
||
1636 |
!JavaSettingsApplication::PathEditor::PathElementList::Category methodsFor:'accessing'! |
|
1637 |
||
1638 |
element |
|
1639 |
^nil |
|
1640 |
||
1641 |
"Created: / 30-07-2012 / 19:15:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1642 |
! |
|
1561 | 1643 |
|
1644 |
label |
|
1645 |
label isNil ifTrue:[ |
|
1646 |
label := self originAsHumanReadableString asText allBold. |
|
1647 |
origin ~~ JavaPathElement originUser ifTrue:[ |
|
1648 |
label colorizeAllWith: Color gray |
|
1649 |
]. |
|
1650 |
]. |
|
1651 |
^label |
|
1652 |
||
1653 |
"Created: / 27-07-2012 / 18:21:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1654 |
! |
|
1655 |
||
1656 |
origin |
|
1657 |
^ origin |
|
1658 |
! |
|
1659 |
||
1660 |
origin:originId |
|
1661 |
origin := originId. |
|
1662 |
! |
|
1663 |
||
1664 |
originAsHumanReadableString |
|
1665 |
origin isNil ifTrue:[^self application resources string: 'Path']. |
|
1666 |
origin == JavaPathElement originRelease ifTrue:[^self application resources string: 'Java Runtime']. |
|
1667 |
origin == JavaPathElement originEnvironment ifTrue:[^self application resources string: 'System Environment']. |
|
1668 |
origin == JavaPathElement originPackage ifTrue:[^self application resources string: 'Package Defined']. |
|
1669 |
origin == JavaPathElement originUser ifTrue:[^self application resources string: 'User Defined']. |
|
1670 |
self error:'Invalid origin' |
|
1671 |
||
1672 |
"Created: / 27-07-2012 / 18:39:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1673 |
! ! |
|
1674 |
||
1571 | 1675 |
!JavaSettingsApplication::PathEditor::PathElementList::Category methodsFor:'adding & removing'! |
1561 | 1676 |
|
1677 |
addIfNotNil: childOrNil |
|
1678 |
childOrNil notNil ifTrue:[self add: childOrNil] |
|
1679 |
||
1680 |
"Created: / 27-07-2012 / 18:51:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1681 |
! ! |
|
1682 |
||
1571 | 1683 |
!JavaSettingsApplication::PathEditor::PathElementList::Category methodsFor:'testing'! |
1569 | 1684 |
|
1571 | 1685 |
isPathElementCategoryItem |
1686 |
^true |
|
1687 |
||
1688 |
"Created: / 30-07-2012 / 14:28:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1689 |
! |
|
1690 |
||
1691 |
isPathElementItem |
|
1692 |
^false |
|
1693 |
||
1694 |
"Created: / 30-07-2012 / 14:28:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1695 |
! ! |
|
1696 |
||
1697 |
!JavaSettingsApplication::PathEditor::PathElementList::Item methodsFor:'accessing'! |
|
1561 | 1698 |
|
1699 |
element |
|
1700 |
^ element |
|
1701 |
! |
|
1702 |
||
1703 |
element:something |
|
1704 |
element := something. |
|
1705 |
! |
|
1706 |
||
1569 | 1707 |
enabled |
1708 |
^element enabled |
|
1709 |
||
1710 |
"Created: / 30-07-2012 / 14:26:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1711 |
! |
|
1712 |
||
1713 |
enabled: aBoolean |
|
1714 |
element enabled: aBoolean |
|
1715 |
||
1716 |
"Created: / 30-07-2012 / 14:26:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1717 |
! |
|
1718 |
||
1719 |
icon |
|
1720 |
^element enabled ifTrue:[ |
|
1721 |
MenuPanel iconIndicationOn |
|
1722 |
] ifFalse:[ |
|
1723 |
MenuPanel iconIndicationOff |
|
1724 |
]. |
|
1725 |
||
1726 |
"Created: / 30-07-2012 / 14:11:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1727 |
! |
|
1728 |
||
1561 | 1729 |
label |
1730 |
| label | |
|
1592 | 1731 |
label := element name asText. |
1561 | 1732 |
self origin ~~ JavaPathElement originUser ifTrue:[ |
1733 |
label colorizeAllWith: Color gray |
|
1734 |
]. |
|
1735 |
^label |
|
1736 |
||
1737 |
"Created: / 27-07-2012 / 18:42:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1738 |
! |
|
1739 |
||
1740 |
origin |
|
1741 |
^element origin |
|
1742 |
||
1743 |
"Created: / 27-07-2012 / 18:41:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1571 | 1744 |
! |
1745 |
||
1746 |
x |
|
1747 |
^ x |
|
1558 | 1748 |
! ! |
1749 |
||
1571 | 1750 |
!JavaSettingsApplication::PathEditor::PathElementList::Item methodsFor:'displaying'! |
1569 | 1751 |
|
1752 |
__displayLabel:aLabel h:lH on:aGC x:newX y:y h:h |
|
1753 |
||
1754 |
| l w | |
|
1755 |
||
1756 |
l := self label. |
|
1757 |
x := newX. |
|
1758 |
[ |
|
1759 |
w := l widthOn: aGC. |
|
1760 |
w > (aGC width - x) |
|
1761 |
] whileTrue:[ |
|
1762 |
l := '...' , (l copyFrom: 9). |
|
1763 |
]. |
|
1764 |
||
1765 |
super displayLabel:l h:h on:aGC x:newX y:y h:h. |
|
1766 |
||
1767 |
"Created: / 30-07-2012 / 14:18:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1768 |
! |
|
1769 |
||
1770 |
displayLabel:aLabel h:lH on:aGC x:newX y:y h:h |
|
1771 |
x := newX. |
|
1772 |
super displayLabel:aLabel h:lH on:aGC x:newX y:y h:h. |
|
1773 |
||
1774 |
"Created: / 30-07-2012 / 14:23:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1775 |
! ! |
|
1776 |
||
1571 | 1777 |
!JavaSettingsApplication::PathEditor::PathElementList::Item methodsFor:'testing'! |
1569 | 1778 |
|
1779 |
isPathElementCategoryItem |
|
1780 |
^false |
|
1781 |
||
1782 |
"Created: / 30-07-2012 / 14:28:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1783 |
! |
|
1784 |
||
1785 |
isPathElementItem |
|
1786 |
^true |
|
1787 |
||
1788 |
"Created: / 30-07-2012 / 14:28:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1789 |
! ! |
|
1790 |
||
1530 | 1791 |
!JavaSettingsApplication class methodsFor:'documentation'! |
1792 |
||
1793 |
version_SVN |
|
1794 |
^ '$Id:: $' |
|
1795 |
! ! |
|
1796 |
||
1797 |
JavaSettingsApplication initialize! |