Skip to content

Commit

Permalink
highlight halt feenkcom/gtoolkit#1872
Browse files Browse the repository at this point in the history
  • Loading branch information
girba committed Apr 18, 2021
1 parent 1e66d30 commit 08fb642
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/GToolkit-Pharo-Coder/GtCoderHaltStyler.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Class {
#name : #GtCoderHaltStyler,
#superclass : #GtGenericPharoStyler,
#category : #'GToolkit-Pharo-Coder-Coders'
}

{ #category : #accessing }
GtCoderHaltStyler >> visitMessage: aMessageNode [
super visitMessage: aMessageNode.
aMessageNode selector = #halt ifTrue: [
self
attribute: (BlTextHighlightAttribute paint: BrGlamorousColors errorBackgroundColor)
from: aMessageNode startPosition
to: aMessageNode stopPosition ].
]
6 changes: 6 additions & 0 deletions src/GToolkit-Pharo-Coder/GtPharoMethodCoder.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,12 @@ GtPharoMethodCoder >> gtDiffViewFor: aView [
create ]"
]

{ #category : #'api - addons' }
GtPharoMethodCoder >> haltAddOnFor: anAST into: coderAddOns [
<gtAstCoderAddOns: 20>
coderAddOns addStyler: GtCoderHaltStyler new
]

{ #category : #private }
GtPharoMethodCoder >> handleCompilerErrorsDuring: aBlock [
^ [
Expand Down

0 comments on commit 08fb642

Please sign in to comment.