10798
|
1 |
"{ Package: 'stx:libtool' }"
|
|
2 |
|
|
3 |
"{ NameSpace: Tools }"
|
|
4 |
|
|
5 |
ApplicationModel subclass:#SourceCodeManagerConfigurationTestTool
|
|
6 |
instanceVariableNames:'resultView packageView'
|
|
7 |
classVariableNames:''
|
|
8 |
poolDictionaries:''
|
|
9 |
category:'System-SourceCodeManagement'
|
|
10 |
!
|
|
11 |
|
|
12 |
|
|
13 |
!SourceCodeManagerConfigurationTestTool class methodsFor:'interface specs'!
|
|
14 |
|
|
15 |
windowSpec
|
|
16 |
"This resource specification was automatically generated
|
|
17 |
by the UIPainter of ST/X."
|
|
18 |
|
|
19 |
"Do not manually edit this!! If it is corrupted,
|
|
20 |
the UIPainter may not be able to read the specification."
|
|
21 |
|
|
22 |
"
|
|
23 |
UIPainter new openOnClass:Tools::SourceCodeManagerConfigurationTestTool andSelector:#windowSpec
|
|
24 |
Tools::SourceCodeManagerConfigurationTestTool new openInterface:#windowSpec
|
|
25 |
Tools::SourceCodeManagerConfigurationTestTool open
|
|
26 |
"
|
|
27 |
|
|
28 |
<resource: #canvas>
|
|
29 |
|
|
30 |
^
|
|
31 |
#(FullSpec
|
|
32 |
name: windowSpec
|
|
33 |
window:
|
|
34 |
(WindowSpec
|
|
35 |
label: 'Source Code Management Configuration Test Tool'
|
|
36 |
name: 'Source Code Management Configuration Test Tool'
|
|
37 |
min: (Point 10 10)
|
|
38 |
bounds: (Rectangle 0 0 579 382)
|
|
39 |
)
|
|
40 |
component:
|
|
41 |
(SpecCollection
|
|
42 |
collection: (
|
|
43 |
(ViewSpec
|
|
44 |
name: 'Box1'
|
|
45 |
layout: (LayoutFrame 3 0 3 0 -3 1 -30 1)
|
|
46 |
component:
|
|
47 |
(SpecCollection
|
|
48 |
collection: (
|
|
49 |
(LabelSpec
|
|
50 |
label: 'Enter package name and press test'
|
|
51 |
name: 'Label1'
|
|
52 |
layout: (LayoutFrame 0 0 0 0 0 1 30 0)
|
|
53 |
translateLabel: true
|
|
54 |
adjust: left
|
|
55 |
)
|
|
56 |
(InputFieldSpec
|
|
57 |
name: 'Package'
|
|
58 |
layout: (LayoutFrame 0 0 30 0 -60 1 55 0)
|
|
59 |
model: packageHolder
|
|
60 |
immediateAccept: false
|
|
61 |
acceptOnLeave: false
|
|
62 |
acceptOnReturn: true
|
|
63 |
acceptOnTab: false
|
|
64 |
acceptOnPointerLeave: false
|
|
65 |
acceptIfUnchanged: true
|
|
66 |
valueChangeCallBackSelector: doTest
|
|
67 |
postBuildCallback: postBuildPackageView:
|
|
68 |
)
|
|
69 |
(ActionButtonSpec
|
|
70 |
label: 'Test'
|
|
71 |
name: 'Button2'
|
|
72 |
layout: (LayoutFrame -59 1 30 0 0 1 55 0)
|
|
73 |
translateLabel: true
|
|
74 |
model: doTest
|
|
75 |
)
|
|
76 |
(TextEditorSpec
|
|
77 |
name: 'Result'
|
|
78 |
layout: (LayoutFrame 0 0 70 0 0 1 0 1)
|
|
79 |
hasHorizontalScrollBar: true
|
|
80 |
hasVerticalScrollBar: true
|
|
81 |
hasKeyboardFocusInitially: false
|
|
82 |
viewClassName: 'TextCollector'
|
|
83 |
postBuildCallback: postBuildResultView:
|
|
84 |
)
|
|
85 |
)
|
|
86 |
|
|
87 |
)
|
|
88 |
)
|
|
89 |
(ActionButtonSpec
|
|
90 |
label: 'Close'
|
|
91 |
name: 'Button1'
|
|
92 |
layout: (LayoutFrame 3 0 -27 1 -3 1 0 1)
|
|
93 |
translateLabel: true
|
|
94 |
model: doClose
|
|
95 |
)
|
|
96 |
)
|
|
97 |
|
|
98 |
)
|
|
99 |
)
|
|
100 |
! !
|
|
101 |
|
|
102 |
!SourceCodeManagerConfigurationTestTool methodsFor:'actions'!
|
|
103 |
|
|
104 |
doClose
|
|
105 |
<resource: #uiCallback>
|
|
106 |
|
|
107 |
self closeRequest
|
|
108 |
|
|
109 |
"Modified: / 10-10-2011 / 19:16:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
110 |
!
|
|
111 |
|
|
112 |
doTest
|
|
113 |
<resource: #uiCallback>
|
10813
|
114 |
|pkg mgr line|
|
10798
|
115 |
|
10813
|
116 |
packageView isNil ifTrue:[
|
|
117 |
^ self
|
|
118 |
].
|
10798
|
119 |
pkg := packageView contents.
|
10813
|
120 |
pkg ifNil:[^ self].
|
|
121 |
mgr := AbstractSourceCodeManager managerForPackage:pkg.
|
10798
|
122 |
line := '%1 -> %2, %3'
|
10813
|
123 |
bindWith:pkg
|
|
124 |
with:mgr managerTypeNameShort
|
|
125 |
with:(mgr repositoryNameForPackage:pkg).
|
|
126 |
resultView showCR:line
|
10798
|
127 |
|
|
128 |
"Modified: / 11-10-2011 / 08:58:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
129 |
! !
|
|
130 |
|
|
131 |
!SourceCodeManagerConfigurationTestTool methodsFor:'aspects'!
|
|
132 |
|
|
133 |
packageHolder
|
|
134 |
|
|
135 |
^ValueHolder new
|
|
136 |
|
|
137 |
"Created: / 11-10-2011 / 09:00:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
138 |
! !
|
|
139 |
|
|
140 |
!SourceCodeManagerConfigurationTestTool methodsFor:'callbacks'!
|
|
141 |
|
|
142 |
postBuildPackageView: aView
|
|
143 |
|
|
144 |
packageView := aView
|
|
145 |
|
|
146 |
"Created: / 11-10-2011 / 08:57:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
147 |
!
|
|
148 |
|
|
149 |
postBuildResultView: aView
|
|
150 |
|
|
151 |
resultView := aView
|
|
152 |
|
|
153 |
"Created: / 10-10-2011 / 19:21:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
154 |
! !
|
|
155 |
|
|
156 |
!SourceCodeManagerConfigurationTestTool class methodsFor:'documentation'!
|
|
157 |
|
|
158 |
version
|
10813
|
159 |
^ '$Header: /cvs/stx/stx/libtool/Tools__SourceCodeManagerConfigurationTestTool.st,v 1.2 2011-10-12 21:10:19 vrany Exp $'
|
10798
|
160 |
!
|
|
161 |
|
|
162 |
version_CVS
|
10813
|
163 |
^ '$Header: /cvs/stx/stx/libtool/Tools__SourceCodeManagerConfigurationTestTool.st,v 1.2 2011-10-12 21:10:19 vrany Exp $'
|
10798
|
164 |
! !
|