Skip to content

Commit

Permalink
First steps towards displaying scopes on calypso
Browse files Browse the repository at this point in the history
  • Loading branch information
carolahp committed Oct 12, 2023
1 parent 2821b20 commit 24c915e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/NewTools-Scopes-Browser/ScopesPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@ ScopesPresenter >> addScopeToTree: aRBEnvironment [
asOrderedCollection
]

{ #category : 'accessing' }
ScopesPresenter >> argumentsListMenu [
^ self newMenu
addGroup: [ :aGroup |
aGroup
addItem: [ :anItem |
anItem
name: 'Open on calypso';
visibleIf: [ scopesTree selectedItem isScopeNode ];
action: [ self openOnCalypso: scopesTree selectedItem value ] ] ]
]

{ #category : 'deletion' }
ScopesPresenter >> deleteSelectedScope [

Expand Down Expand Up @@ -95,7 +107,8 @@ ScopesPresenter >> initializeScopesTree [
ScopeScopeNode on: package ]) asOrderedCollection sorted;
beResizable;
activateOnDoubleClick;
whenActivatedDo: [ :selection | scopesTree toggleSelectedItems ]
whenActivatedDo: [ :selection | scopesTree toggleSelectedItems ];
contextMenu: self argumentsListMenu
]

{ #category : 'accessing' }
Expand Down Expand Up @@ -126,6 +139,11 @@ ScopesPresenter >> nodesListColumn [
yourself
]

{ #category : 'private' }
ScopesPresenter >> openOnCalypso: aScope [
ClyFullBrowserMorph openOn: aScope
]

{ #category : 'private' }
ScopesPresenter >> openScopeEditor [
self newScopeEditor open
Expand Down
11 changes: 11 additions & 0 deletions src/NewTools-Scopes/RBBrowserEnvironmentWrapper.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Extension { #name : 'RBBrowserEnvironmentWrapper' }

{ #category : '*NewTools-Scopes' }
RBBrowserEnvironmentWrapper >> packagesDo: aBlock [
self packages do: [ :each | aBlock value: each ]
]

{ #category : '*NewTools-Scopes' }
RBBrowserEnvironmentWrapper >> systemScope [
^ self
]

0 comments on commit 24c915e

Please sign in to comment.