-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
the locate debugger button is placed in the same place as the embedde…
…d debugger [feenkcom/gtoolkit#3735]
- Loading branch information
1 parent
13ed295
commit 45c631a
Showing
3 changed files
with
119 additions
and
13 deletions.
There are no files selected for viewing
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
74 changes: 74 additions & 0 deletions
74
src/GToolkit-Coder-UI/GtCoderEvaluatedCodeIntervalFinder.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,74 @@ | ||
Class { | ||
#name : #GtCoderEvaluatedCodeIntervalFinder, | ||
#superclass : #Object, | ||
#instVars : [ | ||
'debugSession', | ||
'context', | ||
'sourceString', | ||
'evaluatedCode' | ||
], | ||
#category : #'GToolkit-Coder-UI-Coders - Evaluation' | ||
} | ||
|
||
{ #category : #accessing } | ||
GtCoderEvaluatedCodeIntervalFinder >> context [ | ||
<return: #Context> | ||
^ context | ||
] | ||
|
||
{ #category : #accessing } | ||
GtCoderEvaluatedCodeIntervalFinder >> context: aContext [ | ||
context := aContext | ||
] | ||
|
||
{ #category : #accessing } | ||
GtCoderEvaluatedCodeIntervalFinder >> debugSession [ | ||
<return: #DebugSession> | ||
^ debugSession | ||
] | ||
|
||
{ #category : #accessing } | ||
GtCoderEvaluatedCodeIntervalFinder >> debugSession: anObject [ | ||
debugSession := anObject | ||
] | ||
|
||
{ #category : #accessing } | ||
GtCoderEvaluatedCodeIntervalFinder >> evaluatedCode [ | ||
<return: #TGtSourceCoderEvaluatedCode> | ||
^ evaluatedCode | ||
] | ||
|
||
{ #category : #accessing } | ||
GtCoderEvaluatedCodeIntervalFinder >> evaluatedCode: anObject [ | ||
evaluatedCode := anObject | ||
] | ||
|
||
{ #category : #finding } | ||
GtCoderEvaluatedCodeIntervalFinder >> find [ | ||
"Return an interval that corresponds to a given evaluated code." | ||
|
||
<return: #Interval or: nil> | ||
debugSession ifNil: [ ^ nil ]. | ||
debugSession process ifNil: [ ^ nil ]. | ||
context ifNil: [ ^ nil ]. | ||
context isDead ifTrue: [ ^ nil ]. | ||
|
||
^ self | ||
forPharo11OrNewer: [ self debugSession pcRangeForContext: context ] | ||
forPharo10: [ evaluatedCode ifNil: [ ^ nil ]. | ||
sourceString ifNil: [ ^ nil ]. | ||
self evaluatedCode | ||
findSourceIntervalForContext: context | ||
sourceString: sourceString ] | ||
] | ||
|
||
{ #category : #accessing } | ||
GtCoderEvaluatedCodeIntervalFinder >> sourceString [ | ||
<return: #String> | ||
^ sourceString | ||
] | ||
|
||
{ #category : #accessing } | ||
GtCoderEvaluatedCodeIntervalFinder >> sourceString: anObject [ | ||
sourceString := anObject | ||
] |