The Trunk: Tools-cmm.408.mcz

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

The Trunk: Tools-cmm.408.mcz

commits-2
Chris Muller uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-cmm.408.mcz

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

Name: Tools-cmm.408
Author: cmm
Time: 23 May 2012, 9:50:41.756 pm
UUID: d27badb8-f76b-4bde-8445-82da3de74220
Ancestors: Tools-eem.407

- Don't put comments in generated accessors.

=============== Diff against Tools-eem.407 ===============

Item was changed:
  ----- Method: Browser>>createInstVarAccessors (in category 'class functions') -----
  createInstVarAccessors
  "Create getters and setters for all inst vars defined at the level of the current class selection,
  except do NOT clobber or override any selectors already understood by the instances of the selected class"
 
  self selectedClassOrMetaClass ifNotNil:
  [:aClass| | cr |
  cr := String with: Character cr.
  aClass instVarNames do:
  [:aName | | newMessage setter |
  (aClass canUnderstand: aName asSymbol) ifFalse:
  [newMessage :=
+ aName, cr, cr,
- aName, cr,
- ' "Answer the value of ', aName, '"', cr, cr,
  ' ^ ', aName.
  aClass compile: newMessage classified: #accessing notifying: nil].
  (aClass canUnderstand: (setter := aName, ':') asSymbol) ifFalse:
  [newMessage :=
+ setter, ' anObject', cr, cr,
- setter, ' anObject', cr,
- ' "Set the value of ', aName, '"', cr, cr,
  (aClass settersReturnValue ifTrue: [' ^'] ifFalse: [' ']),
  aName, ' := anObject'.
  aClass compile: newMessage classified: #accessing notifying: nil]]]!