Last active
October 20, 2021 16:07
-
-
Save estebanlm/9a15ce0f3c1eef61af5062ccf51d1605 to your computer and use it in GitHub Desktop.
Example StInspector complex extension with activation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collection >> tabInspectorList: builder [ | |
<inspectorPresentationOrder: 90 title: 'Tab View'> | |
^ StCollectionExampleInspection on: self | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class { | |
#name : #StCollectionExampleInspection, | |
#superclass : #StInspection, | |
#instVars : [ | |
'notebook', | |
'unorderedList', | |
'orderedList' | |
], | |
#category : #'NewTools-Inspector-View' | |
} | |
{ #category : #testing } | |
StCollectionExampleInspection >> hasOutputActivationPort [ | |
^ true | |
] | |
{ #category : #initialization } | |
StCollectionExampleInspection >> initializePresenters [ | |
self layout: (SpBoxLayout newTopToBottom | |
add: (notebook := self newNotebook); | |
yourself). | |
orderedList := self newList. | |
unorderedList := self newList. | |
notebook | |
addPage: (SpNotebookPage | |
title: 'Raw' | |
icon: (self iconNamed: #nautilusIcon) | |
provider: [ unorderedList items: self model; yourself ]); | |
addPage: (SpNotebookPage | |
title: 'Sorted' | |
icon: (self iconNamed: #nautilusIcon) | |
provider: [ orderedList items: self model asSortedCollection ]) | |
] | |
{ #category : #ports } | |
StCollectionExampleInspection >> outputActivationPort [ | |
^ unorderedList outputActivationPort, | |
orderedList outputActivationPort | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mmm... that example misses two methods: