'From Squeak3.3alpha of 18 January 2002 [latest update: #4930] on 27 July 2002 at 4:26:08 pm'! "Change Set: changeEnh-nk Date: 26 June 2002 Author: Ned Konz This adds an item to the ChangeSorter category menu that lets you make a change-set category with all the change sets that change a particular class."! ChangeSetCategory subclass: #ChangeSetCategoryWithParameters instanceVariableNames: 'parameters ' classVariableNames: '' module: #(Squeak Development Changes)! !ChangeSet methodsFor: 'class changes' stamp: 'nk 6/26/2002 12:30'! containsClass: aClass ^ self changedClasses includes: aClass! ! !ChangeSetCategoryWithParameters methodsFor: 'as yet unclassified' stamp: 'nk 6/26/2002 12:34'! acceptsManualAdditions "Answer whether the user is allowed manually to manipulate the contents of the change-set-category." ^ true! ! !ChangeSetCategoryWithParameters methodsFor: 'as yet unclassified' stamp: 'nk 6/26/2002 12:43'! addChangeSet: aChangeSet self inform: 'sorry, you can''t do that'! ! !ChangeSetCategoryWithParameters methodsFor: 'as yet unclassified' stamp: 'nk 6/26/2002 12:08'! includesChangeSet: aChangeSet "Answer whether the receiver includes aChangeSet in its retrieval list" ^ ChangeSorter perform: membershipSelector withArguments: { aChangeSet } , parameters! ! !ChangeSetCategoryWithParameters methodsFor: 'as yet unclassified' stamp: 'nk 6/26/2002 12:04'! parameters: anArray parameters _ anArray! ! !ChangeSetCategoryWithParameters methodsFor: 'as yet unclassified' stamp: 'nk 6/26/2002 12:16'! reconstituteList "Clear out the receiver's elements and rebuild them" | newMembers | "First determine newMembers and check if they have not changed..." newMembers _ ChangeSorter allChangeSets select: [:aChangeSet | ChangeSorter perform: membershipSelector withArguments: { aChangeSet }, parameters]. (newMembers collect: [:cs | cs name]) = keysInOrder ifTrue: [^ self "all current"]. "Things have changed. Need to recompute the whole category" self clear. newMembers do: [:aChangeSet | self fasterElementAt: aChangeSet name asSymbol put: aChangeSet]! ! !ChangeSorter methodsFor: 'changeSet menu' stamp: 'nk 6/26/2002 12:36'! categorySubmenu: aMenu shifted: shiftedIgnored "Fill aMenu with less-frequently-needed category items" aMenu title: 'Change set category'. aMenu add: 'make a new category...' action: #makeNewCategory. aMenu balloonTextForLastItem: 'Creates a new change-set-category (you will be asked to supply a name) which will start out its life with this change set in it'. aMenu add: 'make a new category with class...' action: #makeNewCategoryShowingClassChanges. aMenu balloonTextForLastItem: 'Creates a new change-set-category that includes change sets that change a particular class (you will be asked to supply a name)'. aMenu add: 'rename this category' action: #renameCategory. aMenu balloonTextForLastItem: 'Rename this change-set category. Only applies when the current category being shown is a manually-maintained, user-defined category, such as you can create for yourself by choosing "make a new category..." from this same menu.'. aMenu add: 'remove this category' action: #removeCategory. aMenu balloonTextForLastItem: 'Remove this change-set category. Only applies when the current category being shown is a manually-maintained, user-defined category, such as you can create for yourself by choosing "make a new category..." from this same menu.'. aMenu addLine. parent ifNotNil: [aMenu add: 'add change set to category opposite' action: #addToCategoryOpposite. aMenu balloonTextForLastItem: 'Adds this change set to the category on the other side of the change sorter. Only applies if the category shown on the opposite side is a manually-maintained, user-defined category, such as you can create for yourself by choosing "make a new category..." from this same menu.']. aMenu add: 'remove change set from this category' action: #removeFromCategory. aMenu balloonTextForLastItem: 'Removes this change set from the current category. Only applies when the current category being shown is a manually-maintained, user-defined category, such as you can create for yourself by choosing "make a new category..." from this same menu.'. aMenu addLine. aMenu add: 'file out category''s change sets' action: #fileOutAllChangeSets. aMenu balloonTextForLastItem: 'File out every change set in this category that has anything in it. The usual checks for slips are suppressed when this command is done.'. aMenu add: 'set recent-updates marker' action: #setRecentUpdatesMarker. aMenu balloonTextForLastItem: 'Allows you to specify a number that will demarcate which updates are considered "recent" and which are not. This will govern which updates are included in the RecentUpdates category in a change sorter'. aMenu add: 'fill aggregate change set' action: #fillAggregateChangeSet. aMenu balloonTextForLastItem: 'Creates a change-set named Aggregate into which all the changes in all the change sets in this category will be copied.'. aMenu addLine. aMenu add: 'back to main menu' action: #offerUnshiftedChangeSetMenu. aMenu balloonTextForLastItem: 'Takes you back to the shifted change-set menu.'. aMenu add: 'back to shifted menu' action: #offerShiftedChangeSetMenu. aMenu balloonTextForLastItem: 'Takes you back to the primary change-set menu.'. ^ aMenu! ! !ChangeSorter methodsFor: 'changeSet menu' stamp: 'nk 6/26/2002 12:28'! makeNewCategoryShowingClassChanges "Create a new, static change-set category, which will be populated entirely by change sets that have been manually placed in it" | catName aCategory clsName | clsName _ self selectedClass ifNotNil: [self selectedClass name ] ifNil: ['']. clsName _ FillInTheBlank request: 'Which class?' initialAnswer: clsName. clsName isEmptyOrNil ifTrue: [^ self]. catName _ ('Changes to ', clsName) asSymbol. (ChangeSetCategories includesKey: catName) ifTrue: [^ self inform: 'Sorry, there is already a category of that name']. aCategory _ ChangeSetCategoryWithParameters new categoryName: catName. aCategory membershipSelector: #changeSet:containsClass: ; parameters: { clsName }. ChangeSetCategories elementAt: catName put: aCategory. aCategory reconstituteList. self showChangeSetCategory: aCategory! ! !ChangeSorter class methodsFor: 'enumerating' stamp: 'nk 6/26/2002 12:39'! changeSet: aChangeSet containsClass: aClass | theClass | theClass _ Smalltalk classNamed: aClass. theClass ifNil: [^ false]. ^ aChangeSet containsClass: theClass! !