From 1a52dbf6e9c2f6de15f3257b83942d45dd2c8789 Mon Sep 17 00:00:00 2001 From: Carolina Hernandez Date: Mon, 16 Oct 2023 15:27:29 -0300 Subject: [PATCH] Solves small issuel --- src/NewTools-Scopes-Browser/ScopesPresenter.class.st | 4 +++- src/NewTools-Scopes/ScopesManager.class.st | 11 +++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/NewTools-Scopes-Browser/ScopesPresenter.class.st b/src/NewTools-Scopes-Browser/ScopesPresenter.class.st index a25afe9f5..8d1335eb7 100644 --- a/src/NewTools-Scopes-Browser/ScopesPresenter.class.st +++ b/src/NewTools-Scopes-Browser/ScopesPresenter.class.st @@ -132,7 +132,9 @@ ScopesPresenter >> deleteSelectedScope [ | item | item := scopesTree selectedItem. - self assert: item isScopeNode. + (item isNil or: [item isScopeNode not]) ifTrue: [ + self inform: 'select a scope'. + ^ self ]. model removeScope: item value. self updateScopesTree diff --git a/src/NewTools-Scopes/ScopesManager.class.st b/src/NewTools-Scopes/ScopesManager.class.st index ab6f61855..ade5ce0e9 100644 --- a/src/NewTools-Scopes/ScopesManager.class.st +++ b/src/NewTools-Scopes/ScopesManager.class.st @@ -18,6 +18,17 @@ Class { #tag : 'Core' } +{ #category : 'accessing' } +ScopesManager class >> addScope: aScope [ + self singleInstance addScope: aScope +] + +{ #category : 'accessing' } +ScopesManager class >> availableScopes [ + + ^ self scopes +] + { #category : 'accessing' } ScopesManager class >> invalidNames [ ^ self scopes collect: [ :e | e label ]