diff --git a/src/NewTools-ScopesBrowser/Behavior.extension.st b/src/NewTools-ScopesBrowser/Behavior.extension.st new file mode 100644 index 000000000..0d658d2fc --- /dev/null +++ b/src/NewTools-ScopesBrowser/Behavior.extension.st @@ -0,0 +1,6 @@ +Extension { #name : 'Behavior' } + +{ #category : '*NewTools-ScopesBrowser' } +Behavior >> scopesIconName [ + ^ #class +] diff --git a/src/NewTools-ScopesBrowser/RPackage.extension.st b/src/NewTools-ScopesBrowser/RPackage.extension.st new file mode 100644 index 000000000..445da3e6e --- /dev/null +++ b/src/NewTools-ScopesBrowser/RPackage.extension.st @@ -0,0 +1,6 @@ +Extension { #name : 'RPackage' } + +{ #category : '*NewTools-ScopesBrowser' } +RPackage >> scopesIconName [ + ^ #package +] diff --git a/src/NewTools-ScopesBrowser/SpMorphicTreeTableAdapter.extension.st b/src/NewTools-ScopesBrowser/SpMorphicTreeTableAdapter.extension.st new file mode 100644 index 000000000..82aeff15d --- /dev/null +++ b/src/NewTools-ScopesBrowser/SpMorphicTreeTableAdapter.extension.st @@ -0,0 +1,6 @@ +Extension { #name : 'SpMorphicTreeTableAdapter' } + +{ #category : '*NewTools-ScopesBrowser' } +SpMorphicTreeTableAdapter >> togglePath: aPath [ + widget dataSource togglePath: aPath +] diff --git a/src/NewTools-ScopesBrowser/SpMorphicTreeTableDataSource.extension.st b/src/NewTools-ScopesBrowser/SpMorphicTreeTableDataSource.extension.st new file mode 100644 index 000000000..f0a31fb9f --- /dev/null +++ b/src/NewTools-ScopesBrowser/SpMorphicTreeTableDataSource.extension.st @@ -0,0 +1,8 @@ +Extension { #name : 'SpMorphicTreeTableDataSource' } + +{ #category : '*NewTools-ScopesBrowser' } +SpMorphicTreeTableDataSource >> togglePath: aPath [ + (self itemAtPath: aPath) ifNotNil:[ :aNode | + aNode toggle. + self tableRefresh ] +] diff --git a/src/NewTools-ScopesBrowser/SpTreeTablePresenter.extension.st b/src/NewTools-ScopesBrowser/SpTreeTablePresenter.extension.st new file mode 100644 index 000000000..18fb51e04 --- /dev/null +++ b/src/NewTools-ScopesBrowser/SpTreeTablePresenter.extension.st @@ -0,0 +1,22 @@ +Extension { #name : 'SpTreeTablePresenter' } + +{ #category : '*NewTools-ScopesBrowser' } +SpTreeTablePresenter >> collapseSelectedItems [ + self selection selectedPaths do: [ :path | self collapsePath: path ] +] + +{ #category : '*NewTools-ScopesBrowser' } +SpTreeTablePresenter >> expandSelectedItems [ + self selection selectedPaths do: [ :path | self expandPath: path ] +] + +{ #category : '*NewTools-ScopesBrowser' } +SpTreeTablePresenter >> togglePath: aPath [ + self withAdapterPerformOrDefer: [ :anAdapter | + anAdapter togglePath: aPath ] +] + +{ #category : '*NewTools-ScopesBrowser' } +SpTreeTablePresenter >> toggleSelectedItems [ + self selection selectedPaths do: [ :path | self togglePath: path ] +]