The Trunk: Monticello-eem.396.mcz

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

The Trunk: Monticello-eem.396.mcz

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

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

Name: Monticello-eem.396
Author: eem
Time: 29 June 2010, 6:30:15.515 pm
UUID: 4bfae8e6-8254-4d67-8f17-5317a3cf4cb0
Ancestors: Monticello-ar.395

Make sure MCWorkingCopy receives system change
notifications by reregistering for them on startup.

File-out-all for PatchBrowser (package changes).

=============== Diff against Monticello-ar.395 ===============

Item was changed:
  ----- Method: MCWorkingCopy class>>initialize (in category 'as yet unclassified') -----
  initialize
  Smalltalk
  at: #MczInstaller
  ifPresent: [:installer | self adoptVersionInfoFrom: installer].
  self updateInstVars.
  "Temporary conversion code -- remove later"
  registry ifNotNil:[registry rehash]. "changed #="
  self allInstancesDo:[:each| "moved notifications"
  Smalltalk at: #SystemChangeNotifier ifPresent:[:cls|
  cls uniqueInstance noMoreNotificationsFor: each.
  ].
  ].
+ self registerForNotifications.
+ Smalltalk addToStartUpList: self!
- self registerForNotifications.!

Item was added:
+ ----- Method: MCPackageManager class>>reregisterForNotificationsWith: (in category 'system changes') -----
+ reregisterForNotificationsWith: aSystemChangeNotifier
+ aSystemChangeNotifier
+ notify: self ofSystemChangesOfItem: #class change: #Added using: #classModified:;
+ notify: self ofSystemChangesOfItem: #class change: #Modified using: #classModified:;
+ notify: self ofSystemChangesOfItem: #class change: #Renamed using: #classModified:;
+ notify: self ofSystemChangesOfItem: #class change: #Commented using: #classModified:;
+ notify: self ofSystemChangesOfItem: #class change: #Recategorized using: #classMoved:;
+ notify: self ofSystemChangesOfItem: #class change: #Removed using: #classRemoved:;
+ notify: self ofSystemChangesOfItem: #method change: #Added using: #methodModified:;
+ notify: self ofSystemChangesOfItem: #method change: #Modified using: #methodModified:;
+ notify: self ofSystemChangesOfItem: #method change: #Recategorized using: #methodMoved:;
+ notify: self ofSystemChangesOfItem: #method change: #Removed using: #methodRemoved:!

Item was changed:
  ----- Method: MCCodeTool>>methodListMenu: (in category 'menus') -----
  methodListMenu: aMenu
  "Build the menu for the selected method, if any."
 
+ self selectedMessageName
+ ifNil: [items notEmpty ifTrue:
+ [aMenu addList:#(('fileOut (o)' fileOutMessage))]]
+ ifNotNil: [
- self selectedMessageName ifNotNil: [
  aMenu addList:#(
  ('browse full (b)' browseMethodFull)
  ('browse hierarchy (h)' classHierarchy)
  ('browse method (O)' openSingleMessageBrowser)
  ('browse protocol (p)' browseFullProtocol)
  -
  ('fileOut (o)' fileOutMessage)
  ('printOut' printOutMessage)
  ('copy selector (c)' copySelector)).
  aMenu addList: #(
  -
  ('browse senders (n)' browseSendersOfMessages)
  ('browse implementors (m)' browseMessages)
  ('inheritance (i)' methodHierarchy)
  ('versions (v)' browseVersions)
  ('change sets with this method' findMethodInChangeSets)
  " ('x revert to previous version' revertToPreviousVersion)"
  ('remove from current change set' removeFromCurrentChanges)
  " ('x revert & remove from changes' revertAndForget)"
  ('add to current change set' adoptMessageInCurrentChangeset)
  " ('x copy up or copy down...' copyUpOrCopyDown)"
  " ('x remove method (x)' removeMessage)"
  "-"
  ).
  ].
  " aMenu addList: #(
  ('x inst var refs...' browseInstVarRefs)
  ('x inst var defs...' browseInstVarDefs)
  ('x class var refs...' browseClassVarRefs)
  ('x class variables' browseClassVariables)
  ('x class refs (N)' browseClassRefs)
  ).
  "
  ^ aMenu
  !

Item was changed:
  ----- Method: MCPackageManager class>>registerForNotifications (in category 'system changes') -----
  registerForNotifications
+ Smalltalk
+ at: #SystemChangeNotifier
+ ifPresent:
+ [:cls|
+ cls uniqueInstance noMoreNotificationsFor: self.
+ self reregisterForNotificationsWith: cls uniqueInstance]!
- Smalltalk at: #SystemChangeNotifier ifPresent:[:cls|
- (cls uniqueInstance)
- noMoreNotificationsFor: self;
- notify: self ofSystemChangesOfItem: #class change: #Added using: #classModified:;
- notify: self ofSystemChangesOfItem: #class change: #Modified using: #classModified:;
- notify: self ofSystemChangesOfItem: #class change: #Renamed using: #classModified:;
- notify: self ofSystemChangesOfItem: #class change: #Commented using: #classModified:;
- notify: self ofSystemChangesOfItem: #class change: #Recategorized using: #classMoved:;
- notify: self ofSystemChangesOfItem: #class change: #Removed using: #classRemoved:;
- notify: self ofSystemChangesOfItem: #method change: #Added using: #methodModified:;
- notify: self ofSystemChangesOfItem: #method change: #Modified using: #methodModified:;
- notify: self ofSystemChangesOfItem: #method change: #Recategorized using: #methodMoved:;
- notify: self ofSystemChangesOfItem: #method change: #Removed using: #methodRemoved:
- ].!

Item was added:
+ ----- Method: MCWorkingCopy class>>startUp: (in category 'system startup') -----
+ startUp: resuming
+ "Ensure Monticello is receiving system change notifications."
+
+ resuming ifTrue:
+ [Smalltalk
+ at: #SystemChangeNotifier
+ ifPresent: [:scn| self reregisterForNotificationsWith: scn uniqueInstance]]
+ !

Item was changed:
  ----- Method: MCCodeTool>>fileOutMessage (in category 'menus') -----
  fileOutMessage
  "Put a description of the selected message on a file"
 
+ | fileName |
  self selectedMessageName ifNotNil:
  [Cursor write showWhile:
+ [self selectedClassOrMetaClass fileOutMethod: self selectedMessageName].
+ ^self].
+ items isEmpty ifTrue:
+ [^self].
+ fileName := UIManager default request: 'File out on which file?' initialAnswer: 'methods'.
+ Cursor write showWhile:
+ [| internalStream |
+ internalStream := WriteStream on: (String new: 1000).
+ internalStream header; timeStamp.
+ items do:
+ [:patchOp|
+ patchOp definition isMethodDefinition ifTrue:
+ [(patchOp definition actualClass notNil
+  and: [patchOp definition actualClass includesSelector: patchOp definition selector])
+ ifTrue:
+ [patchOp definition actualClass
+ printMethodChunk: patchOp definition selector
+ withPreamble: true
+ on: internalStream
+ moveSource: false
+ toFile: nil]
+ ifFalse:
+ [internalStream nextChunkPut: patchOp definition className, ' removeSelector: ', patchOp definition selector printString]].
+ patchOp definition isClassDefinition ifTrue:
+ [patchOp definition actualClass
+ ifNotNil:
+ [internalStream nextChunkPut: patchOp definition actualClass definition.
+ patchOp definition comment ifNotNil:
+ [patchOp definition actualClass organization
+ putCommentOnFile: internalStream
+ numbered: 1
+ moveSource: false
+ forClass: patchOp definition actualClass]]
+ ifNil:
+ [internalStream nextChunkPut: patchOp definition className, ' removeFromSystem']]].
+ FileStream writeSourceCodeFrom: internalStream baseName: fileName isSt: true useHtml: false]!
- [self selectedClassOrMetaClass fileOutMethod: self selectedMessageName]]!