-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add class hierarchy and class scopes [feenkcom/gtoolkit#3983]
- Loading branch information
1 parent
c36ca3f
commit e0e6ef9
Showing
3 changed files
with
74 additions
and
5 deletions.
There are no files selected for viewing
66 changes: 66 additions & 0 deletions
66
src/GToolkit-Pharo-SearchFilters/GtSearchScopedMethodsClassHierarchyScope.class.st
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
Class { | ||
#name : #GtSearchScopedMethodsClassHierarchyScope, | ||
#superclass : #GtSearchScopedMethodsScope, | ||
#instVars : [ | ||
'itemClass', | ||
'filter' | ||
], | ||
#category : #'GToolkit-Pharo-SearchFilters-Support' | ||
} | ||
|
||
{ #category : #factory } | ||
GtSearchScopedMethodsClassHierarchyScope class >> itemInstancesForFilterContext: aFilterContext into: aStream [ | ||
aFilterContext | ||
behaviorDo: [ :aBehavior | aStream nextPut: (self new itemClass: aBehavior) ] | ||
] | ||
|
||
{ #category : #accessing } | ||
GtSearchScopedMethodsClassHierarchyScope class >> order [ | ||
^ 300 | ||
] | ||
|
||
{ #category : #accessing } | ||
GtSearchScopedMethodsClassHierarchyScope >> gtIconName [ | ||
^ #class | ||
] | ||
|
||
{ #category : #accessing } | ||
GtSearchScopedMethodsClassHierarchyScope >> icon [ | ||
^ BrGlamorousIcons verticaltree asElement | ||
] | ||
|
||
{ #category : #testing } | ||
GtSearchScopedMethodsClassHierarchyScope >> includesMethod: aCompiledMethod [ | ||
<return: #Boolean> | ||
^ filter includesMethod: aCompiledMethod | ||
] | ||
|
||
{ #category : #initialization } | ||
GtSearchScopedMethodsClassHierarchyScope >> initialize [ | ||
super initialize. | ||
|
||
filter := GtSearchInheritedMethodsFilter new | ||
withSubclasses; | ||
withSuperclasses | ||
] | ||
|
||
{ #category : #accessing } | ||
GtSearchScopedMethodsClassHierarchyScope >> itemClass [ | ||
^ itemClass | ||
] | ||
|
||
{ #category : #accessing } | ||
GtSearchScopedMethodsClassHierarchyScope >> itemClass: aClass [ | ||
itemClass := aClass. | ||
filter forClass: aClass | ||
] | ||
|
||
{ #category : #accessing } | ||
GtSearchScopedMethodsClassHierarchyScope >> itemValue [ | ||
^ self itemClass | ||
] | ||
|
||
{ #category : #accessing } | ||
GtSearchScopedMethodsClassHierarchyScope >> label [ | ||
^ 'Hierarchy: ' , (self itemClass ifNotNil: #name ifNil: [ 'none' ]) | ||
] |
This file contains 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
This file contains 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