Skip to content

Commit

Permalink
warnings about changing computed category
Browse files Browse the repository at this point in the history
  • Loading branch information
ericwinger committed Feb 28, 2024
1 parent 796084a commit 096836d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Jadeite-Traits/JadeiteFilterTrait.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,15 @@ JadeiteFilterTrait >> openMethodListOn: service selectingAnyMatch: string sessio

{ #category : 'actions' }
JadeiteFilterTrait >> removeMethodCategories [

| selections |
selections := self categoryListPresenter selections.
selections isEmpty ifTrue: [^MessageBox notify: 'No categories selected'].
(self confirmCategoryRemoval: selections) ifFalse: [^self].
selections do: [ :jadeiteCategory |
jadeiteCategory isComputed ifTrue: [
^ MessageBox notify: 'Cannot rename computed category' ] ].
selections isEmpty ifTrue: [
^ MessageBox notify: 'No categories selected' ].
(self confirmCategoryRemoval: selections) ifFalse: [ ^ self ].
self basicRemoveMethodCategories
]

Expand All @@ -239,6 +244,7 @@ JadeiteFilterTrait >> renameMethodCategory [

| new current |
current := self categoryListPresenter jaditeSelection.
current isComputed ifTrue:[^MessageBox notify: 'Cannot rename computed category'].
(new := Prompter
on: current
prompt: 'New method category?'
Expand Down

0 comments on commit 096836d

Please sign in to comment.