diff --git a/DebuggingSpy-Tests/DSSpyInstrumenterTest.class.st b/DebuggingSpy-Tests/DSSpyInstrumenterTest.class.st index 3747ab7..a00c8be 100644 --- a/DebuggingSpy-Tests/DSSpyInstrumenterTest.class.st +++ b/DebuggingSpy-Tests/DSSpyInstrumenterTest.class.st @@ -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. @@ -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 ] @@ -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 ] diff --git a/DebuggingSpy/ClyShowMessageImplementorCommand.extension.st b/DebuggingSpy/ClyShowMessageImplementorCommand.extension.st new file mode 100644 index 0000000..57cb831 --- /dev/null +++ b/DebuggingSpy/ClyShowMessageImplementorCommand.extension.st @@ -0,0 +1,7 @@ +Extension { #name : 'ClyShowMessageImplementorCommand' } + +{ #category : '*DebuggingSpy' } +ClyShowMessageImplementorCommand >> recordWindow [ + + ^ browser +] diff --git a/DebuggingSpy/ClyShowMessageSenderCommand.extension.st b/DebuggingSpy/ClyShowMessageSenderCommand.extension.st new file mode 100644 index 0000000..378fb78 --- /dev/null +++ b/DebuggingSpy/ClyShowMessageSenderCommand.extension.st @@ -0,0 +1,7 @@ +Extension { #name : 'ClyShowMessageSenderCommand' } + +{ #category : '*DebuggingSpy' } +ClyShowMessageSenderCommand >> recordWindow [ + + ^ browser +] diff --git a/DebuggingSpy/DSMorphTabRecord.class.st b/DebuggingSpy/DSMorphTabRecord.class.st new file mode 100644 index 0000000..904dec0 --- /dev/null +++ b/DebuggingSpy/DSMorphTabRecord.class.st @@ -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 +] diff --git a/DebuggingSpy/DSRecordHistory.class.st b/DebuggingSpy/DSRecordHistory.class.st index b969084..e420809 100644 --- a/DebuggingSpy/DSRecordHistory.class.st +++ b/DebuggingSpy/DSRecordHistory.class.st @@ -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" diff --git a/DebuggingSpy/DSScrollingRecord.class.st b/DebuggingSpy/DSScrollingRecord.class.st new file mode 100644 index 0000000..c07bf2e --- /dev/null +++ b/DebuggingSpy/DSScrollingRecord.class.st @@ -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 +] diff --git a/DebuggingSpy/DSSpyInstrumenter.class.st b/DebuggingSpy/DSSpyInstrumenter.class.st index 14407d3..a6ee8e1 100644 --- a/DebuggingSpy/DSSpyInstrumenter.class.st +++ b/DebuggingSpy/DSSpyInstrumenter.class.st @@ -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" @@ -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" @@ -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, ..."