author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Thu, 25 Jul 2013 17:27:45 +0100 | |
changeset 40 | 85eaf579889b |
parent 32 | 658f47bc231e |
child 41 | 6bbd154db308 |
permissions | -rw-r--r-- |
32
658f47bc231e
Code moved to package jv:smallsense
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
29
diff
changeset
|
1 |
"{ Package: 'jv:smallsense' }" |
11 | 2 |
|
3 |
AbstractSettingsApplication subclass:#SmallSenseSettingsAppl |
|
4 |
instanceVariableNames:'smallSenseBackgroundTypingEnabled smallSenseBackgroundLintEnabled |
|
5 |
smallSenseEnabled' |
|
6 |
classVariableNames:'' |
|
7 |
poolDictionaries:'' |
|
8 |
category:'SmallSense-Interface' |
|
9 |
! |
|
10 |
||
11 |
||
12 |
!SmallSenseSettingsAppl class methodsFor:'class initialization'! |
|
13 |
||
14 |
initialize |
|
15 |
||
12 | 16 |
Smalltalk addStartBlock:[ |
11 | 17 |
NewLauncher |
18 |
addSettingsApplicationByClass: self name |
|
19 |
withName: 'Tools/SmallSense' |
|
20 |
icon: nil. |
|
12 | 21 |
] |
11 | 22 |
|
23 |
"Created: / 04-02-2012 / 21:50:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
24 |
! ! |
|
25 |
||
26 |
!SmallSenseSettingsAppl class methodsFor:'help specs'! |
|
27 |
||
28 |
helpSpec |
|
29 |
"This resource specification was automatically generated |
|
30 |
by the UIHelpTool of ST/X." |
|
31 |
||
32 |
"Do not manually edit this!! If it is corrupted, |
|
33 |
the UIHelpTool may not be able to read the specification." |
|
34 |
||
35 |
" |
|
36 |
UIHelpTool openOnClass:SmallSenseSettingsAppl |
|
37 |
" |
|
38 |
||
39 |
<resource: #help> |
|
40 |
||
41 |
^ super helpSpec addPairsFrom:#( |
|
42 |
||
43 |
#smallSenseBackgroundLintEnabled |
|
44 |
'When enabled, a hints on code are shown based on static code analysis (SmallLint)' |
|
45 |
||
46 |
#smallSenseBackgroundTypingEnabled |
|
47 |
'When enabled, SmallSense run a type-inferencer on the code to give a more taccurate type hints and completion data' |
|
48 |
||
49 |
#smallSenseEnabled |
|
50 |
'Enable/Disable SmallSense support' |
|
51 |
||
52 |
) |
|
53 |
! ! |
|
54 |
||
55 |
!SmallSenseSettingsAppl class methodsFor:'interface specs'! |
|
56 |
||
57 |
windowSpec |
|
58 |
"This resource specification was automatically generated |
|
59 |
by the UIPainter of ST/X." |
|
60 |
||
61 |
"Do not manually edit this!! If it is corrupted, |
|
62 |
the UIPainter may not be able to read the specification." |
|
63 |
||
64 |
" |
|
65 |
UIPainter new openOnClass:SmallSenseSettingsAppl andSelector:#windowSpec |
|
66 |
SmallSenseSettingsAppl new openInterface:#windowSpec |
|
67 |
SmallSenseSettingsAppl open |
|
68 |
" |
|
69 |
||
70 |
<resource: #canvas> |
|
71 |
||
72 |
^ |
|
73 |
#(FullSpec |
|
74 |
name: windowSpec |
|
75 |
window: |
|
76 |
(WindowSpec |
|
77 |
label: 'SmallSense Settings' |
|
78 |
name: 'SmallSense Settings' |
|
79 |
min: (Point 10 10) |
|
80 |
bounds: (Rectangle 0 0 300 300) |
|
81 |
) |
|
82 |
component: |
|
83 |
(SpecCollection |
|
84 |
collection: ( |
|
85 |
(CheckBoxSpec |
|
86 |
label: 'Enable SmallSense ' |
|
87 |
name: 'Enable' |
|
88 |
layout: (LayoutFrame 0 0 0 0 0 1 30 0) |
|
89 |
activeHelpKey: smallSenseEnabled |
|
90 |
model: smallSenseEnabled |
|
91 |
translateLabel: true |
|
92 |
) |
|
93 |
(DividerSpec |
|
94 |
name: 'Separator' |
|
95 |
layout: (LayoutFrame 5 0 30 0 -5 1 34 0) |
|
96 |
) |
|
97 |
(VerticalPanelViewSpec |
|
98 |
name: 'Panel' |
|
99 |
layout: (LayoutFrame 0 0 37 0 0 1 0 1) |
|
100 |
horizontalLayout: fit |
|
101 |
verticalLayout: top |
|
102 |
horizontalSpace: 3 |
|
103 |
verticalSpace: 3 |
|
104 |
component: |
|
105 |
(SpecCollection |
|
106 |
collection: ( |
|
107 |
(CheckBoxSpec |
|
108 |
label: 'Enable Code Analysis (Lint)' |
|
109 |
name: 'LintEnabled' |
|
110 |
activeHelpKey: smallSenseBackgroundLintEnabled |
|
111 |
enableChannel: smallSenseEnabled |
|
112 |
model: smallSenseBackgroundLintEnabled |
|
113 |
translateLabel: true |
|
114 |
extent: (Point 300 22) |
|
115 |
) |
|
116 |
(CheckBoxSpec |
|
117 |
label: 'Enable Background Type Inferencer' |
|
118 |
name: 'CheckBox2' |
|
119 |
activeHelpKey: smallSenseBackgroundTypingEnabled |
|
120 |
enableChannel: smallSenseEnabled |
|
121 |
model: smallSenseBackgroundTypingEnabled |
|
122 |
translateLabel: true |
|
123 |
extent: (Point 300 22) |
|
124 |
) |
|
125 |
) |
|
126 |
||
127 |
) |
|
128 |
) |
|
129 |
) |
|
130 |
||
131 |
) |
|
132 |
) |
|
133 |
! ! |
|
134 |
||
135 |
!SmallSenseSettingsAppl methodsFor:'aspects'! |
|
136 |
||
137 |
smallSenseBackgroundLintEnabled |
|
138 |
<resource: #uiAspect> |
|
139 |
||
140 |
"automatically generated by UIPainter ..." |
|
141 |
||
142 |
"*** the code below creates a default model when invoked." |
|
143 |
"*** (which may not be the one you wanted)" |
|
144 |
"*** Please change as required and accept it in the browser." |
|
145 |
"*** (and replace this comment by something more useful ;-)" |
|
146 |
||
147 |
smallSenseBackgroundLintEnabled isNil ifTrue:[ |
|
148 |
smallSenseBackgroundLintEnabled := true asValue. |
|
149 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
150 |
"/ smallSenseBackgroundLintEnabled addDependent:self. |
|
151 |
smallSenseBackgroundLintEnabled onChangeSend:#updateModifiedChannel to:self. |
|
152 |
]. |
|
153 |
^ smallSenseBackgroundLintEnabled. |
|
154 |
||
155 |
"Modified: / 04-02-2012 / 21:47:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
156 |
! |
|
157 |
||
158 |
smallSenseBackgroundTypingEnabled |
|
159 |
<resource: #uiAspect> |
|
160 |
||
161 |
"automatically generated by UIPainter ..." |
|
162 |
||
163 |
"*** the code below creates a default model when invoked." |
|
164 |
"*** (which may not be the one you wanted)" |
|
165 |
"*** Please change as required and accept it in the browser." |
|
166 |
"*** (and replace this comment by something more useful ;-)" |
|
167 |
||
168 |
smallSenseBackgroundTypingEnabled isNil ifTrue:[ |
|
169 |
smallSenseBackgroundTypingEnabled := true asValue. |
|
170 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
171 |
"/ smallSenseBackgroundTypingEnabled addDependent:self. |
|
172 |
smallSenseBackgroundTypingEnabled onChangeSend:#updateModifiedChannel to:self. |
|
173 |
]. |
|
174 |
^ smallSenseBackgroundTypingEnabled. |
|
175 |
||
176 |
"Modified: / 04-02-2012 / 21:48:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
177 |
! |
|
178 |
||
179 |
smallSenseEnabled |
|
180 |
<resource: #uiAspect> |
|
181 |
||
182 |
"automatically generated by UIPainter ..." |
|
183 |
||
184 |
"*** the code below creates a default model when invoked." |
|
185 |
"*** (which may not be the one you wanted)" |
|
186 |
"*** Please change as required and accept it in the browser." |
|
187 |
"*** (and replace this comment by something more useful ;-)" |
|
188 |
||
189 |
smallSenseEnabled isNil ifTrue:[ |
|
190 |
smallSenseEnabled := true asValue. |
|
191 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
192 |
"/ smallSenseEnabled addDependent:self. |
|
193 |
smallSenseEnabled onChangeSend:#updateModifiedChannel to:self. |
|
194 |
]. |
|
195 |
^ smallSenseEnabled. |
|
196 |
||
197 |
"Modified: / 04-02-2012 / 21:48:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
198 |
! ! |
|
199 |
||
200 |
!SmallSenseSettingsAppl methodsFor:'protocol'! |
|
201 |
||
202 |
basicAspects |
|
203 |
^#( |
|
204 |
smallSenseEnabled |
|
205 |
||
206 |
smallSenseBackgroundLintEnabled |
|
207 |
smallSenseBackgroundTypingEnabled |
|
208 |
||
209 |
) |
|
210 |
||
211 |
"Modified: / 04-02-2012 / 21:47:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
212 |
! |
|
213 |
||
214 |
basicReadSettings |
|
215 |
self readAspects:self basicAspects from:currentUserPrefs. |
|
216 |
||
217 |
"Modified: / 19-07-2011 / 17:11:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
218 |
! |
|
219 |
||
220 |
basicSaveSettings |
|
221 |
||
222 |
self writeAspects:self basicAspects to:currentUserPrefs. |
|
223 |
||
224 |
"Modified: / 26-07-2011 / 10:43:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
225 |
! |
|
226 |
||
227 |
helpFilename |
|
228 |
"subclasses must return the relative name of a helpFile |
|
229 |
in the doc/online/<language>/help directory. |
|
230 |
Or nil, if no help is available." |
|
231 |
||
232 |
^ self shouldImplement |
|
233 |
! ! |
|
234 |
||
235 |
!SmallSenseSettingsAppl methodsFor:'queries'! |
|
236 |
||
237 |
hasUnsavedChanges |
|
238 |
^ self |
|
239 |
hasChangedAspectIn: self basicAspects |
|
240 |
asComparedTo:currentUserPrefs |
|
241 |
||
242 |
"Modified: / 19-07-2011 / 17:12:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
243 |
"Modified (format): / 25-11-2011 / 15:25:16 / cg" |
|
244 |
! ! |
|
245 |
||
246 |
!SmallSenseSettingsAppl class methodsFor:'documentation'! |
|
247 |
||
29
fe650a6e5704
Moved NavigationState>>selectedClasses to package stx:libtool.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12
diff
changeset
|
248 |
version_HG |
fe650a6e5704
Moved NavigationState>>selectedClasses to package stx:libtool.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12
diff
changeset
|
249 |
|
fe650a6e5704
Moved NavigationState>>selectedClasses to package stx:libtool.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12
diff
changeset
|
250 |
^ '$Changeset: <not expanded> $' |
fe650a6e5704
Moved NavigationState>>selectedClasses to package stx:libtool.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12
diff
changeset
|
251 |
! |
fe650a6e5704
Moved NavigationState>>selectedClasses to package stx:libtool.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12
diff
changeset
|
252 |
|
11 | 253 |
version_SVN |
12 | 254 |
^ '$Id: SmallSenseSettingsAppl.st 7872 2012-02-06 22:35:36Z vranyj1 $' |
11 | 255 |
! ! |
256 |
||
29
fe650a6e5704
Moved NavigationState>>selectedClasses to package stx:libtool.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12
diff
changeset
|
257 |
|
11 | 258 |
SmallSenseSettingsAppl initialize! |