The Trunk: Monticello-ar.398.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-ar.398.mcz

commits-2
Andreas Raab uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-ar.398.mcz

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

Name: Monticello-ar.398
Author: ar
Time: 2 September 2010, 7:58:53.138 pm
UUID: ba8f6776-43b1-7940-a0b0-4337de174cda
Ancestors: Monticello-ar.397, Monticello-tfel.395

Merging Monticello-tfel.395:

Add a hook to allow other packages to add to the monticello browser context menu.

=============== Diff against Monticello-ar.397 ===============

Item was added:
+ ----- Method: MCMenuSpec>>= (in category 'comparing') -----
+ = aMCMenuSpec
+
+ ^ self class == aMCMenuSpec class and: [self entry = aMCMenuSpec entry].!

Item was changed:
  ----- Method: MCWorkingCopyBrowser>>workingCopyListMenu: (in category 'morphic ui') -----
  workingCopyListMenu: aMenu
  workingCopy ifNil: [^ aMenu].
  self fillMenu: aMenu fromSpecs:
  #(('add required package' #addRequiredPackage)
  ('clear required packages' #clearRequiredPackages)
  ('browse package' #browseWorkingCopy)
  ('view changes' #viewChanges)
  ('view history' #viewHistory)
  ('recompile package' #recompilePackage)
  ('revert package...' #revertPackage)
  ('unload package' #unloadPackage)
  ('delete working copy' #deleteWorkingCopy)).
  (Smalltalk includesKey: #SARMCPackageDumper) ifTrue: [
  aMenu add: 'make SAR' target: self selector: #fileOutAsSAR
  ].
+ self insertExternalMenuEntries: aMenu.
  ^aMenu!

Item was added:
+ ----- Method: MCMenuSpec>>entry (in category 'accessing') -----
+ entry
+
+ ^entry!

Item was added:
+ ----- Method: MCMenuSpec>>selector: (in category 'accessing') -----
+ selector: anObject
+
+ selector := anObject!

Item was added:
+ ----- Method: MCMenuSpec>>selector (in category 'accessing') -----
+ selector
+
+ ^selector!

Item was added:
+ ----- Method: MCMenuSpec>>target: (in category 'accessing') -----
+ target: anObject
+
+ target := anObject!

Item was added:
+ Object subclass: #MCMenuSpec
+ instanceVariableNames: 'entry target selector'
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Monticello-UI'!
+
+ !MCMenuSpec commentStamp: 'tfel 6/12/2010 14:57' prior: 0!
+ A MCMenuSpec holds information to add menu entries to the monticello browser menus from external classes.
+ Required is the entry string (#entry), the call target and the selector be called.
+ An external class may use the MCWorkingCopyBrowser class>>addMenuSpec: method to add it's own menu entry to the monticello browser context menu.
+
+ Note that MCMenuSpecs are compared via their menu entry string and if multiple MCMenuSpecs are added to the MCWorkingCopyBrowser, the last one takes precedence.!

Item was changed:
  MCTool subclass: #MCWorkingCopyBrowser
  instanceVariableNames: 'workingCopy workingCopyWrapper repository defaults'
+ classVariableNames: 'CheckForNewerVersionsBeforeSave ExternalMenuEntries'
- classVariableNames: 'CheckForNewerVersionsBeforeSave'
  poolDictionaries: ''
  category: 'Monticello-UI'!

Item was added:
+ ----- Method: MCWorkingCopyBrowser class>>addMenuSpec: (in category 'hooks') -----
+ addMenuSpec: aMCMenuSpec
+ "Register a context menu entry in the monticello browser from an external package.
+ The MCWorkingCopyBrowser model is passed as argument."
+ self externalMenuEntries
+ remove: aMCMenuSpec
+ ifAbsent: ["Remove any previous entry with description string"];
+ add: aMCMenuSpec.!

Item was added:
+ ----- Method: MCWorkingCopyBrowser>>insertExternalMenuEntries: (in category 'morphic ui') -----
+ insertExternalMenuEntries: aMenu
+
+ self class externalMenuEntries ifNotEmpty: [
+ aMenu addLine.
+ self class externalMenuEntries do: [:each |
+ aMenu
+ add: each entry
+ target: each target
+ selector: each selector
+ argument: self]].!

Item was added:
+ ----- Method: MCMenuSpec>>target (in category 'accessing') -----
+ target
+
+ ^target!

Item was added:
+ ----- Method: MCWorkingCopyBrowser class>>externalMenuEntries (in category 'hooks') -----
+ externalMenuEntries
+
+ ExternalMenuEntries ifNil: [ExternalMenuEntries := Set new].
+ ^ ExternalMenuEntries!

Item was changed:
  SystemOrganization addCategory: #'Monticello-Base'!
  SystemOrganization addCategory: #'Monticello-Chunk Format'!
  SystemOrganization addCategory: #'Monticello-Loading'!
  SystemOrganization addCategory: #'Monticello-Merging'!
  SystemOrganization addCategory: #'Monticello-Modeling'!
  SystemOrganization addCategory: #'Monticello-Patching'!
  SystemOrganization addCategory: #'Monticello-Repositories'!
  SystemOrganization addCategory: #'Monticello-Storing'!
  SystemOrganization addCategory: #'Monticello-UI'!
  SystemOrganization addCategory: #'Monticello-Versioning'!
+ SystemOrganization addCategory: #'Monticello-Mocks'!

Item was added:
+ ----- Method: MCMenuSpec>>entry: (in category 'accessing') -----
+ entry: anObject
+
+ entry := anObject!

Item was added:
+ ----- Method: MCMenuSpec>>hash (in category 'comparing') -----
+ hash
+
+ ^ self entry hash!