- JavaSettingsApplication
class definition
added:
#javaSourcePathHolder
#javaSourcePathHolder:
changed:
#updatePaths
#windowSpec
"{ Package: 'stx:libjava/tools' }"
AbstractSettingsApplication subclass:#JavaSettingsApplication
instanceVariableNames:'javaReleaseHolder javaReleaseList javaHomeHolder
javaReleaseIsCustomHolder javaClassPathHolder
javaSourcePathHolder'
classVariableNames:''
poolDictionaries:''
category:'Languages-Java-Tools'
!
ApplicationModel subclass:#PathEditor
instanceVariableNames:'pathHolder selectionHolder treeList treeView'
classVariableNames:''
poolDictionaries:''
privateIn:JavaSettingsApplication
!
HierarchicalItem subclass:#PathElementCategoryItem
instanceVariableNames:'origin label'
classVariableNames:''
poolDictionaries:''
privateIn:JavaSettingsApplication::PathEditor
!
HierarchicalItem subclass:#PathElementItem
instanceVariableNames:'element x'
classVariableNames:''
poolDictionaries:''
privateIn:JavaSettingsApplication::PathEditor
!
!JavaSettingsApplication class methodsFor:'initialization'!
initialize
self installInSettings
"Created: / 23-06-2005 / 09:27:10 / masca"
!
installInSettings
Smalltalk addStartBlock:[
AbstractLauncherApplication
addSettingsApplicationByClass:self name withName:'Java' icon:self defaultIcon
]
"Created: / 23-06-2005 / 09:27:10 / masca"
"Modified: / 19-07-2012 / 11:26:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaSettingsApplication class methodsFor:'image specs'!
defaultIcon
^ self libjavaCupIconInTree
"Created: / 19-07-2012 / 11:26:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
libjavaCupIcon
"This resource specification was automatically generated
by the ImageEditor of ST/X."
"Do not manually edit this!! If it is corrupted,
the ImageEditor may not be able to read the specification."
"
self libjavaCupIcon inspect
ImageEditor openOnClass:self andSelector:#libjavaCupIcon
Icon flushCachedIcons
"
<resource: #image>
^Icon
constantNamed:'JavaSettingsApplication libjavaCupIcon'
ifAbsentPut:[(Depth24Image new) width: 66; height: 66; photometric:(#rgb); bitsPerSample:(#(8 8 8)); samplesPerPixel:(3); bits:(ByteArray fromPackedString:'
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
?????????????????????????????????_O)?/_1????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
?????????????????????????????????????????????????????????/+7<+E4????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????:8X(?/#2????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????:(D >MZ6????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
??????????;>:G\N=\FQ????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
?????????????????????????????????N7_96<@<;*D????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????=\FQ96<@=,&_????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????????;=:8 ,96<@>>#W????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????=,"]96<@:8$.????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
?N/\:G\N96<@=,&_????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
?????????????????????_G'':(L$96<@:8X)??7;????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
?????????????????????????????????????????_G'':(P%96<@97DC>.GJ????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
?????????????????????????????????????????????????????????????OC$;H,196<@96<@<;"A????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????>.KL:W8Z96<@96<@;99T??;>????????????????
?????????????????_W.????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????=<6'':GTJ96<@96<@;))M
?//8????????????????????????>>[S<;Y>=\JS?_W.????????????????????????????????????????????????????????????????????????????
?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????/39
<Z5.96<@96<@96<@;95R?/39?????????????????/''5=\VY;H,2;Y@;>>WQ????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
?????????????????_K(;I@:96<@96<@96<@<*90??7<?????????????/39=\NT:''8[:GPH=\FR??7<????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
?????????????????????????????????????N+Z:(L#96<@96<@97DC=\NT????????????????>]&;:(H!!96<@:8 ->>''X????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????>.GJ:W,U96<@96<@:GXL>MV4??????????????7;<;U<97@B96<@;:AW?/#2????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????>>SP:W$Q96<@96<@:GXL>-?F?????????????//8;)%J
96<@96<@<Z-+??;>????????????????????????????????????????????????????????????????????????????????????????????????????????
?????????????????????????????????????????????????????????????????????????????????????????????????/_0:(H"96<@96<@97DD>]":
??????????????;>;)1O96<@96<@<Z))??;>????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
<Z-*96<@96<@96<@=K.F????????????????=\FQ96<@96<@;H04??7<????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
?????????????????????_W.:GLG96<@96<@:(L$??7;?????????????/''5:W$Q96<@96<@==F-????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????>M^896<@96<@96<@=\BP????????????????=,2$96<@96<@96<@?_K(????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????>MR296<@96<@96<@>>#V????????????????<;Q;96<@96<@96<@
>>_T????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
?????????????????????????????????????????????????????????????????????????????????????????????OC$96<@96<@96<@?/#2????????
????????<Z-+96<@96<@96<@<;"B????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
:8 -96<@96<@?OC$????????????????=\NT96<@96<@96<@:W$Q?_O*????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????=<6&96<@96<@==F.????????????????>>[R96<@96<@96<@96<@<J]$????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????7<;H8796<@;))M????????????????????;)]F96<@96<@96<@96<@=<:)????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
?????????????????????????????????????????????????????????????????????????????N3^:G\N96<@>.KL????????????????>].?97@B96<@
96<@96<@:W0W?/_0????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????=<6''97@A;)]G??;>
????????????????<;Q;96<@96<@96<@96<@=K6K????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????=\VX96<@=\VY??????????????????7;;I@:96<@96<@96<@;91P????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????<;]?:W P?N?#????????????????>>#W:GLG96<@96<@;9=U????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????=\RW;YH>??7<????????????????;))M96<@96<@=<:(????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????=\NT=,&_????????????????
<*9096<@:(L$?/+7????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????>]*=?/''5????????????;99S:GPH>.KK????????????????????????????????????????9.713M+#2-#"9>72????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????>O+;6NO*-\''V*LCO2-#"
:^?3??????????????????????????????;=?????????_G'':W0W>].?????????????????????????????????????9.71);?O+LOR$J?CV8"%T8J!!_*F9
7>#.????????????????????????????????????????????????????????????????????????????????????????????????????????????:?G4+<WT
]Y.4W(*''$;GD3M+#>/3<??????????????????????????????????????????????;><;"A>>#W????????????????????????????????????????????
????????????=/#:"**?T8J!!V(^%6^O*????????????????????????????????????????????????????????????????????????????????????????
????????5>K)"Z&>UXN"T8J!!''[_I=O_9?????????????????????????????????????????????????????????/_1??7<????????????????????????
????????>O+;9^31?/??????????????????????>/3<ZYJ-T8J!![)Z0?/??????????????????????????????????????????????????????????????
????????????????????????????.<7ZUHJ!!T8J!!T8J!!T8J!!,L[T;/O6????????????????????????????????????????????????????????????????
=?'';8.+/3]/$.,7Y)[;N$Z?C_JB7Z)N.'';''J<?[8????????????????????????????);?OT8J!!T8J!!7._-????????????????????????????????????
????????????????????????????????????????????????????8^''. JN:UXN"T8J!!T8J!!T8J!!T8J!!ZYJ-^Y:6!!ZZ<$J?C&KSG&KSG&KSG&KSG%;SF#J3@
!!ZZ<_:J9]Y.3Z)N.XH.(U(R"T8J!!T8J!!T8J!!U8V#\9*3%KGD-L''V9^31????????????????????????????????????-\+WT8J!!T8J!!4=?''????????????
????????????????????????????????????????????????????????????????????????????????????<_W72=''#*<KQ&+WH"Z&>^):6Z)N.W(*''W(*''
VHZ$T8J!!T8J!!T8J!!UHJ!!W(*''XH2(Z)N.[YV/_ZF8$+CC)K7M-\+W2-#"7>_-?O7=????????????????????????????????????????????????????%+OF
T8J!!UHJ!!<OS7????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????<_W7WH"&T8J!!"Z&>????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????=O_9????????????????????????????????????????????????????????????????????????????????
?????????????????????????????????????/??":/@T8J!!XX2):^?3????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????:N;2"**?.,7Y????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????([/LT8J!!XH2(6>W+????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????8>/0WH"&T8J!!);?O>/3<????????????????????????????
????????????????????????????>O+;7N[,/-C\(+/L4-?''????????????????????????????>/3<$+CDT8J!!^I65:N;2????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????5NC''UHJ!!T8J!!T8J!!VHZ$]925
!!*^=$Z?C''[_I*LCO+<WS+<WS+<WS+<WS*LCO&;[H#*7A JJ9ZYJ-UHJ!!T8J!!T8J!!T8J!!UXN"''K_I;/O6????????????????8^''/\)&2Z9R.0MG\?/??????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????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
#J/@3M+#?/;>????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????<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=????????
????????????????6^O*>O+;????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
?????????????????????????????????????????????????????????????????????????????????????????????O7=????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????5>K)!!JZ<;_K5
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????4M7%UHJ!!T8J!!"**?0-K]8.+/<OS7?_;>?????????????????????/;>;/O66.S+/,?[(;3M"J&>,,_U>/3<????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????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
;?S7????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????4-?'']).4T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!
T8J!!T8J!!T8J!!UHN"_ZB8/=C\>O+;????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????;/O64-;&1=[ 1-W =O_9????????????????8^''.+\OR!!JZ<XH.(T8J!!T8J!!T8J!!
T8J!!T8J!!T8J!!T8J!!T8J!!XH2(_ZF8&+WH1]W_</W8????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????9^31'';''K[)Z0]).4+,SS6.S+=/'':????????????????????????
????????????=_#98N#.7^[,7^[,7^[,7>#.;_K5>/3<????????????????????????????????????????????????????????????????????5^C(=?'';
????????????????????????????????????????????????????????????????????????????????????9^31!!*^=UHJ!!]Y.36>W+????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????''[#J1-W ????????????????????????????????????????????????????????????????????????????????0MG\U8V#T8J!!T8J!!
+,SS????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????>_/<2=''# :V;#J3@>//<????????????????????????????????????????????????????????????????????????
????????^Y66T8J!!T8J!!T8J!!T8J!![)Z0(;3M2=''#;OG5?/??????????????????????????????????????????????????????????????????????????
????????????????????????????????</W86>W+1MS_(K+K^Y66WH"&#J/@5^G(?????????????_;>=O_9????????????????????????????????????
????????????????????????????????9>;2%[KEYH:*T8J!!T8J!!T8J!!T8J!!T8J!!T8J!!VHZ$[9^0"J">''+#J*\GP-L''V0MG\2-''"4];&4];&4];&4];&4];&
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????????????
????????????????????????????????????????????????????????????????????;_K55NC''/L;[)[7N#J3@]925YX>+U(R"T8J!!T8J!!T8J!!T8J!!T8J!!
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/@
XX2)5NC''????????????????????????????????????????????????????????????????????????????????????????????????????????????????
?/??;?O67>_-4];&1-[ /L;[,,_U*LCO(;3M(;3M(;3M(;3M(;3M)+;N+<WS,\_U/,?[2-#"5.G)8.+/</W8?????????????????????????????????/??
9^310]K]$+CCXX2)U8V#%[KE:?C4????????????????????????????????????????????????????????????????????????????????????????????
?????????????????/??7>#.;_K5?/;>????????????????????????????????????????????????????????????????????????????????????????
</W85>K).,7Y''K_I_*F9WX&''T8J!!UHN"]925+\OR;?O6????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????=O_9.,7Y&KSG"**? JN:$Z?C([/L(;3M);?O+<WS+<WS.L3X.,7Y.,7Y.,7Y.,7Y.,7Y-</X*<KQ
(K+K%KKE"**?^):6ZIF,VHV$T8J!!T8J!!WX&''\9&2$+CC,<#U4=?''=O_9????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????<OS78^''.3-3$/=C\+<WT*,GQ(;3M&+WH
&KSG&KSG&KSG&KSG&KSG&KSG&KSG(;3M+\OR-\''V/,?[3=3%8>+0=?'';????????????????????????????????????????????????????????????????
????????????????????????') ; yourself]
!
libjavaCupIconInTree
"This resource specification was automatically generated
by the ImageEditor of ST/X."
"Do not manually edit this!! If it is corrupted,
the ImageEditor may not be able to read the specification."
"
self libjavaCupIconInTree inspect
ImageEditor openOnClass:self andSelector:#libjavaCupIconInTree
Icon flushCachedIcons
"
<resource: #image>
^Icon
constantNamed:'JavaSettingsApplication libjavaCupIconInTree'
ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
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<_
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<_
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<_
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<_
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
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]
! !
!JavaSettingsApplication class methodsFor:'interface opening'!
open
| settingsApp |
settingsApp := SettingsDialog new.
settingsApp addApplClass:self fullName
withName:'Java'.
settingsApp showRoot: false.
settingsApp selectedItem value:
(settingsApp applicationList root children anyOne).
settingsApp open.
"Created: / 19-07-2012 / 11:25:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaSettingsApplication class methodsFor:'interface specs'!
windowSpec
"This resource specification was automatically generated
by the UIPainter of ST/X."
"Do not manually edit this!! If it is corrupted,
the UIPainter may not be able to read the specification."
"
UIPainter new openOnClass:JavaSettingsApplication andSelector:#windowSpec
JavaSettingsApplication new openInterface:#windowSpec
JavaSettingsApplication open
"
<resource: #canvas>
^
#(FullSpec
name: windowSpec
window:
(WindowSpec
label: 'Java Settings'
name: 'Java Settings'
min: (Point 10 10)
bounds: (Rectangle 0 0 695 627)
)
component:
(SpecCollection
collection: (
(LabelSpec
label: ' Java Settings'
name: 'SubVersiSettingsTitle'
layout: (LayoutFrame 0 0 0 0 0 1 66 0)
style: (FontDescription helvetica medium roman 18 #'iso10646-1')
backgroundColor: (Color 100.0 100.0 100.0)
translateLabel: true
adjust: left
)
(LabelSpec
label: 'Icon'
name: 'JavaIcon'
layout: (LayoutFrame -75 1 0 0 0 1 66 0)
hasCharacterOrientedLabel: false
backgroundColor: (Color 100.0 100.0 100.0)
translateLabel: true
labelChannel: libjavaCupIcon
)
(VerticalPanelViewSpec
name: 'Controls'
layout: (LayoutFrame 0 0 70 0 0 1 0 1)
horizontalLayout: fit
verticalLayout: topFit
horizontalSpace: 3
verticalSpace: 3
component:
(SpecCollection
collection: (
(FramedBoxSpec
label: 'Basic Settings'
name: 'JavaReleasePanel'
labelPosition: topLeft
translateLabel: true
component:
(SpecCollection
collection: (
(ComboListSpec
name: 'ReleaseList'
layout: (LayoutFrame 100 0 0 0 0 1 25 0)
model: javaReleaseHolder
comboList: javaReleaseList
useIndex: false
)
(LabelSpec
label: 'Release:'
name: 'ReleaseLabel'
layout: (LayoutFrame 0 0 0 0 100 0 25 0)
translateLabel: true
adjust: left
)
(LabelSpec
label: 'JAVA_HOME'
name: 'JAVA_HOME_Label'
layout: (LayoutFrame 0 0 30 0 100 0 55 0)
translateLabel: true
adjust: left
)
(FilenameInputFieldSpec
name: 'JAVA_HOME'
layout: (LayoutFrame 100 0 30 0 -55 1 55 0)
enableChannel: javaReleaseIsCustomHolder
model: javaHomeHolder
acceptOnPointerLeave: true
)
(ActionButtonSpec
label: 'Browse'
name: 'JAVA_HOME_Browse'
layout: (LayoutFrame -50 1 30 0 0 1 55 0)
translateLabel: true
model: doBrowseJavaHome
enableChannel: javaReleaseIsCustomHolder
)
)
)
extent: (Point 695 95)
)
(VariableVerticalPanelSpec
name: 'VariableVerticalPanel1'
component:
(SpecCollection
collection: (
(FramedBoxSpec
label: 'Classpath'
name: 'ClasspathPanel'
labelPosition: topLeft
translateLabel: true
component:
(SpecCollection
collection: (
(SubCanvasSpec
name: 'SubCanvas1'
layout: (LayoutFrame 0 0 0 0 0 1 0 1)
level: 0
hasHorizontalScrollBar: false
hasVerticalScrollBar: false
majorKey: #'JavaSettingsApplication::PathEditor'
minorKey: windowSpec
subAspectHolders:
(Array
(SubChannelInfoSpec
subAspect: pathHolder
aspect: javaClassPathHolder
)
)
createNewApplication: true
createNewBuilder: true
)
)
)
)
(FramedBoxSpec
label: 'Sources'
name: 'SourcePathPanel'
labelPosition: topLeft
translateLabel: true
component:
(SpecCollection
collection: (
(SubCanvasSpec
name: 'SubCanvas2'
layout: (LayoutFrame 0 0 0 0 0 1 0 1)
level: 0
hasHorizontalScrollBar: false
hasVerticalScrollBar: false
majorKey: #'JavaSettingsApplication::PathEditor'
minorKey: windowSpec
subAspectHolders:
(Array
(SubChannelInfoSpec
subAspect: pathHolder
aspect: javaSourcePathHolder
)
)
createNewApplication: true
createNewBuilder: true
)
)
)
)
)
)
extent: (Point 695 459)
handles: (Any 0.5 1.0)
)
)
)
)
)
)
)
! !
!JavaSettingsApplication methodsFor:'actions'!
doBrowseJavaHome
<resource: #uiCallback>
| java_home |
java_home := Dialog requestDirectoryName:(resources string:'JAVA_HOME directory').
java_home notEmptyOrNil ifTrue:[
self javaHomeHolder value: java_home
]
"Modified: / 27-07-2012 / 00:20:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaSettingsApplication methodsFor:'aspects'!
javaClassPathHolder
"return/create the 'javaClassPathHolder' value holder (automatically generated)"
javaClassPathHolder isNil ifTrue:[
javaClassPathHolder := ValueHolder new.
].
^ javaClassPathHolder
!
javaClassPathHolder:something
"set the 'javaClassPathHolder' value holder (automatically generated)"
javaClassPathHolder := something.
!
javaHomeHolder
<resource: #uiAspect>
javaHomeHolder isNil ifTrue:[
javaHomeHolder := AspectAdaptor forAspect: #javaHome.
javaHomeHolder subjectChannel: self javaReleaseHolder.
javaHomeHolder onChangeSend:#updateModifiedChannel to:self
].
^ javaHomeHolder.
"Created: / 27-07-2012 / 00:06:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
javaReleaseHolder
<resource: #uiAspect>
javaReleaseHolder isNil ifTrue:[
javaReleaseHolder := Java release asValue.
javaReleaseHolder onChangeSend:#updateModifiedChannel to:self.
javaReleaseHolder onChangeSend:#updatePaths to:self.
].
^ javaReleaseHolder.
"Modified: / 27-07-2012 / 18:30:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
javaReleaseIsCustomHolder
<resource: #uiAspect>
javaReleaseIsCustomHolder isNil ifTrue:[
javaReleaseIsCustomHolder := AspectAdaptor forAspect: #isCustom.
javaReleaseIsCustomHolder subjectChannel: self javaReleaseHolder
].
^ javaReleaseIsCustomHolder.
"Created: / 27-07-2012 / 00:07:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
javaReleaseList
<resource: #uiAspect>
javaReleaseList isNil ifTrue:[
javaReleaseList := JavaRelease all asList
].
^ javaReleaseList.
"Modified: / 27-07-2012 / 00:13:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
javaSourcePathHolder
"return/create the 'javaClassPathHolder' value holder (automatically generated)"
javaSourcePathHolder isNil ifTrue:[
javaSourcePathHolder := ValueHolder new.
].
^ javaSourcePathHolder
!
javaSourcePathHolder:something
"set the 'javaClassPathHolder' value holder (automatically generated)"
javaSourcePathHolder := something.
"Created: / 30-07-2012 / 14:42:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaSettingsApplication methodsFor:'change & update'!
updatePaths
| release |
release := self javaReleaseHolder value.
release isNil ifTrue:[
self javaClassPathHolder value: #().
self javaSourcePathHolder value: #().
] ifFalse:[
self javaClassPathHolder value: (Java effectiveClassPathForRelease: release).
self javaSourcePathHolder value: (Java effectiveSourceDirectoriesForRelease: release).
]
"Created: / 27-07-2012 / 18:34:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaSettingsApplication methodsFor:'protocol'!
basicReadSettings
| rel |
rel := currentUserPrefs javaRelease.
(rel isNil and:[Java notNil]) ifTrue:[
rel := Java release
].
self javaReleaseHolder value: rel.
self updatePaths.
"Modified: / 27-07-2012 / 18:47:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
basicSaveSettings
self javaReleaseHolder value notNil ifTrue:[
currentUserPrefs javaReleaseSelector: self javaReleaseHolder value selector.
] ifFalse:[
currentUserPrefs javaReleaseSelector: nil.
]
"Modified: / 27-07-2012 / 10:17:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
helpFilename
"subclasses must return the relative name of a helpFile
in the doc/online/<language>/help directory.
Or nil, if no help is available."
^ '../programming/java-settings.html'
"Modified: / 26-07-2012 / 23:05:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaSettingsApplication methodsFor:'queries'!
hasUnsavedChanges
"superclass AbstractSettingsApplication says that I am responsible to implement this method"
| prefRel setRel |
prefRel := currentUserPrefs javaRelease.
setRel := self javaReleaseHolder value.
prefRel ~~ setRel ifTrue:[ ^ true ].
^false
"Modified: / 27-07-2012 / 17:55:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaSettingsApplication::PathEditor class methodsFor:'plugIn spec'!
aspectSelectors
"This resource specification was automatically generated
by the UIPainter of ST/X."
"Do not manually edit this. If it is corrupted,
the UIPainter may not be able to read the specification."
"Return a description of exported aspects;
these can be connected to aspects of an embedding application
(if this app is embedded in a subCanvas)."
^ #(
#pathHolder
#selectionHolder
).
! !
!JavaSettingsApplication::PathEditor methodsFor:'actions'!
actionAdd
<resource: #uiCallback>
"automatically generated by UIPainter..."
"*** the code below performs no action"
"*** (except for some feedback on the Transcript)"
"*** Please change as required and accept in the browser."
"*** (and replace this comment by something more useful ;-)"
"action to be defined here..."
Transcript showCR:self class name, ': action for actionAdd ...'.
!
actionEdit
<resource: #uiCallback>
"automatically generated by UIPainter..."
"*** the code below performs no action"
"*** (except for some feedback on the Transcript)"
"*** Please change as required and accept in the browser."
"*** (and replace this comment by something more useful ;-)"
"action to be defined here..."
Transcript showCR:self class name, ': action for actionEdit ...'.
!
actionMoveDown
<resource: #uiCallback>
"automatically generated by UIPainter..."
"*** the code below performs no action"
"*** (except for some feedback on the Transcript)"
"*** Please change as required and accept in the browser."
"*** (and replace this comment by something more useful ;-)"
"action to be defined here..."
Transcript showCR:self class name, ': action for actionMoveDown ...'.
!
actionMoveUp
<resource: #uiCallback>
"automatically generated by UIPainter..."
"*** the code below performs no action"
"*** (except for some feedback on the Transcript)"
"*** Please change as required and accept in the browser."
"*** (and replace this comment by something more useful ;-)"
"action to be defined here..."
Transcript showCR:self class name, ': action for actionMoveUp ...'.
!
actionRemove
<resource: #uiCallback>
"automatically generated by UIPainter..."
"*** the code below performs no action"
"*** (except for some feedback on the Transcript)"
"*** Please change as required and accept in the browser."
"*** (and replace this comment by something more useful ;-)"
"action to be defined here..."
Transcript showCR:self class name, ': action for actionRemove ...'.
!
doAdd
<resource: #uiCallback>
"automatically generated by UIPainter..."
"*** the code below performs no action"
"*** (except for some feedback on the Transcript)"
"*** Please change as required and accept in the browser."
"*** (and replace this comment by something more useful ;-)"
"action to be defined here..."
Transcript showCR:self class name, ': action for doAdd ...'.
! !
!JavaSettingsApplication::PathEditor methodsFor:'aspects'!
pathHolder
"return/create the 'pathHolder' value holder (automatically generated)"
pathHolder isNil ifTrue:[
pathHolder := ValueHolder new.
pathHolder addDependent:self.
].
^ pathHolder
!
pathHolder:something
"set the 'pathHolder' value holder (automatically generated)"
|oldValue newValue|
pathHolder notNil ifTrue:[
oldValue := pathHolder value.
pathHolder removeDependent:self.
].
pathHolder := something.
pathHolder notNil ifTrue:[
pathHolder addDependent:self.
].
newValue := pathHolder value.
oldValue ~~ newValue ifTrue:[
self update:#value with:newValue from:pathHolder.
].
!
selectionHolder
"return/create the 'selectionHolder' value holder (automatically generated)"
selectionHolder isNil ifTrue:[
selectionHolder := ValueHolder new.
].
^ selectionHolder
!
selectionHolder:something
"set the 'selectionHolder' value holder (automatically generated)"
selectionHolder := something.
!
treeList
treeList isNil ifTrue:[
treeList := HierarchicalList new.
treeList application: self.
treeList showRoot: false.
treeList root: self buildCategoryRoot.
].
^treeList
"Created: / 27-07-2012 / 18:36:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaSettingsApplication::PathEditor methodsFor:'change & update'!
update:something with:aParameter from:changedObject
"Invoked when an object that I depend upon sends a change notification."
"stub code automatically generated - please change as required"
changedObject == pathHolder ifTrue:[
self updateTree.
^ self.
].
super update:something with:aParameter from:changedObject
"Modified: / 27-07-2012 / 18:16:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
updateTree
self treeList root: (self buildCategoryRoot)
"Created: / 27-07-2012 / 18:16:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaSettingsApplication::PathEditor methodsFor:'hooks'!
postBuildTreeView: aView
treeView := aView.
treeView scrolledView delegate: self.
"Created: / 29-11-2011 / 14:56:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaSettingsApplication::PathEditor methodsFor:'private-tree'!
buildCategory: origin
| cat elements |
elements := (self pathHolder value ? #()) select:[:el|el origin = origin].
(elements isEmptyOrNil and:[origin ~~ JavaPathElement originUser]) ifTrue:[ ^ nil ].
cat := PathElementCategoryItem new origin: origin.
elements do:[:el|
cat add: (self buildElement: el).
].
^cat
"Created: / 27-07-2012 / 18:26:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
buildCategoryRoot
| root user |
root := PathElementCategoryItem new
addIfNotNil: (self buildCategory: JavaPathElement originRelease);
addIfNotNil: (self buildCategory: JavaPathElement originPackage);
addIfNotNil: (self buildCategory: JavaPathElement originEnvironment);
addIfNotNil: (user := self buildCategory: JavaPathElement originUser);
yourself.
user expand.
^root
"Created: / 27-07-2012 / 18:23:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
buildElement: element
^PathElementItem new element: element.
"Created: / 27-07-2012 / 18:46:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaSettingsApplication::PathEditor::PathElementCategoryItem methodsFor:'accessing'!
label
label isNil ifTrue:[
label := self originAsHumanReadableString asText allBold.
origin ~~ JavaPathElement originUser ifTrue:[
label colorizeAllWith: Color gray
].
].
^label
"Created: / 27-07-2012 / 18:21:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
origin
^ origin
!
origin:originId
origin := originId.
!
originAsHumanReadableString
origin isNil ifTrue:[^self application resources string: 'Path'].
origin == JavaPathElement originRelease ifTrue:[^self application resources string: 'Java Runtime'].
origin == JavaPathElement originEnvironment ifTrue:[^self application resources string: 'System Environment'].
origin == JavaPathElement originPackage ifTrue:[^self application resources string: 'Package Defined'].
origin == JavaPathElement originUser ifTrue:[^self application resources string: 'User Defined'].
self error:'Invalid origin'
"Created: / 27-07-2012 / 18:39:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaSettingsApplication::PathEditor::PathElementCategoryItem methodsFor:'adding & removing'!
addIfNotNil: childOrNil
childOrNil notNil ifTrue:[self add: childOrNil]
"Created: / 27-07-2012 / 18:51:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaSettingsApplication::PathEditor::PathElementItem methodsFor:'accessing'!
element
^ element
!
element:something
element := something.
!
enabled
^element enabled
"Created: / 30-07-2012 / 14:26:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
enabled: aBoolean
element enabled: aBoolean
"Created: / 30-07-2012 / 14:26:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
icon
^element enabled ifTrue:[
MenuPanel iconIndicationOn
] ifFalse:[
MenuPanel iconIndicationOff
].
"Created: / 30-07-2012 / 14:11:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
label
| label |
label := element pathName asText.
self origin ~~ JavaPathElement originUser ifTrue:[
label colorizeAllWith: Color gray
].
^label
"Created: / 27-07-2012 / 18:42:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
origin
^element origin
"Created: / 27-07-2012 / 18:41:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaSettingsApplication::PathEditor::PathElementItem methodsFor:'displaying'!
__displayLabel:aLabel h:lH on:aGC x:newX y:y h:h
| l w |
l := self label.
x := newX.
[
w := l widthOn: aGC.
w > (aGC width - x)
] whileTrue:[
l := '...' , (l copyFrom: 9).
].
super displayLabel:l h:h on:aGC x:newX y:y h:h.
"Created: / 30-07-2012 / 14:18:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
displayLabel:aLabel h:lH on:aGC x:newX y:y h:h
x := newX.
super displayLabel:aLabel h:lH on:aGC x:newX y:y h:h.
"Created: / 30-07-2012 / 14:23:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaSettingsApplication::PathEditor::PathElementItem methodsFor:'testing'!
isPathElementCategoryItem
^false
"Created: / 30-07-2012 / 14:28:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
isPathElementItem
^true
"Created: / 30-07-2012 / 14:28:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaSettingsApplication class methodsFor:'documentation'!
version_SVN
^ '$Id:: $'
! !
JavaSettingsApplication initialize!