179 mappings at: 'DESCRIPTION' put: description. |
182 mappings at: 'DESCRIPTION' put: description. |
180 ^ mappings |
183 ^ mappings |
181 |
184 |
182 "Created: / 02-11-2015 / 16:59:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
185 "Created: / 02-11-2015 / 16:59:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
183 "Modified: / 07-09-2016 / 14:21:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
186 "Modified: / 07-09-2016 / 14:21:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
187 ! |
|
188 |
|
189 selectClassesFrom: aCollection |
|
190 ^ aCollection reject:[:class | class isProjectDefinition or:[ class isSharedPool ] ] |
|
191 |
|
192 "Created: / 29-10-2018 / 15:45:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
193 ! |
|
194 |
|
195 selectExtensionsFrom: aCollection |
|
196 ^ aCollection |
|
197 |
|
198 "Created: / 29-10-2018 / 15:45:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
199 ! |
|
200 |
|
201 selectPoolsFrom: aCollection |
|
202 ^ aCollection select:[:class | class isSharedPool ] |
|
203 |
|
204 "Created: / 29-10-2018 / 15:45:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
184 ! ! |
205 ! ! |
185 |
206 |
186 !BeeProjectWriter methodsFor:'source writing'! |
207 !BeeProjectWriter methodsFor:'source writing'! |
187 |
208 |
188 fileOut:packageID on:aStream |
209 fileOut:packageID on:aStream |
189 | projectDefinitionClass revinfo classesToFileout methodsToFileOut | |
210 | projectDefinitionClass revinfo classes extensions | |
190 |
211 |
191 projectDefinitionClass := packageID asPackageId projectDefinitionClass. |
212 projectDefinitionClass := packageID asPackageId projectDefinitionClass. |
192 classesToBeInitialized := OrderedCollection new. |
213 classesToBeInitialized := OrderedCollection new. |
193 |
214 |
|
215 name := projectDefinitionClass name. |
|
216 writer project: name. |
|
217 description := projectDefinitionClass description. |
|
218 |
194 revinfo := projectDefinitionClass revisionInfo. |
219 revinfo := projectDefinitionClass revisionInfo. |
195 name := projectDefinitionClass name. |
220 revinfo notNil ifTrue:[ |
196 version := revinfo revision. |
221 version := revinfo revision. |
197 author := revinfo author asString. |
222 author := revinfo author asString. |
198 timestamp := Timestamp fromDate: revinfo date andTime: revinfo time. |
223 timestamp := Timestamp fromDate: (Date readFrom: revinfo date) andTime: (Time readFrom: revinfo time). |
199 description := projectDefinitionClass description. |
224 ] ifFalse:[ |
|
225 version := Timestamp now printString. |
|
226 author := UserPreferences current historyManagerSignature. |
|
227 timestamp := Timestamp now. |
|
228 ]. |
|
229 |
200 |
230 |
201 aStream lineEndCRLF. |
231 aStream lineEndCRLF. |
202 |
232 |
203 "/ make sure that everything is loaded. |
233 "/ make sure that everything is loaded. |
204 projectDefinitionClass notNil ifTrue:[ |
234 projectDefinitionClass notNil ifTrue:[ |
205 projectDefinitionClass autoload. |
235 projectDefinitionClass autoload. |
206 projectDefinitionClass ensureFullyLoaded. |
236 projectDefinitionClass ensureFullyLoaded. |
207 classesToFileout := Smalltalk allClassesInPackage:packageID. |
237 classes := Smalltalk allClassesInPackage:packageID. |
208 ] ifFalse:[ |
238 ] ifFalse:[ |
209 classesToFileout := Smalltalk allClassesInPackage:packageID. |
239 classes := Smalltalk allClassesInPackage:packageID. |
210 classesToFileout := classesToFileout collect:[:each | each autoload]. |
240 classes := classes collect:[:each | each autoload]. |
211 ]. |
241 ]. |
212 |
242 |
213 methodsToFileOut := projectDefinitionClass extensions. |
243 extensions := projectDefinitionClass extensionMethods. |
214 |
|
215 self activityNotification:'checking for unportable unicode...'. |
|
216 |
244 |
217 self fileOutHeaderOn:aStream. |
245 self fileOutHeaderOn:aStream. |
218 self fileOutClasses: classesToFileout on: aStream. |
246 self fileOutPools: (self selectPoolsFrom:classes) on: aStream. |
219 self fileOutExtensions: methodsToFileOut on: aStream. |
247 self fileOutClasses: (self selectClassesFrom:classes) on: aStream. |
|
248 self fileOutExtensions: (self selectExtensionsFrom:extensions) on: aStream. |
220 self fileOutFooterOn: aStream. |
249 self fileOutFooterOn: aStream. |
221 |
250 |
222 "Created: / 14-04-2015 / 13:42:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
251 "Created: / 14-04-2015 / 13:42:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
223 "Modified: / 07-09-2016 / 14:34:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
252 "Modified: / 30-10-2018 / 14:43:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
224 ! |
253 ! |
225 |
254 |
226 fileOutClasses:arg1 on:arg2 |
255 fileOutClasses:arg1 on:arg2 |
227 "raise an error: must be redefined in concrete subclass(es)" |
256 "raise an error: must be redefined in concrete subclass(es)" |
228 |
257 |