The Trunk: Tools-eem.257.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-eem.257.mcz

commits-2
Eliot Miranda uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-eem.257.mcz

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

Name: Tools-eem.257
Author: eem
Time: 14 August 2010, 6:40:51.643 pm
UUID: f286eb1b-9a23-4436-abfd-1ff61677bd06
Ancestors: Tools-eem.256

Fix select unchanged definitions for variableSubclass: class defs

=============== Diff against Tools-eem.256 ===============

Item was changed:
  ----- Method: ChangeList>>selectUnchangedDefinitions (in category 'menu actions') -----
  selectUnchangedDefinitions
  "Selects all recognizable definitions for which there is already a definition in the current image, whose source is exactly the same."
  | change class tokens |
  Cursor read showWhile:
  [1 to: changeList size do:
  [:i | change := changeList at: i.
  listSelections at: i put: false.
 
  (change type = #method
  and: [(class := change methodClass) notNil
  and: [class includesSelector: change methodSelector]]) ifTrue:
  [listSelections
  at: i
  put: change string withBlanksCondensed
  = (class sourceCodeAt: change methodSelector) asString withBlanksCondensed].
 
  (change type == #classComment
  and: [(class := change commentClass) notNil]) ifTrue:
  [listSelections at: i put: change string = class comment asString].
 
  change type == #doIt ifTrue:
  [tokens := Scanner new scanTokens: change string.
 
  ((tokens select:
+ [:substr| #(subclass: variableSubclass: variableByteSubclass: variableWordSubclass:
- [:substr| #(subclass: variableByteSubclass: variableWordSubclass:
  instanceVariableNames: classVariableNames: ) includes: substr])
  asSet size >= 3
  and: [(class := Smalltalk at: tokens third ifAbsent: []) notNil
  and: [class isBehavior]]) ifTrue:
  [listSelections
  at: i
  put: change string withBlanksCondensed
  = class definition withBlanksCondensed].
 
  (tokens size = 4
  and: [tokens second == #class
  and: [tokens third == #instanceVariableNames:
  and: [(class := Smalltalk at: tokens first ifAbsent: []) notNil
  and: [class isBehavior]]]]) ifTrue:
  [listSelections
  at: i
  put: change string withBlanksCondensed
  = class class definition withBlanksCondensed].
 
  (tokens size = 3
  and: [tokens second == #removeSelector:
  and: [(class := Smalltalk at: tokens first ifAbsent: []) isNil
  or: [class isBehavior and: [(class includesSelector: tokens third) not]]]]) ifTrue:
  [listSelections at: i put: true].
 
  (tokens size = 4
  and: [tokens second == #class
  and: [tokens third == #removeSelector:
  and: [(class := Smalltalk at: tokens first ifAbsent: []) isNil
  or: [class isBehavior and: [(class class includesSelector: tokens fourth) not]]]]]) ifTrue:
  [listSelections at: i put: true]]]].
 
  self changed: #allSelections!