Skip to content

Commit

Permalink
use newUnloadAction
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanlm committed Jan 7, 2024
1 parent 71af726 commit 7e80198
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
29 changes: 15 additions & 14 deletions Iceberg-TipUI/IceTipPackageModel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,21 @@ IceTipPackageModel >> newRemoveAction [
yourself
]

{ #category : 'actions' }
IceTipPackageModel >> newUnloadAction [
<noCache>

^ IceTipStandardAction new
repository: self entity repository;
message: ('Unloading package {1}' format: { self entity name });
onSuccessRepositoryModified;
action: [
Iceberg announcer
suspendAllForRepository: self entity repository
while: [ self entity unload ] ];
yourself
]

{ #category : 'accessing' }
IceTipPackageModel >> packageName [
^ self entity packageName
Expand All @@ -131,17 +146,3 @@ IceTipPackageModel >> statusDecorator [
ifFalse: [ IceTipDescriptionDecorator notLoaded ].
^ super statusDecorator
]

{ #category : 'actions' }
IceTipPackageModel >> unload [
<noCache>

IceTipStandardAction new
repository: self entity repository;
message: ('Unloading package {1}' format: { self entity name });
onSuccessRepositoryModified;
execute: [
Iceberg announcer
suspendAllForRepository: self entity repository
while: [ self entity unload ] ]
]
2 changes: 1 addition & 1 deletion Iceberg-TipUI/IceTipUnloadPackageCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ IceTipUnloadPackageCommand >> canBeExecuted [
{ #category : 'executing' }
IceTipUnloadPackageCommand >> execute [

self packageModel unload
self packageModel newUnloadAction executeWithContext: self context
]

{ #category : 'accessing' }
Expand Down

0 comments on commit 7e80198

Please sign in to comment.