Skip to content

Commit

Permalink
Merge pull request #509 from jordanmontt/inspector-package-extensions
Browse files Browse the repository at this point in the history
Added inspector extensions for RPackage
  • Loading branch information
jecisc authored Apr 19, 2023
2 parents 296db44 + 87e6d83 commit f79ad42
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/NewTools-Inspector-Extensions/RPackage.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Extension { #name : #RPackage }

{ #category : #'*NewTools-Inspector-Extensions' }
RPackage >> baselineInspector [

<inspectorPresentationOrder: 2 title: 'Belongs to Baselines'>
| items |
items := BaselineOf allSubclasses select: [ :e | e allPackageNames includes: self name ].
^ SpListPresenter new
items: items;
yourself
]

{ #category : #'*NewTools-Inspector-Extensions' }
RPackage >> overwiew [

<inspectorPresentationOrder: 1 title: 'Overwiew'>
| items |
items :={ 'Classes' -> self classes . 'Defined classes' -> self definedClasses . 'Methods' -> self methods }.
items := items collect: [ :e | StInspectorAssociationNode hostObject: e ].
^ SpTablePresenter new
alternateRowsColor;
items: items;
addColumn: (SpStringTableColumn
title: 'Title'
evaluated: [ :e | e key ] );
addColumn: (SpStringTableColumn
title: 'Value'
evaluated: [ :e | e value size ] );
yourself
]

0 comments on commit f79ad42

Please sign in to comment.