Patrick Rein uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-pre.883.mcz ==================== Summary ==================== Name: Tools-pre.883 Author: pre Time: 3 September 2019, 5:10:12.037361 pm UUID: ba7b1b34-3fbe-a74a-95d1-7357bd94e8ac Ancestors: Tools-pre.882 Deprecates unused (and duplicated) methods on ChangeSorter class which now actually reside in ChangeSet. Also refactors some ChangesOrganizer methods to use the implementation on ChangeSet class instead of reimplementing the logic (in the end the changesets already come from ChangeSet class). =============== Diff against Tools-pre.882 =============== Item was removed: - ----- Method: ChangeSorter class>>allChangeSetNames (in category 'deprecated') ----- - allChangeSetNames - - ^ ChangesOrganizer allChangeSetNames! Item was removed: - ----- Method: ChangeSorter class>>allChangeSets (in category 'deprecated') ----- - allChangeSets - - ^ ChangesOrganizer allChangeSets! Item was removed: - ----- Method: ChangeSorter class>>allChangeSetsWithClass:selector: (in category 'deprecated') ----- - allChangeSetsWithClass: class selector: selector - - ^ ChangesOrganizer allChangeSetsWithClass: class selector: selector! Item was removed: - ----- Method: ChangeSorter class>>assuredChangeSetNamed: (in category 'deprecated') ----- - assuredChangeSetNamed: aName - - ^ ChangesOrganizer assuredChangeSetNamed: aName! Item was removed: - ----- Method: ChangeSorter class>>basicNewChangeSet: (in category 'deprecated') ----- - basicNewChangeSet: newName - - ^ ChangesOrganizer basicNewChangeSet: newName! Item was removed: - ----- Method: ChangeSorter class>>belongsInAdditions: (in category 'deprecated') ----- - belongsInAdditions: aChangeSet - - ^ ChangesOrganizer belongsInAdditions: aChangeSet! Item was removed: - ----- Method: ChangeSorter class>>belongsInAll: (in category 'deprecated') ----- - belongsInAll: aChangeSet - - ^ ChangesOrganizer belongsInAll: aChangeSet! Item was removed: - ----- Method: ChangeSorter class>>belongsInMyInitials: (in category 'deprecated') ----- - belongsInMyInitials: aChangeSet - - ^ ChangesOrganizer belongsInMyInitials: aChangeSet! Item was removed: - ----- Method: ChangeSorter class>>belongsInNumbered: (in category 'deprecated') ----- - belongsInNumbered: aChangeSet - - ^ ChangesOrganizer belongsInNumbered: aChangeSet! Item was removed: - ----- Method: ChangeSorter class>>belongsInProjectChangeSets: (in category 'deprecated') ----- - belongsInProjectChangeSets: aChangeSet - - ^ ChangesOrganizer belongsInProjectChangeSets: aChangeSet! Item was removed: - ----- Method: ChangeSorter class>>belongsInProjectsInRelease: (in category 'deprecated') ----- - belongsInProjectsInRelease: aChangeSet - - ^ ChangesOrganizer belongsInProjectsInRelease: aChangeSet! Item was removed: - ----- Method: ChangeSorter class>>belongsInRecentUpdates: (in category 'deprecated') ----- - belongsInRecentUpdates: aChangeSet - - ^ ChangesOrganizer belongsInRecentUpdates: aChangeSet! Item was changed: ----- Method: ChangeSorter class>>browseChangeSetsWithClass:selector: (in category 'browse') ----- browseChangeSetsWithClass: class selector: selector "Put up a menu comprising a list of change sets that hold changes for the given class and selector. If the user selects one, open a single change-sorter onto it" | hits index | + hits := ChangeSet allChangeSets select: - hits := self allChangeSets select: [:cs | (cs atSelector: selector class: class) ~~ #none]. hits isEmpty ifTrue: [^ self inform: class name, '.', selector , ' is not in any change set']. index := hits size = 1 ifTrue: [1] ifFalse: [(UIManager default chooseFrom: (hits collect: [:cs | cs name]) lines: #())]. index = 0 ifTrue: [^ self]. (ChangeSorter new myChangeSet: (hits at: index)) open. ! Item was changed: ----- Method: ChangeSorter class>>browseChangeSetsWithSelector: (in category 'browse') ----- browseChangeSetsWithSelector: aSelector "Put up a list of all change sets that contain an addition, deletion, or change of any method with the given selector" | hits index | + hits := ChangeSet allChangeSets select: - hits := self allChangeSets select: [:cs | cs hasAnyChangeForSelector: aSelector]. hits isEmpty ifTrue: [^ self inform: aSelector , ' is not in any change set']. index := hits size = 1 ifTrue: [1] ifFalse: [(UIManager default chooseFrom: (hits collect: [:cs | cs name]) lines: #())]. index = 0 ifTrue: [^ self]. (ChangeSetBrowser new myChangeSet: (hits at: index)) open "ChangeSorter browseChangeSetsWithSelector: #clearPenTrails" ! Item was removed: - ----- Method: ChangeSorter class>>buildAggregateChangeSet (in category 'deprecated') ----- - buildAggregateChangeSet - - ^ ChangesOrganizer buildAggregateChangeSet - - ! Item was removed: - ----- Method: ChangeSorter class>>changeSet:containsClass: (in category 'deprecated') ----- - changeSet: aChangeSet containsClass: aClass - - ^ ChangesOrganizer changeSet: aChangeSet containsClass: aClass! Item was removed: - ----- Method: ChangeSorter class>>changeSetNamed: (in category 'deprecated') ----- - changeSetNamed: aName - - ^ ChangesOrganizer changeSetNamed: aName! Item was removed: - ----- Method: ChangeSorter class>>changeSetNamesInReleaseImage (in category 'deprecated') ----- - changeSetNamesInReleaseImage - - ^ ChangesOrganizer changeSetNamesInReleaseImage! Item was removed: - ----- Method: ChangeSorter class>>changeSetNamesInThreeOh (in category 'deprecated') ----- - changeSetNamesInThreeOh - - ^ ChangesOrganizer changeSetNamesInThreeOh! Item was removed: - ----- Method: ChangeSorter class>>changeSetsNamedSuchThat: (in category 'deprecated') ----- - changeSetsNamedSuchThat: nameBlock - - ^ ChangesOrganizer changeSetsNamedSuchThat: nameBlock! Item was removed: - ----- Method: ChangeSorter class>>countOfChangeSetsWithClass:andSelector: (in category 'deprecated') ----- - countOfChangeSetsWithClass: aClass andSelector: aSelector - - ^ ChangesOrganizer countOfChangeSetsWithClass: aClass andSelector: aSelector! Item was removed: - ----- Method: ChangeSorter class>>deleteChangeSetsNumberedLowerThan: (in category 'deprecated') ----- - deleteChangeSetsNumberedLowerThan: anInteger - - ^ ChangesOrganizer deleteChangeSetsNumberedLowerThan: anInteger! Item was removed: - ----- Method: ChangeSorter class>>doesAnyChangeSetHaveClass:andSelector: (in category 'deprecated') ----- - doesAnyChangeSetHaveClass: aClass andSelector: aSelector - - ^ ChangesOrganizer doesAnyChangeSetHaveClass: aClass andSelector: aSelector! Item was removed: - ----- Method: ChangeSorter class>>existingOrNewChangeSetNamed: (in category 'deprecated') ----- - existingOrNewChangeSetNamed: aName - - ^ ChangesOrganizer existingOrNewChangeSetNamed: aName! Item was removed: - ----- Method: ChangeSorter class>>fileOutChangeSetsNamed: (in category 'deprecated') ----- - fileOutChangeSetsNamed: nameList - - ^ ChangesOrganizer fileOutChangeSetsNamed: nameList! Item was removed: - ----- Method: ChangeSorter class>>gatherChangeSets (in category 'deprecated') ----- - gatherChangeSets - - ^ ChangesOrganizer gatherChangeSets! Item was removed: - ----- Method: ChangeSorter class>>highestNumberedChangeSet (in category 'deprecated') ----- - highestNumberedChangeSet - - ^ ChangesOrganizer highestNumberedChangeSet - ! Item was removed: - ----- Method: ChangeSorter class>>mostRecentChangeSetWithChangeForClass:selector: (in category 'deprecated') ----- - mostRecentChangeSetWithChangeForClass: class selector: selector - - ^ ChangesOrganizer mostRecentChangeSetWithChangeForClass: class selector: selector! Item was removed: - ----- Method: ChangeSorter class>>newChangeSet (in category 'deprecated') ----- - newChangeSet - - ^ ChangesOrganizer newChangeSet! Item was removed: - ----- Method: ChangeSorter class>>newChangeSet: (in category 'deprecated') ----- - newChangeSet: aName - - ^ ChangesOrganizer newChangeSet: aName! Item was removed: - ----- Method: ChangeSorter class>>newChangesFromStream:named: (in category 'deprecated') ----- - newChangesFromStream: aStream named: aName - - ^ ChangesOrganizer newChangesFromStream: aStream named: aName! Item was removed: - ----- Method: ChangeSorter class>>noteChangeSetsInRelease (in category 'deprecated') ----- - noteChangeSetsInRelease - - ^ ChangesOrganizer noteChangeSetsInRelease! Item was removed: - ----- Method: ChangeSorter class>>promoteToTop: (in category 'deprecated') ----- - promoteToTop: aChangeSet - - ^ ChangesOrganizer promoteToTop: aChangeSet! Item was removed: - ----- Method: ChangeSorter class>>recentUpdateMarker (in category 'deprecated') ----- - recentUpdateMarker - - ^ ChangesOrganizer recentUpdateMarker! Item was removed: - ----- Method: ChangeSorter class>>recentUpdateMarker: (in category 'deprecated') ----- - recentUpdateMarker: aNumber - - ^ ChangesOrganizer recentUpdateMarker: aNumber! Item was changed: + ----- Method: ChangeSorter class>>registerInFlapsRegistry (in category 'class initialization') ----- - ----- Method: ChangeSorter class>>registerInFlapsRegistry (in category 'deprecated') ----- registerInFlapsRegistry "Register the receiver in the system's flaps registry" self environment at: #Flaps ifPresent: [:cl | cl registerQuad: {#ChangeSorter. #prototypicalToolWindow. 'Change Set' translatedNoop. 'A tool that allows you to view and manipulate all the code changes in a single change set' translatedNoop} forFlapNamed: 'Tools']! Item was removed: - ----- Method: ChangeSorter class>>removeChangeSet: (in category 'deprecated') ----- - removeChangeSet: aChangeSet - - ^ ChangesOrganizer removeChangeSet: aChangeSet! Item was removed: - ----- Method: ChangeSorter class>>removeChangeSetsNamedSuchThat: (in category 'deprecated') ----- - removeChangeSetsNamedSuchThat: nameBlock - - ^ ChangesOrganizer removeChangeSetsNamedSuchThat: nameBlock! Item was removed: - ----- Method: ChangeSorter class>>removeEmptyUnnamedChangeSets (in category 'deprecated') ----- - removeEmptyUnnamedChangeSets - - ^ ChangesOrganizer removeEmptyUnnamedChangeSets! Item was removed: - ----- Method: ChangeSorter class>>reorderChangeSets (in category 'deprecated') ----- - reorderChangeSets - - ^ ChangesOrganizer reorderChangeSets! Item was removed: - ----- Method: ChangeSorter class>>secondaryChangeSet (in category 'deprecated') ----- - secondaryChangeSet - - ^ ChangesOrganizer secondaryChangeSet! Item was changed: + ----- Method: ChangeSorter class>>unload (in category 'initialize-release') ----- - ----- Method: ChangeSorter class>>unload (in category 'deprecated') ----- unload "Unload the receiver from global registries" self environment at: #FileServices ifPresent: [:cl | cl unregisterFileReader: self]. self environment at: #Flaps ifPresent: [:cl | cl unregisterQuadsWithReceiver: self] ! Item was changed: ----- Method: ChangeSorter>>rename (in category 'changeSet menu') ----- rename "Store a new name string into the selected ChangeSet. reject duplicate name; allow user to back out" | newName | newName := UIManager default request: 'New name for this change set' initialAnswer: myChangeSet name. (newName = myChangeSet name or: [newName size = 0]) ifTrue: [^ Beeper beep]. + (ChangeSet named: newName) ifNotNil: - (self class changeSetNamed: newName) ifNotNil: [^ UIManager default inform: 'Sorry that name is already used']. myChangeSet name: newName. self update. self changed: #mainButtonName. self changed: #relabel.! Item was changed: ----- Method: ChangeSorter>>reorderChangeSets (in category 'changeSet menu') ----- reorderChangeSets "apply a standard reordering -- let the class handle this" + ^ ChangesOrganizer reorderChangeSets! - ^ self class reorderChangeSets! Item was changed: ----- Method: ChangesOrganizer class>>allChangeSetNames (in category 'enumerating') ----- allChangeSetNames + ^ ChangeSet allChangeSetNames! - ^ self allChangeSets collect: [:c | c name]! Item was changed: ----- Method: ChangesOrganizer class>>allChangeSetsWithClass:selector: (in category 'enumerating') ----- allChangeSetsWithClass: class selector: selector + + ^ ChangeSet allChangeSetsWithClass: class selector: selector! - class ifNil: [^ #()]. - ^ self allChangeSets select: - [:cs | (cs atSelector: selector class: class) ~~ #none]! Item was changed: ----- Method: ChangesOrganizer class>>buildAggregateChangeSet (in category 'services') ----- buildAggregateChangeSet + + ^ ChangeSet buildAggregateChangeSet! - "Establish a change-set named Aggregate which bears the union of all the changes in all the existing change-sets in the system (other than any pre-existing Aggregate). This can be useful when wishing to discover potential conflicts between a disk-resident change-set and an image. Formerly very useful, now some of its unique contributions have been overtaken by new features" - - | aggregateChangeSet | - aggregateChangeSet := self existingOrNewChangeSetNamed: 'Aggregate'. - aggregateChangeSet clear. - self allChangeSets do: - [:aChangeSet | aChangeSet == aggregateChangeSet ifFalse: - [aggregateChangeSet assimilateAllChangesFoundIn: aChangeSet]] - - "ChangeSorter buildAggregateChangeSet" - - ! Item was changed: ----- Method: ChangesOrganizer class>>highestNumberedChangeSet (in category 'enumerating') ----- highestNumberedChangeSet + + ^ ChangeSet highestNumberedChangeSet! - "ChangeSorter highestNumberedChangeSet" - | aList | - aList := (ChangeSet allChangeSetNames select: [:aString | aString startsWithDigit] thenCollect: - [:aString | aString initialIntegerOrNil]). - ^ (aList size > 0) - ifTrue: - [aList max] - ifFalse: - [nil] - ! Item was changed: ----- Method: DualChangeSorter>>buildWith: (in category 'toolbuilder') ----- buildWith: builder | windowSpec window | leftCngSorter := ChangeSorter new myChangeSet: ChangeSet current. leftCngSorter parent: self. rightCngSorter := ChangeSorter new myChangeSet: + ChangeSet secondaryChangeSet. - ChangeSorter secondaryChangeSet. rightCngSorter parent: self. windowSpec := builder pluggableWindowSpec new. windowSpec model: self. windowSpec label: 'Change Sorter'. windowSpec children: OrderedCollection new. windowSpec label: #labelString. leftCngSorter buildWith: builder in: windowSpec rect: (0@0 extent: 0.5@1). rightCngSorter buildWith: builder in: windowSpec rect: (0.5@0 extent: 0.5@1). window := builder build: windowSpec. leftCngSorter addDependent: window. "so it will get changed: #relabel" rightCngSorter addDependent: window. "so it will get changed: #relabel" ^window! |
Free forum by Nabble | Edit this page |