Skip to content

Commit

Permalink
Prevent the browsing of a removed element
Browse files Browse the repository at this point in the history
Fixes pharo-project/pharo#14300

As a bonus I fixed some protocols
  • Loading branch information
jecisc committed Jul 28, 2023
1 parent d5f3d1e commit f200db4
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Iceberg-TipUI/IceTipAddRemoteCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ IceTipAddRemoteCommand class >> defaultName [
^ 'Add remote'
]

{ #category : #executing }
{ #category : #testing }
IceTipAddRemoteCommand >> canBeExecuted [
"Any repository can have more remotes."

Expand Down
6 changes: 3 additions & 3 deletions Iceberg-TipUI/IceTipBrowseCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ IceTipBrowseCommand class >> defaultName [
^ 'Browse...'
]

{ #category : #executing }
{ #category : #testing }
IceTipBrowseCommand >> canBeExecuted [
"In the case of a method removal it is not possible to browse the selected element."

^ self hasSelectedItem

^ self hasSelectedItem and: [ self item value definition canBeBrowsed ]
]

{ #category : #executing }
Expand Down
2 changes: 1 addition & 1 deletion Iceberg-TipUI/IceTipInspectCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ IceTipInspectCommand class >> defaultName [
^ 'Inspect...'
]

{ #category : #executing }
{ #category : #testing }
IceTipInspectCommand >> canBeExecuted [

^ self context hasSelectedItem
Expand Down
2 changes: 1 addition & 1 deletion Iceberg-TipUI/IceTipRemotesTreeCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ IceTipRemotesTreeCommand >> actsOnTag: aTagModel [
^ false
]

{ #category : #executing }
{ #category : #testing }
IceTipRemotesTreeCommand >> canBeExecuted [

^ self hasSelectedItem and: [ self item canActivateCommand: self ]
Expand Down
2 changes: 1 addition & 1 deletion Iceberg-TipUI/IceTipTreeCollapseCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ IceTipTreeCollapseCommand class >> defaultName [
^ 'Collapse'
]

{ #category : #executing }
{ #category : #testing }
IceTipTreeCollapseCommand >> canBeExecuted [

^ self hasSelectedItem
Expand Down
2 changes: 1 addition & 1 deletion Iceberg-TipUI/IceTipTreeExpandCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ IceTipTreeExpandCommand class >> defaultName [
^ 'Expand'
]

{ #category : #executing }
{ #category : #testing }
IceTipTreeExpandCommand >> canBeExecuted [

^ self hasSelectedItem
Expand Down

0 comments on commit f200db4

Please sign in to comment.