equal
deleted
inserted
replaced
42 ! ! |
42 ! ! |
43 |
43 |
44 !AbstractFileApplicationNoteBookComponent class methodsFor:'defaults'! |
44 !AbstractFileApplicationNoteBookComponent class methodsFor:'defaults'! |
45 |
45 |
46 tabStringFor:aApplicationType |
46 tabStringFor:aApplicationType |
47 |
47 "the formatString shown in a tab (language translated)" |
48 ^ nil |
48 |
|
49 ^ nil |
|
50 |
|
51 "Modified: / 01-03-2007 / 21:43:10 / cg" |
|
52 ! |
|
53 |
|
54 tabStringFor:aApplicationType forContents:shownContents |
|
55 |
|
56 ^ nil |
|
57 |
|
58 "Created: / 01-03-2007 / 21:35:39 / cg" |
49 ! ! |
59 ! ! |
50 |
60 |
51 !AbstractFileApplicationNoteBookComponent class methodsFor:'queries'! |
61 !AbstractFileApplicationNoteBookComponent class methodsFor:'queries'! |
52 |
62 |
53 canOpenItem:anItem |
63 canOpenItem:anItem |
167 ]. |
177 ]. |
168 ^ dir. |
178 ^ dir. |
169 ! |
179 ! |
170 |
180 |
171 getTabString |
181 getTabString |
172 |
182 "get the tab string from the application" |
173 " get the tab string from the application list on the class side " |
183 |
174 |
184 ^ String streamContents:[:stream | |
175 | stream string firstString endString| |
185 |formatString valueString| |
176 |
186 |
177 stream := WriteStream on:''. |
187 valueString := self getTabValueString. |
178 firstString := self class tabStringFor:type. |
188 valueString isNil ifTrue:[ |
179 firstString isNil ifTrue:[ |
189 valueString := resources string:'<unnamed>' |
180 "/ default take the class name |
190 ]. |
181 firstString := self className. |
191 |
182 ]. |
192 formatString := self class tabStringFor:type. |
183 stream nextPutAll:firstString. |
193 formatString isNil ifTrue:[ |
184 endString := self getTabStringEnd. |
194 "/ default: take the class name |
185 endString notNil ifTrue:[ |
195 formatString := self className. |
186 stream space. |
196 ]. |
187 stream nextPutAll:endString. |
197 stream nextPutAll:(resources string:formatString with:valueString). |
188 ]. |
198 ]. |
189 string := stream contents. |
199 |
190 stream close. |
200 "Modified: / 01-03-2007 / 21:45:02 / cg" |
191 ^ string. |
|
192 ! |
201 ! |
193 |
202 |
194 getTabStringEnd |
203 getTabStringEnd |
195 |
204 |
196 " get the tab string from the application list on the class side " |
205 " get the tab string from the application list on the class side " |
215 ^ stream contents. |
224 ^ stream contents. |
216 ]. |
225 ]. |
217 ^ nil |
226 ^ nil |
218 ! |
227 ! |
219 |
228 |
|
229 getTabValueString |
|
230 "the item shown in a tab (not language translated)" |
|
231 |
|
232 |stream| |
|
233 |
|
234 self item isNil ifTrue:[^ nil]. |
|
235 |
|
236 ^ String streamContents:[:stream | |
|
237 |fn baseName| |
|
238 |
|
239 fn := self fileName. |
|
240 baseName := fn baseName. |
|
241 self type = #directoryDescription ifTrue:[ |
|
242 stream nextPutAll:(fn directory baseName). |
|
243 stream space. |
|
244 stream nextPut:$[. |
|
245 stream nextPutAll:baseName. |
|
246 stream nextPut:$]. |
|
247 ] ifFalse:[ |
|
248 stream nextPutAll:baseName. |
|
249 stream space. |
|
250 self sameFileIndex notNil ifTrue:[ |
|
251 stream nextPutAll:self sameFileIndex asString. |
|
252 ]. |
|
253 ]. |
|
254 ]. |
|
255 |
|
256 "Created: / 01-03-2007 / 21:40:03 / cg" |
|
257 ! |
|
258 |
220 isEmbeddedApplication |
259 isEmbeddedApplication |
221 |
260 |
222 ^ self masterApplication notNil |
261 ^ self masterApplication notNil |
223 ! |
262 ! |
224 |
263 |
273 ! ! |
312 ! ! |
274 |
313 |
275 !AbstractFileApplicationNoteBookComponent class methodsFor:'documentation'! |
314 !AbstractFileApplicationNoteBookComponent class methodsFor:'documentation'! |
276 |
315 |
277 version |
316 version |
278 ^ '$Header: /cvs/stx/stx/libtool/AbstractFileApplicationNoteBookComponent.st,v 1.18 2006-10-24 10:33:24 cg Exp $' |
317 ^ '$Header: /cvs/stx/stx/libtool/AbstractFileApplicationNoteBookComponent.st,v 1.19 2007-03-01 20:48:54 cg Exp $' |
279 ! ! |
318 ! ! |