Quantcast

The Inbox: System-jr.919.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

The Inbox: System-jr.919.mcz

commits-2
A new version of System was added to project The Inbox:
http://source.squeak.org/inbox/System-jr.919.mcz

==================== Summary ====================

Name: System-jr.919
Author: jr
Time: 12 February 2017, 4:10:59.703498 pm
UUID: 95683f1a-e60c-fe4e-a86a-62cc5b00a151
Ancestors: System-cmm.918

add PseudoTrait and support for it in FilePackage

main objective is to let Monticello read Trait comments from the st snapshot, which does not work when the trait definition is only treated as a doIt

=============== Diff against System-cmm.918 ===============

Item was changed:
  ----- Method: FilePackage>>doIt: (in category 'change record types') -----
  doIt: chgRec
  | string |
  string := chgRec string.
  ('*ubclass:*instanceVariableNames:*classVariableNames:*poolDictionaries:*category:*'
  match: string) ifTrue:[^self classDefinition: string with: chgRec].
+ ('*named:*uses:*category:*'
+ match: string) ifTrue:["Trait" ^ self traitDefinition: string with: chgRec].
  ('* class*instanceVariableNames:*'
  match: string) ifTrue:[^self metaClassDefinition: string with: chgRec].
  ('* removeSelector: *'
  match: string) ifTrue:[^self removedMethod: string with: chgRec].
  ('* comment:*'
  match: string) ifTrue:[^self msgClassComment: string with: chgRec].
  ('* initialize'
  match: string) ifTrue:[^self]. "Initialization is done based on class>>initialize"
  ('''From *'
  match: string) ifTrue:[^self possibleSystemSource: chgRec].
  doIts add: chgRec.!

Item was added:
+ ----- Method: FilePackage>>getBehavior:factory: (in category 'private') -----
+ getBehavior: name factory: pseudoBehaviorFactory
+ | pseudoBehavior |
+ (classes includesKey: name) ifTrue:[
+ ^classes at: name.
+ ].
+ pseudoBehavior := pseudoBehaviorFactory new.
+ pseudoBehavior name: name.
+ classes at: name put: pseudoBehavior.
+ ^pseudoBehavior.!

Item was changed:
  ----- Method: FilePackage>>getClass: (in category 'private') -----
  getClass: className
+ ^ self getBehavior: className factory: PseudoClass!
- | pseudoClass |
- (classes includesKey: className) ifTrue:[
- ^classes at: className.
- ].
- pseudoClass := PseudoClass new.
- pseudoClass name: className.
- classes at: className put: pseudoClass.
- ^pseudoClass.!

Item was added:
+ ----- Method: FilePackage>>getTrait: (in category 'private') -----
+ getTrait: traitName
+ ^ self getBehavior: traitName factory: PseudoTrait!

Item was added:
+ PseudoClass subclass: #PseudoTrait
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'System-FilePackage'!
+
+ !PseudoTrait commentStamp: 'jr 2/12/2017 15:50' prior: 0!
+ Like a PseudoClass, but standing in for a Trait. Works identically to PseudoClass otherwise.!

Item was added:
+ ----- Method: PseudoTrait>>isTrait (in category 'testing') -----
+ isTrait
+ ^ true!


Loading...