Skip to content

Commit

Permalink
Merge pull request #602 from MarcusDenker/Pragma-inspector
Browse files Browse the repository at this point in the history
Improve the inspector for Pragma to highlight the pragma in the source
  • Loading branch information
jecisc authored Oct 24, 2023
2 parents 9899511 + b5aec84 commit 5565a5b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/NewTools-Inspector-Extensions/Pragma.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ Extension { #name : 'Pragma' }
{ #category : '*NewTools-Inspector-Extensions' }
Pragma >> inspectionSourceCodeMethod [
<inspectorPresentationOrder: 30 title: 'Method'>

| interval |

interval := self sourceNode sourceInterval.
^ SpCodePresenter new
beForMethod: self method;
text: self method sourceCode;
beForMethod: method ast;
text: method sourceCode;
addTextSegmentDecoration: (SpTextPresenterDecorator forHighlight
interval: (interval first to: interval last + 1);
yourself);
yourself
]

0 comments on commit 5565a5b

Please sign in to comment.