Skip to content

Commit

Permalink
Refactor: wrap a list of chagnes in a CompositeChange
Browse files Browse the repository at this point in the history
  • Loading branch information
balsa-sarenac committed Apr 26, 2024
1 parent 140482a commit 945a477
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/Refactoring-Changes/RBRefactoryChangeManager.class.st
Expand Up @@ -201,12 +201,16 @@ RBRefactoryChangeManager >> performChange: aRefactoringChange [

{ #category : 'public access' }
RBRefactoryChangeManager >> performChanges: aRefactoringChangesList [

self ignoreChangesWhile: [
aRefactoringChangesList do: [ :change |
self addUndo: change execute.
self addUndoPointer: self class nextCounter ]
]

| compositeChange |
aRefactoringChangesList ifEmpty: [ ^ self ].
compositeChange := RBCompositeRefactoryChange new.
compositeChange onSystemDictionary:
aRefactoringChangesList first onSystemDictionary.
compositeChange changes: aRefactoringChangesList.
self ignoreChangesWhile: [
self addUndo: compositeChange execute.
self addUndoPointer: self class nextCounter ]
]

{ #category : 'public access' }
Expand Down

0 comments on commit 945a477

Please sign in to comment.