Skip to content
6 changes: 3 additions & 3 deletions DebuggingSpy-Tests/DSSpyInstrumenterTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ DSSpyInstrumenterTest >> testInstrumentSpCodeBrowse [
codePresenter rawSelection: (1 to: 4).
browseCommand execute.

self assert: self registry size equals: 2.
self assert: self registry size equals: 4.
record := self registry first.

self assert: record class identicalTo: DSBrowseRecord.
Expand Down Expand Up @@ -840,7 +840,7 @@ DSSpyInstrumenterTest >> testInstrumentSpCodeImplementors [
record := self registry first.
self assert: record class identicalTo: DSImplementorsRecord.
self assert: record windowId equals: codePresenter window identityHash.

record := self registry second.
self assert: record class identicalTo: DSWindowOpenedRecord
]
Expand Down Expand Up @@ -895,7 +895,7 @@ DSSpyInstrumenterTest >> testInstrumentSpCodeSenders [
record := self registry first.
self assert: record class identicalTo: DSSendersRecord.
self assert: record windowId equals: codePresenter window identityHash.

record := self registry second.
self assert: record class identicalTo: DSWindowOpenedRecord
]
Expand Down
7 changes: 7 additions & 0 deletions DebuggingSpy/ClyShowMessageImplementorCommand.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Extension { #name : 'ClyShowMessageImplementorCommand' }

{ #category : '*DebuggingSpy' }
ClyShowMessageImplementorCommand >> recordWindow [

^ browser
]
7 changes: 7 additions & 0 deletions DebuggingSpy/ClyShowMessageSenderCommand.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Extension { #name : 'ClyShowMessageSenderCommand' }

{ #category : '*DebuggingSpy' }
ClyShowMessageSenderCommand >> recordWindow [

^ browser
]
39 changes: 39 additions & 0 deletions DebuggingSpy/DSMorphTabRecord.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
"
I am recording the MorphTab in which the user is.
"
Class {
#name : 'DSMorphTabRecord',
#superclass : 'DSAbstractEventRecord',
#instVars : [
'tabName'
],
#category : 'DebuggingSpy-Records',
#package : 'DebuggingSpy',
#tag : 'Records'
}

{ #category : 'instance creation' }
DSMorphTabRecord class >> for: anObject [

| rec |
rec := self new record: anObject.
rec ifNotNil: [ DSRecordRegistry current addRecord: rec ].
^ rec
]

{ #category : 'accessing' }
DSMorphTabRecord >> eventName [

^ 'Changing in tab'
]

{ #category : 'actions api' }
DSMorphTabRecord >> record: aTabGroupMorph [

| tabTool|

tabTool := aTabGroupMorph submorphs first submorphs.
tabTool isEmpty ifTrue: [ ^ nil ].

tabName := tabTool first asString
]
1 change: 0 additions & 1 deletion DebuggingSpy/DSRecordHistory.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,6 @@ DSRecordHistory >> processRecords: array [
self records: (array reject: [ :e | #( 0 ) includes: e windowId ]).

"Transform raw events to model events"
(self allRecordsOfKind: DSStepActionRecord) do: #asStepRecord.
(self allRecordsOfKind: DSAbstractDebugPointEventRecord) do: #asDebugPointRecord.

"Detect if we're in a specific task"
Expand Down
24 changes: 24 additions & 0 deletions DebuggingSpy/DSScrollingRecord.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
"
I am recording events linked to scrolling.
"
Class {
#name : 'DSScrollingRecord',
#superclass : 'DSAbstractEventRecord',
#instVars : [
'toolName'
],
#category : 'DebuggingSpy-Records',
#package : 'DebuggingSpy',
#tag : 'Records'
}

{ #category : 'accessing' }
DSScrollingRecord >> eventName [
^ 'Scrolling'
]

{ #category : 'actions api' }
DSScrollingRecord >> record: aMorph [

toolName := aMorph asString
]
25 changes: 25 additions & 0 deletions DebuggingSpy/DSSpyInstrumenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,16 @@ DSSpyInstrumenter >> instrumentPrintIt [
SpCodePrintItCommand link: DSPrintItRecord link toAST: (SpCodePrintItCommand >> #execute) ast
]

{ #category : 'interactions' }
DSSpyInstrumenter >> instrumentScrolling [
"Instruments the scrolling in different components"

Morph link: DSScrollingRecord link toAST: (Morph >> #mouseWheel:) ast.
Morph link: DSScrollingRecord link toAST: (Morph >> #dragging:) ast.
GeneralScrollPaneMorph link: DSScrollingRecord link toAST: (GeneralScrollPaneMorph >> #mouseWheel:) ast

]

{ #category : 'system' }
DSSpyInstrumenter >> instrumentSendersActions [
"Instruments actions to show senders of a method or class"
Expand Down Expand Up @@ -181,11 +191,19 @@ DSSpyInstrumenter >> instrumentSystem [
self logCodeInteractions.
self logBrowsingActions.
self logDebuggerActions.
self logClyBrowserActions.

"Intruments exceptions"
self instrumentExceptionSignalling
]

{ #category : 'interactions' }
DSSpyInstrumenter >> instrumentTabMorph [
"Instruments the active Tab Morph"

TabGroupMorph link: DSMorphTabRecord link toAST: (TabGroupMorph >> #update:with:) ast
]

{ #category : 'debugpoints' }
DSSpyInstrumenter >> listenToDebugPointChanges [
"Listen to the announcements link to debugPoints modification and record the event"
Expand Down Expand Up @@ -231,6 +249,13 @@ DSSpyInstrumenter >> logClipboardActions [
self instrumentPaste
]

{ #category : 'system-instrumentation' }
DSSpyInstrumenter >> logClyBrowserActions [
"Instrument actions link to the Browser UI : scrolling, change in tabs, ..."

self instrumentTabMorph
]

{ #category : 'system-instrumentation' }
DSSpyInstrumenter >> logCodeInteractions [
"Instruments actions linked to code execution : do it, print it, inspect it, ..."
Expand Down