The Trunk: Tools-mt.589.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-mt.589.mcz

commits-2
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.589.mcz

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

Name: Tools-mt.589
Author: mt
Time: 14 April 2015, 1:45:01.137 pm
UUID: e40f6b35-2f6c-e84b-8c4b-cacc6cec64dc
Ancestors: Tools-topa.588

Fixed missing update of changed class definitions in system browsers (and their subclasses).

=============== Diff against Tools-topa.588 ===============

Item was changed:
  CodeHolder subclass: #Browser
+ instanceVariableNames: 'environment systemOrganizer classOrganizer metaClassOrganizer editSelection metaClassIndicated selectedSystemCategory selectedClassName selectedMessageName selectedMessageCategoryName classDefinition metaClassDefinition'
- instanceVariableNames: 'environment systemOrganizer classOrganizer metaClassOrganizer editSelection metaClassIndicated selectedSystemCategory selectedClassName selectedMessageName selectedMessageCategoryName'
  classVariableNames: 'ListClassesHierarchically RecentClasses ShowClassIcons ShowMessageIcons SortMessageCategoriesAlphabetically'
  poolDictionaries: ''
  category: 'Tools-Browser'!
 
  !Browser commentStamp: 'cwp 12/27/2012 11:09' prior: 0!
  I represent a query path into the class descriptions, the software of the system.!

Item was added:
+ ----- Method: Browser>>classDefinitionIndicated (in category 'metaclass') -----
+ classDefinitionIndicated
+
+ ^ editSelection == #editClass
+ !

Item was added:
+ ----- Method: Browser>>didCodeChangeElsewhere (in category 'self-updating') -----
+ didCodeChangeElsewhere
+
+ ^ super didCodeChangeElsewhere or: [self classDefinitionIndicated
+ and: [self metaClassIndicated
+ ifFalse: [classDefinition ~= self selectedClass definition]
+ ifTrue: [metaClassDefinition ~= self selectedClass classSide definition]]]!

Item was changed:
  ----- Method: Browser>>selectClassNamed: (in category 'class list') -----
  selectClassNamed: aSymbolOrString
  | className currentMessageCategoryName currentMessageName |
 
  currentMessageCategoryName := [self selectedMessageCategoryName]
  on: Error
  do: [:ex| ex return: nil].
  currentMessageName := [self selectedMessageName]
  on: Error
  do: [:ex| ex return: nil].
 
  selectedClassName := aSymbolOrString ifNotNil: [ aSymbolOrString asSymbol ].
  self setClassOrganizer.
+ self setClassDefinition.
 
  "Try to reselect the category and/or selector if the new class has them."
  selectedMessageCategoryName :=(self messageCategoryList includes: currentMessageCategoryName)
  ifTrue: [currentMessageCategoryName]
  ifFalse: [nil].
  selectedMessageName := (self messageList includes: currentMessageName)
  ifTrue: [currentMessageName]
  ifFalse: [nil].
 
  self hasMessageSelected ifTrue:
  [self editSelection: #editMessage] ifFalse:
  [self hasMessageCategorySelected ifTrue:
  [self editSelection: #newMessage] ifFalse:
  [self classCommentIndicated
  ifTrue: [self editSelection: #editComment]
  ifFalse: [self editSelection: (self hasClassSelected not
  ifTrue: [(metaClassIndicated or: [ self hasSystemCategorySelected not ])
  ifTrue: [#none]
  ifFalse: [#newClass]]
  ifFalse: [#editClass])]]].
  contents := nil.
  self selectedClass isNil
  ifFalse: [className := self selectedClass name.
  (RecentClasses includes: className)
  ifTrue: [RecentClasses remove: className].
  RecentClasses addFirst: className.
  RecentClasses size > 16
  ifTrue: [RecentClasses removeLast]].
  self changed: #classSelectionChanged.
  self changed: #classCommentText.
  self changed: #classListIndex. "update my selection"
  self changed: #messageCategoryList.
  self changed: #messageList.
  self changed: #relabel.
  self contentsChanged!

Item was added:
+ ----- Method: Browser>>setClassDefinition (in category 'metaclass') -----
+ setClassDefinition
+ "Remember the current class definition."
+
+ | theClass |
+ classDefinition := nil.
+ metaClassDefinition := nil.
+ self hasClassSelected ifFalse: [^ self].
+ theClass := self selectedClass ifNil: [ ^self ].
+ classDefinition := theClass definition.
+ metaClassDefinition := theClass classSide definition.!