diff --git a/src/GT-PackageWithSubclasses/GtCoderDummySubclass.class.st b/src/GT-PackageWithSubclasses/GtCoderDummySubclass.class.st index 2752d1ae..b08214e8 100644 --- a/src/GT-PackageWithSubclasses/GtCoderDummySubclass.class.st +++ b/src/GT-PackageWithSubclasses/GtCoderDummySubclass.class.st @@ -1,5 +1,8 @@ Class { #name : #GtCoderDummySubclass, #superclass : #GtCoderDummySuperclass, + #instVars : [ + 'varB' + ], #category : #'GT-PackageWithSubclasses-Classes' } diff --git a/src/GT-PackageWithSuperclasses/GtCoderDummySuperclass.class.st b/src/GT-PackageWithSuperclasses/GtCoderDummySuperclass.class.st index 0458d856..6a7b7b38 100644 --- a/src/GT-PackageWithSuperclasses/GtCoderDummySuperclass.class.st +++ b/src/GT-PackageWithSuperclasses/GtCoderDummySuperclass.class.st @@ -1,6 +1,9 @@ Class { #name : #GtCoderDummySuperclass, #superclass : #Object, + #instVars : [ + 'varA' + ], #category : #'GT-PackageWithSuperclasses-Classes' } diff --git a/src/GToolkit-Pharo-Coder-Examples/GtCoderNavigationPackagesTagsClassesModelExamples.class.st b/src/GToolkit-Pharo-Coder-Examples/GtCoderNavigationPackagesTagsClassesModelExamples.class.st index 74e270c2..7e808e67 100644 --- a/src/GToolkit-Pharo-Coder-Examples/GtCoderNavigationPackagesTagsClassesModelExamples.class.st +++ b/src/GToolkit-Pharo-Coder-Examples/GtCoderNavigationPackagesTagsClassesModelExamples.class.st @@ -178,7 +178,7 @@ GtCoderNavigationPackagesTagsClassesModelExamples >> navigateToClass_02_selectTa { #category : #'examples - navigate to class' } GtCoderNavigationPackagesTagsClassesModelExamples >> navigateToClass_03_selectClass [ - | aModel classesToShow protocolsToShow aClassToSelect methodsToShow | + | aModel classesToShow protocolsToShow aClassToSelect methodsToShow slotsToShow | aClassToSelect := self dummySuperclass. @@ -200,11 +200,15 @@ GtCoderNavigationPackagesTagsClassesModelExamples >> navigateToClass_03_selectCl self assert: aModel hasSelectedProtocol. self assert: aModel selectedProtocol name equals: 'All'. + self assert: aModel hasSelectedSlot not. + methodsToShow := aModel methodsToShow. self assert: (methodsToShow includes: aClassToSelect >> #unclassifiedMethod). self assert: (methodsToShow includes: aClassToSelect >> #methodInApiProtocol). self assert: (methodsToShow includes: aClassToSelect class >> #instanceCreationMethod). + + slotsToShow := aModel slotsToShow. ^ aModel ] diff --git a/src/GToolkit-Pharo-Coder/GtCoderNavigationPackagesTagsClassesModel.class.st b/src/GToolkit-Pharo-Coder/GtCoderNavigationPackagesTagsClassesModel.class.st index df403c4a..1f22446a 100644 --- a/src/GToolkit-Pharo-Coder/GtCoderNavigationPackagesTagsClassesModel.class.st +++ b/src/GToolkit-Pharo-Coder/GtCoderNavigationPackagesTagsClassesModel.class.st @@ -979,6 +979,23 @@ GtCoderNavigationPackagesTagsClassesModel >> showPackage: anRPackage [ ^ true ] +{ #category : #'api - accessing' } +GtCoderNavigationPackagesTagsClassesModel >> slotsToShow [ + + | currentClass instanceSlots classInstanceSlots classSlots | + + self hasSelectedClass + ifFalse: [ ^ #() ]. + + currentClass := self selectedClass. + + instanceSlots := currentClass instanceSide instanceVariables. + classInstanceSlots := currentClass classSide instanceVariables. + classSlots := currentClass classVariables. + + ^ instanceSlots, classInstanceSlots, classSlots +] + { #category : #'api - subscriptions' } GtCoderNavigationPackagesTagsClassesModel >> subscribeToSystem [ SystemAnnouncer uniqueInstance weak