diff --git a/.github/workflows/dsspy.yaml b/.github/workflows/dsspy.yaml index 7213dad..7dcd310 100644 --- a/.github/workflows/dsspy.yaml +++ b/.github/workflows/dsspy.yaml @@ -9,7 +9,7 @@ jobs: PROJECT_NAME: ${{ matrix.smalltalk }}-DebuggingSpy strategy: matrix: - smalltalk: [ Pharo64-12 ] + smalltalk: [ Pharo64-9.0 ] name: ${{ matrix.smalltalk }} steps: - uses: actions/checkout@v2 diff --git a/DebuggingSpy-Tests/DSFakeTextEditor.class.st b/DebuggingSpy-Tests/DSFakeTextEditor.class.st index 39abfc1..a1c06c7 100644 --- a/DebuggingSpy-Tests/DSFakeTextEditor.class.st +++ b/DebuggingSpy-Tests/DSFakeTextEditor.class.st @@ -3,12 +3,11 @@ I am a fake text editor that inherits from RubTextEditor. My purpose is to ease testing of instrumented methods from RubTextEditor without triggering a full behavior of the text editor that is in an incomplete state for the tests. " Class { - #name : 'DSFakeTextEditor', - #superclass : 'RubSmalltalkEditor', - #category : 'DebuggingSpy-Tests', - #package : 'DebuggingSpy-Tests' + #name : #DSFakeTextEditor, + #superclass : #RubSmalltalkEditor, + #category : #'DebuggingSpy-Tests' } -{ #category : 'accessing' } +{ #category : #accessing } DSFakeTextEditor >> contents: anObject [ ] diff --git a/DebuggingSpy-Tests/DSNoDebuggerSelectionStrategy.class.st b/DebuggingSpy-Tests/DSNoDebuggerSelectionStrategy.class.st index 7b47f33..f9048c6 100644 --- a/DebuggingSpy-Tests/DSNoDebuggerSelectionStrategy.class.st +++ b/DebuggingSpy-Tests/DSNoDebuggerSelectionStrategy.class.st @@ -2,18 +2,17 @@ I am a debugger opening strategy that eat all debugger opening requests to avoid opening debuggers during testing. " Class { - #name : 'DSNoDebuggerSelectionStrategy', - #superclass : 'OupsDebuggerSelectionStrategy', - #category : 'DebuggingSpy-Tests', - #package : 'DebuggingSpy-Tests' + #name : #DSNoDebuggerSelectionStrategy, + #superclass : #OupsDebuggerSelectionStrategy, + #category : #'DebuggingSpy-Tests' } -{ #category : 'iterating' } +{ #category : #iterating } DSNoDebuggerSelectionStrategy >> nextDebugger [ ^ self ] -{ #category : 'debuggers' } +{ #category : #debuggers } DSNoDebuggerSelectionStrategy >> openDebuggerForSession: aDebugSession [ ^self ] diff --git a/DebuggingSpy-Tests/DSRecordRegistryTest.class.st b/DebuggingSpy-Tests/DSRecordRegistryTest.class.st index a3ca554..b444cdd 100644 --- a/DebuggingSpy-Tests/DSRecordRegistryTest.class.st +++ b/DebuggingSpy-Tests/DSRecordRegistryTest.class.st @@ -1,26 +1,25 @@ Class { - #name : 'DSRecordRegistryTest', - #superclass : 'TestCase', + #name : #DSRecordRegistryTest, + #superclass : #TestCase, #instVars : [ 'record' ], - #category : 'DebuggingSpy-Tests', - #package : 'DebuggingSpy-Tests' + #category : #'DebuggingSpy-Tests' } -{ #category : 'running' } +{ #category : #running } DSRecordRegistryTest >> tearDown [ DSRecordRegistry autoSerialize: nil. super tearDown ] -{ #category : 'tests' } +{ #category : #tests } DSRecordRegistryTest >> testAutoSerialize [ self deny: DSRecordRegistry autoSerialize ] -{ #category : 'tests' } +{ #category : #tests } DSRecordRegistryTest >> testAutoSerializeRecord [ |materializedRecord| DSSpy logger loggingFileReference ensureDelete. diff --git a/DebuggingSpy-Tests/DSRecordTest.class.st b/DebuggingSpy-Tests/DSRecordTest.class.st index 6248fd9..30fed27 100644 --- a/DebuggingSpy-Tests/DSRecordTest.class.st +++ b/DebuggingSpy-Tests/DSRecordTest.class.st @@ -1,14 +1,13 @@ Class { - #name : 'DSRecordTest', - #superclass : 'TestCase', + #name : #DSRecordTest, + #superclass : #TestCase, #instVars : [ 'record' ], - #category : 'DebuggingSpy-Tests', - #package : 'DebuggingSpy-Tests' + #category : #'DebuggingSpy-Tests' } -{ #category : 'tests' } +{ #category : #tests } DSRecordTest >> testRecordPrinting [ | str | diff --git a/DebuggingSpy-Tests/DSSTONFileLoggerTest.class.st b/DebuggingSpy-Tests/DSSTONFileLoggerTest.class.st index b187f94..f0a727c 100644 --- a/DebuggingSpy-Tests/DSSTONFileLoggerTest.class.st +++ b/DebuggingSpy-Tests/DSSTONFileLoggerTest.class.st @@ -1,17 +1,16 @@ Class { - #name : 'DSSTONFileLoggerTest', - #superclass : 'TestCase', + #name : #DSSTONFileLoggerTest, + #superclass : #TestCase, #instVars : [ 'logger', 'survey', 'task', 'oldLogger' ], - #category : 'DebuggingSpy-Tests', - #package : 'DebuggingSpy-Tests' + #category : #'DebuggingSpy-Tests' } -{ #category : 'running' } +{ #category : #running } DSSTONFileLoggerTest >> setUp [ super setUp. oldLogger := DSSpy logger. @@ -21,14 +20,14 @@ DSSTONFileLoggerTest >> setUp [ task := DSTask new ] -{ #category : 'running' } +{ #category : #running } DSSTONFileLoggerTest >> tearDown [ DSSpy logger: oldLogger. super tearDown ] -{ #category : 'tests - file handling' } +{ #category : #'tests - file handling' } DSSTONFileLoggerTest >> testDefaultLoggingDirectoryName [ self @@ -36,12 +35,12 @@ DSSTONFileLoggerTest >> testDefaultLoggingDirectoryName [ equals: 'ds-spy' ] -{ #category : 'tests - file handling' } +{ #category : #'tests - file handling' } DSSTONFileLoggerTest >> testDefaultLoggingFileName [ self assert: logger defaultLoggingFileName equals: SessionManager default currentSession id asString ] -{ #category : 'tests - file handling' } +{ #category : #'tests - file handling' } DSSTONFileLoggerTest >> testEnsureCreateLoggingFileReference [ | fileReference | @@ -52,7 +51,7 @@ DSSTONFileLoggerTest >> testEnsureCreateLoggingFileReference [ self assert: fileReference exists ] -{ #category : 'tests - task management' } +{ #category : #'tests - task management' } DSSTONFileLoggerTest >> testFilenameForSurvey [ |fnameStream| fnameStream := (logger filenameForSurvey: survey) readStream. @@ -61,7 +60,7 @@ DSSTONFileLoggerTest >> testFilenameForSurvey [ self assert: (fnameStream readStream upToEnd) equals: logger surveyFileExtension ] -{ #category : 'tests - task management' } +{ #category : #'tests - task management' } DSSTONFileLoggerTest >> testForceLoggingFileNameFor [ logger reset. logger forceLoggingFileNameFor: task. @@ -70,7 +69,7 @@ DSSTONFileLoggerTest >> testForceLoggingFileNameFor [ self assert: logger loggingFileReference exists ] -{ #category : 'tests - task management' } +{ #category : #'tests - task management' } DSSTONFileLoggerTest >> testForceRunningTask [ DSSpy resetSpy. @@ -81,7 +80,7 @@ DSSTONFileLoggerTest >> testForceRunningTask [ task title , '-' , SessionManager default currentSession id asString ] -{ #category : 'tests - file handling' } +{ #category : #'tests - file handling' } DSSTONFileLoggerTest >> testLoggingDirectory [ self @@ -89,7 +88,7 @@ DSSTONFileLoggerTest >> testLoggingDirectory [ equals: logger defaultLoggingDirectoryName asFileReference ] -{ #category : 'tests - file handling' } +{ #category : #'tests - file handling' } DSSTONFileLoggerTest >> testLoggingFileName [ self @@ -97,7 +96,7 @@ DSSTONFileLoggerTest >> testLoggingFileName [ equals: logger defaultLoggingFileName ] -{ #category : 'tests - file handling' } +{ #category : #'tests - file handling' } DSSTONFileLoggerTest >> testLoggingFileNameAfterTaskEnded [ DSSpy startTask: task. @@ -107,7 +106,7 @@ DSSTONFileLoggerTest >> testLoggingFileNameAfterTaskEnded [ equals: logger defaultLoggingFileName ] -{ #category : 'tests - file handling' } +{ #category : #'tests - file handling' } DSSTONFileLoggerTest >> testLoggingFileNameAfterTaskStarted [ DSSpy startTask: task. @@ -117,7 +116,7 @@ DSSTONFileLoggerTest >> testLoggingFileNameAfterTaskStarted [ equals: (task title, '-', logger defaultLoggingFileName) ] -{ #category : 'tests - file handling' } +{ #category : #'tests - file handling' } DSSTONFileLoggerTest >> testLoggingFileReference [ | fileReference | @@ -128,7 +127,7 @@ DSSTONFileLoggerTest >> testLoggingFileReference [ self assert: fileReference exists ] -{ #category : 'tests' } +{ #category : #tests } DSSTONFileLoggerTest >> testReset [ logger forceLoggingFileNameFor: task. logger reset. @@ -137,12 +136,12 @@ DSSTONFileLoggerTest >> testReset [ equals: logger defaultLoggingFileName ] -{ #category : 'tests - task management' } +{ #category : #'tests - task management' } DSSTONFileLoggerTest >> testSurveyFileExtension [ self assert: logger surveyFileExtension equals: 'survey' ] -{ #category : 'tests - logging' } +{ #category : #'tests - logging' } DSSTONFileLoggerTest >> testWriteToFile [ | str | diff --git a/DebuggingSpy-Tests/DSSpyInstrumenterTest.class.st b/DebuggingSpy-Tests/DSSpyInstrumenterTest.class.st index 2bb7b55..3db1804 100644 --- a/DebuggingSpy-Tests/DSSpyInstrumenterTest.class.st +++ b/DebuggingSpy-Tests/DSSpyInstrumenterTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'DSSpyInstrumenterTest', - #superclass : 'TestCase', + #name : #DSSpyInstrumenterTest, + #superclass : #TestCase, #instVars : [ 'modifiedClass', 'modifiedMethodSource', @@ -12,11 +12,10 @@ Class { 'methodsToRemove', 'recordSourceCode' ], - #category : 'DebuggingSpy-Tests', - #package : 'DebuggingSpy-Tests' + #category : #'DebuggingSpy-Tests' } -{ #category : 'assertions' } +{ #category : #assertions } DSSpyInstrumenterTest >> assertHaltHitRecordingMethod: method [ self assert: record class equals: DSHaltHitRecord. @@ -25,7 +24,7 @@ DSSpyInstrumenterTest >> assertHaltHitRecordingMethod: method [ self assert: record sourceCodeInterval last equals: method ast statements first stop ] -{ #category : 'assertions' } +{ #category : #assertions } DSSpyInstrumenterTest >> assertHaltHitRecordingMethod: method conditional: isHaltIf once: isOnce [ self assert: record conditional equals: isHaltIf. @@ -33,7 +32,7 @@ DSSpyInstrumenterTest >> assertHaltHitRecordingMethod: method conditional: isHal self assertHaltHitRecordingMethod: method ] -{ #category : 'assertions' } +{ #category : #assertions } DSSpyInstrumenterTest >> assertInstrumentDebuggerCommandNamed: debuggerCommandName [ | cmds cmd | @@ -61,7 +60,7 @@ DSSpyInstrumenterTest >> assertInstrumentDebuggerCommandNamed: debuggerCommandNa self assertStepActionRecordForCommandNamed: debuggerCommandName ] -{ #category : 'assertions' } +{ #category : #assertions } DSSpyInstrumenterTest >> assertInstrumentSindarinDebuggerCommandNamed: debuggerCommandName [ | modifiedMethod cmds cmd | @@ -103,7 +102,7 @@ DSSpyInstrumenterTest >> assertInstrumentSindarinDebuggerCommandNamed: debuggerC self assertStepActionRecordForCommandNamed: debuggerCommandName. ] -{ #category : 'assertions' } +{ #category : #assertions } DSSpyInstrumenterTest >> assertStepActionRecordForCommandNamed: debuggerCommandName [ self assert: self registry size equals: 1. @@ -122,7 +121,7 @@ DSSpyInstrumenterTest >> assertStepActionRecordForCommandNamed: debuggerCommandN self assert: record receiverClass equals: debugger currentContext receiver class name ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> clyTextEditor [ | editor textArea | @@ -136,7 +135,7 @@ DSSpyInstrumenterTest >> clyTextEditor [ ^ editor ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> codePresenterFrom: aPlaygroundPagePresenter [ | codePresenter adapter | @@ -154,7 +153,7 @@ DSSpyInstrumenterTest >> codePresenterFrom: aPlaygroundPagePresenter [ ^ codePresenter ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> debuggerForTesting [ debugger := StTestDebuggerProvider new debuggerWithObjectHalting. @@ -163,7 +162,7 @@ DSSpyInstrumenterTest >> debuggerForTesting [ ^ debugger ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> debuggerForTestingWithWindow [ debugger := StTestDebuggerProvider new debuggerWithObjectHalting. @@ -173,7 +172,7 @@ DSSpyInstrumenterTest >> debuggerForTestingWithWindow [ ^ debugger ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> debuggerOnRecursiveContextForTesting [ ^ StTestDebuggerProvider new debuggerWithRecursiveContext @@ -181,7 +180,7 @@ DSSpyInstrumenterTest >> debuggerOnRecursiveContextForTesting [ initialize ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> debuggerWithRunnableContext [ ^ StTestDebuggerProvider new debuggerWithObjectHalting @@ -189,49 +188,49 @@ DSSpyInstrumenterTest >> debuggerWithRunnableContext [ initialize ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> executeHalt [ self halt ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> executeHaltIf [ self haltIf: [ true ] ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> executeHaltInBloc [ [self halt] value ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> executeHaltOnce [ self haltOnce ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> executeHaltWithMessage [ self halt: 'message' ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> metaPaneClassesItems: listName FromInspector: aMetaPane [ ^ (aMetaPane class slotNamed: listName) read: aMetaPane ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> newInspectorOn: anObject [ | inspector | - inspector := StInspectorPresenter basicNew. + inspector := StInspector basicNew. self setDummyWindowForPresenter: inspector. inspector setModelBeforeInitialization: (StInspectorModel on: anObject). @@ -239,20 +238,19 @@ DSSpyInstrumenterTest >> newInspectorOn: anObject [ ^ inspector ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> playgroundPagePresenter [ | playground | playground := StPlaygroundPagePresenter basicNew. self setDummyWindowForPresenter: playground. - playground setModelBeforeInitialization: - (NewValueHolderForTestWithDummyPlaygroundPage value: nil). + playground setModelBeforeInitialization: (NewValueHolder value: nil). playground application: StPharoApplication current. playground initialize. ^ playground ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> press: aCharacter in: aPresenter [ aPresenter adapter @@ -263,7 +261,7 @@ DSSpyInstrumenterTest >> press: aCharacter in: aPresenter [ option: false ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> recompileExecuteHaltOnce [ self class compile: 'executeHaltOnce @@ -271,28 +269,26 @@ DSSpyInstrumenterTest >> recompileExecuteHaltOnce [ self haltOnce' ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> registry [ ^DSRecordRegistry current records ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> rubTextEditor [ | editor textArea | editor := RubSmalltalkEditor forTextArea: - (textArea := RubEditingArea new - beForSmalltalkCode; - yourself). - textArea setTextWith: '41+1' printString. + (textArea := RubEditingArea new). + textArea setTextWith: '41+1' printString. textArea releaseEditor. textArea editorClass: DSFakeTextEditor. - textArea editor. + textArea editor. editor selectAll. ^ editor ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> runWithoutOpeningDebugger: aBlock [ | debuggerSelectionStrategy | @@ -311,7 +307,7 @@ DSSpyInstrumenterTest >> runWithoutOpeningDebugger: aBlock [ debuggerSelectionStrategy ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> setDummyWindowForMorph: morph [ [ morph privateOwner: SystemWindow basicNew ] @@ -319,7 +315,7 @@ DSSpyInstrumenterTest >> setDummyWindowForMorph: morph [ do: [ ] ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> setDummyWindowForPresenter: presenter [ | windowPresenter | @@ -330,13 +326,13 @@ DSSpyInstrumenterTest >> setDummyWindowForPresenter: presenter [ ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> setDummyWindowPresenter: windowPresenter forPresenter: presenter [ - windowPresenter basicPresenter: presenter + windowPresenter presenter: presenter ] -{ #category : 'running' } +{ #category : #running } DSSpyInstrumenterTest >> setUp [ super setUp. @@ -346,7 +342,7 @@ DSSpyInstrumenterTest >> setUp [ DSRecordRegistry current reset ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> simulatedMouseEventFor: morph [ ^ MouseMoveEvent new @@ -359,7 +355,7 @@ DSSpyInstrumenterTest >> simulatedMouseEventFor: morph [ stamp: 0 ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> stObjectContextModelMock [ | model context | @@ -374,11 +370,11 @@ DSSpyInstrumenterTest >> stObjectContextModelMock [ yourself ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyInstrumenterTest >> tableItemsListFromInspector: anInspector [ | ctxPresenter rawView attrTable widget | - anInspector build. + anInspector buildWithSpec. self setDummyWindowForPresenter: anInspector. ctxPresenter := anInspector firstPage rawInspectorPageOrNil retrievePresenter. @@ -386,13 +382,13 @@ DSSpyInstrumenterTest >> tableItemsListFromInspector: anInspector [ self setDummyWindowPresenter: anInspector window forPresenter: rawView. attrTable := rawView attributeTable. - attrTable build. + attrTable buildWithSpec. self setDummyWindowPresenter: anInspector window forPresenter: attrTable. widget := attrTable adapter widget. ^ widget dataSource rootItem children ] -{ #category : 'running' } +{ #category : #running } DSSpyInstrumenterTest >> tearDown [ (modifiedClass notNil and: [ @@ -415,7 +411,7 @@ DSSpyInstrumenterTest >> tearDown [ super tearDown ] -{ #category : 'tests - browsers' } +{ #category : #'tests - browsers' } DSSpyInstrumenterTest >> testInstrumentClyFullBrowser [ modifiedClass := ClyFullBrowserMorph. @@ -436,7 +432,7 @@ DSSpyInstrumenterTest >> testInstrumentClyFullBrowser [ self assert: record methodBrowsed equals: (Object>>#yourself) name ] -{ #category : 'tests - browsers' } +{ #category : #'tests - browsers' } DSSpyInstrumenterTest >> testInstrumentClyQueryBrowser [ modifiedClass := ClyQueryBrowserMorph. @@ -455,7 +451,7 @@ DSSpyInstrumenterTest >> testInstrumentClyQueryBrowser [ self assert: record queryName equals: browser systemQuery description ] -{ #category : 'tests - interactions' } +{ #category : #'tests - interactions' } DSSpyInstrumenterTest >> testInstrumentClyTextEditorPrintIt [ | clyEditor | @@ -473,7 +469,7 @@ DSSpyInstrumenterTest >> testInstrumentClyTextEditorPrintIt [ self assert: record selectedString equals: '41+1' ] -{ #category : 'tests - playground' } +{ #category : #'tests - playground' } DSSpyInstrumenterTest >> testInstrumentCodePresenter [ |playground code| modifiedClass := SpCodePresenter. @@ -499,7 +495,7 @@ DSSpyInstrumenterTest >> testInstrumentCodePresenter [ ] -{ #category : 'tests - debugger' } +{ #category : #'tests - debugger' } DSSpyInstrumenterTest >> testInstrumentDebuggerCode [ |code adapter| modifiedClass := SpCodePresenter. @@ -529,7 +525,7 @@ DSSpyInstrumenterTest >> testInstrumentDebuggerCode [ self assert: record windowId equals: code window window hash ] -{ #category : 'tests - debugger' } +{ #category : #'tests - debugger' } DSSpyInstrumenterTest >> testInstrumentDebuggerOpening [ modifiedClass := StDebugger. modifiedMethodSource := [(StDebugger >> #initializeWindow:) sourceCode] on: Error do:[nil]. @@ -549,7 +545,7 @@ DSSpyInstrumenterTest >> testInstrumentDebuggerOpening [ ] -{ #category : 'tests - debugger' } +{ #category : #'tests - debugger' } DSSpyInstrumenterTest >> testInstrumentDebuggerStack [ |selectedItem| modifiedClass := StDebugger. @@ -588,32 +584,29 @@ DSSpyInstrumenterTest >> testInstrumentDebuggerStack [ self assert: record selector equals: selectedItem selector ] -{ #category : 'tests - inspector' } +{ #category : #'tests - inspector' } DSSpyInstrumenterTest >> testInstrumentExpandAttribute [ - - | inspector object items | + |inspector object items| modifiedClass := FTBasicItem. modifiedMethodSource := (FTBasicItem >> #expandAndRefresh) sourceCode. instrumenter instrumentExpandAttribute. - + object := OrderedCollection new. - inspector := StInspectorPresenter onObject: object. - items := self tableItemsListFromInspector: inspector. + inspector := StInspector onObject: object. + items := self tableItemsListFromInspector: inspector. items first expandAndRefresh. - + self assert: self registry size equals: 1. record := self registry first. - + self assert: record class identicalTo: DSExpandAttributeRecord. - self - assert: record windowId - equals: inspector window window identityHash. - self assert: record attributeName equals: 'self'. + self assert: record windowId equals: inspector window window identityHash. + self assert: record attributeName equals: 'self'. self assert: record attributeHash equals: object identityHash. - self assert: record attributeValue equals: object displayString + self assert: record attributeValue equals: object displayString ] -{ #category : 'tests - halts' } +{ #category : #'tests - halts' } DSSpyInstrumenterTest >> testInstrumentHaltHits [ instrumenter instrumentHaltHits. @@ -655,7 +648,7 @@ DSSpyInstrumenterTest >> testInstrumentHaltHits [ self assertHaltHitRecordingMethod: (self class >> #executeHaltWithMessage) conditional: false once: false. ] -{ #category : 'tests - halts' } +{ #category : #'tests - halts' } DSSpyInstrumenterTest >> testInstrumentHaltHitsInBlock [ |executedMethod| instrumenter instrumentHaltHits. @@ -680,86 +673,67 @@ DSSpyInstrumenterTest >> testInstrumentHaltHitsInBlock [ self assert: record sourceCodeInterval last equals: executedMethod ast statements first receiver statements first stop ] -{ #category : 'tests - inspector' } +{ #category : #'tests - inspector' } DSSpyInstrumenterTest >> testInstrumentInspectMethodsOfClass [ - - | metaPane object classes | - modifiedClass := StMetaBrowserPresenter. - modifiedMethodSource := (StMetaBrowserPresenter >> #methodsOf:) - sourceCode. + |metaPane object classes| + modifiedClass := StMetaBrowser. + modifiedMethodSource := (StMetaBrowser >> #methodsOf:) sourceCode. instrumenter instrumentInspectMethodsOfClass. - + object := OrderedCollection new. - metaPane := StMetaBrowserPresenter basicNew. + metaPane := StMetaBrowser basicNew. self setDummyWindowForPresenter: metaPane. metaPane application: StPharoApplication current. metaPane setModelBeforeInitialization: object. - - metaPane initialize. - - classes := self - metaPaneClassesItems: #classes - FromInspector: metaPane. - classes selectPath: - (Array new: OrderedCollection allSuperclasses size + 1 withAll: 1). - + metaPane initialize. + classes := self metaPaneClassesItems: #classes FromInspector: metaPane. + self assert: self registry size equals: 1. - record := self registry first. - + record := self registry first. + self assert: record class identicalTo: DSInspectMethodsRecord. self assert: record windowId equals: metaPane window window hash. self assert: record selectedClass equals: object class name. self assert: record inspectedObject equals: object printString. - - classes clickAtPath: { 1. 1. 1. 1 }. + + classes clickAtPath: { 1. 1. 1. 1}. record := self registry second. - self - assert: record selectedClass - equals: object class superclass name + self assert: record selectedClass equals: object class superclass name ] -{ #category : 'tests - inspector' } +{ #category : #'tests - inspector' } DSSpyInstrumenterTest >> testInstrumentInspectSourceOfMethod [ - - | metaPane object methods classes | - modifiedClass := StMetaBrowserPresenter. - modifiedMethodSource := (StMetaBrowserPresenter >> #updateSourceWith:) - sourceCode. + |metaPane object methods| + modifiedClass := StMetaBrowser. + modifiedMethodSource := (StMetaBrowser >> #updateSourceWith:) sourceCode. instrumenter instrumentInspectSourceOfMethod. - + object := OrderedCollection new. - metaPane := StMetaBrowserPresenter on: object. - methods := self - metaPaneClassesItems: #methods - FromInspector: metaPane. - classes := self - metaPaneClassesItems: #classes - FromInspector: metaPane. - + metaPane := StMetaBrowser on: object. + methods := self metaPaneClassesItems: #methods FromInspector: metaPane. + self setDummyWindowForPresenter: metaPane. - - classes selectPath: - (Array new: OrderedCollection allSuperclasses size + 1 withAll: 1). - + methods selectItem: methods items first. self assert: self registry size equals: 1. - record := self registry first. - + record := self registry first. + self assert: record class identicalTo: DSInspectMethodSourceRecord. - self - assert: record selectedMethod - equals: metaPane selectedMethod name. - + self assert: record selectedMethod equals: metaPane selectedMethod name. + self assert: record windowId equals: metaPane window window hash. self assert: record selectedClass equals: object class name. self assert: record inspectedObject equals: object printString + + + ] -{ #category : 'tests - inspector' } +{ #category : #'tests - inspector' } DSSpyInstrumenterTest >> testInstrumentInspectorOnObject [ |inspector object| - modifiedClass := StInspectorPresenter. - modifiedMethodSource := (StInspectorPresenter >> #initializePresenters) sourceCode. + modifiedClass := StInspector. + modifiedMethodSource := (StInspector >> #initializePresenters) sourceCode. instrumenter instrumentInspectorOnObject. object := OrderedCollection new. @@ -775,39 +749,34 @@ DSSpyInstrumenterTest >> testInstrumentInspectorOnObject [ self assert: record inspectedObjectHash equals: object identityHash ] -{ #category : 'tests - inspector' } +{ #category : #'tests - inspector' } DSSpyInstrumenterTest >> testInstrumentInspectorPageSelection [ - - | inspector object objectInspector pagesView | + |inspector object objectInspector pagesView| modifiedClass := StObjectInspectorPresenter. - modifiedMethodSource := (StObjectInspectorPresenter - >> #initializePresenters) sourceCode. + modifiedMethodSource := (StObjectInspectorPresenter >> #initializePresenters) sourceCode. instrumenter instrumentInspectorPageSelection. - - object := OrderedCollection new. + + object := OrderedCollection new. inspector := self newInspectorOn: object. objectInspector := inspector firstPage. - pagesView := (objectInspector class slotNamed: #views) read: - objectInspector. + pagesView := (objectInspector class slotNamed: #views) read: objectInspector. self assert: self registry size equals: 1. - record := self registry first. - + record := self registry first. + self assert: record class identicalTo: DSSelectInspectorPageRecord. - self - assert: record windowId - equals: inspector window window identityHash. - self assert: record pageTitle equals: pagesView pages first title. + self assert: record windowId equals: inspector window window identityHash. + self assert: record pageTitle equals: pagesView pages first title. self assert: record inspectedObjectHash equals: object identityHash. self assert: record inspectedObject equals: object printString. - + pagesView selectPage: pagesView pages second. self assert: self registry size equals: 2. record := self registry second. - self assert: record pageTitle equals: pagesView pages second title + self assert: record pageTitle equals: pagesView pages second title ] -{ #category : 'tests - mouse events' } +{ #category : #'tests - mouse events' } DSSpyInstrumenterTest >> testInstrumentMouseDownFTSelectableMorph [ |morph| @@ -826,7 +795,7 @@ DSSpyInstrumenterTest >> testInstrumentMouseDownFTSelectableMorph [ self assert: record itemElement equals: (DSMouseEventRecord printStringMorphs: {morph}) ] -{ #category : 'tests - mouse events' } +{ #category : #'tests - mouse events' } DSSpyInstrumenterTest >> testInstrumentMouseEnterFTSelectableMorph [ |morph| @@ -845,7 +814,7 @@ DSSpyInstrumenterTest >> testInstrumentMouseEnterFTSelectableMorph [ self assert: record itemElement equals: (DSMouseEventRecord printStringMorphs: {morph}) ] -{ #category : 'tests - mouse events' } +{ #category : #'tests - mouse events' } DSSpyInstrumenterTest >> testInstrumentMouseEnterWindow [ |window| @@ -863,7 +832,7 @@ DSSpyInstrumenterTest >> testInstrumentMouseEnterWindow [ self assert: record itemElement equals: (DSMouseEventRecord printStringMorphs: {window}) ] -{ #category : 'tests - mouse events' } +{ #category : #'tests - mouse events' } DSSpyInstrumenterTest >> testInstrumentMouseLeaveWindow [ |window| @@ -881,15 +850,15 @@ DSSpyInstrumenterTest >> testInstrumentMouseLeaveWindow [ self assert: record itemElement equals: (DSMouseEventRecord printStringMorphs: {window}) ] -{ #category : 'tests - inspector' } +{ #category : #'tests - inspector' } DSSpyInstrumenterTest >> testInstrumentNavigateAttribute [ |raw object| - modifiedClass := StRawInspectionPresenter. - modifiedMethodSource := (StRawInspectionPresenter >> #setAttributeTable) sourceCode. + modifiedClass := StRawInspection. + modifiedMethodSource := (StRawInspection >> #setAttributeTable) sourceCode. instrumenter instrumentNavigateAttribute. object := OrderedCollection new. - raw := StRawInspectionPresenter on: object. + raw := StRawInspection on: object. self setDummyWindowForPresenter: raw. raw selectPath: #(2). @@ -902,25 +871,25 @@ DSSpyInstrumenterTest >> testInstrumentNavigateAttribute [ self assert: record inspectedObjectHash equals: object identityHash ] -{ #category : 'tests - debugger' } +{ #category : #'tests - debugger' } DSSpyInstrumenterTest >> testInstrumentProceed [ self assertInstrumentDebuggerCommandNamed: 'Proceed' ] -{ #category : 'tests - debugger' } +{ #category : #'tests - debugger' } DSSpyInstrumenterTest >> testInstrumentRestart [ self assertInstrumentDebuggerCommandNamed: 'Restart' ] -{ #category : 'tests - debugger' } +{ #category : #'tests - debugger' } DSSpyInstrumenterTest >> testInstrumentReturn [ self assertInstrumentDebuggerCommandNamed: 'Return' ] -{ #category : 'tests - interactions' } +{ #category : #'tests - interactions' } DSSpyInstrumenterTest >> testInstrumentRubEditorCopySelection [ | rubEditor registerClipboardText | @@ -948,7 +917,7 @@ DSSpyInstrumenterTest >> testInstrumentRubEditorCopySelection [ ensure: [ DSSpy recordClipboardContent: registerClipboardText ] ] -{ #category : 'tests - interactions' } +{ #category : #'tests - interactions' } DSSpyInstrumenterTest >> testInstrumentRubEditorDebugIt [ | rubEditor | @@ -968,7 +937,7 @@ DSSpyInstrumenterTest >> testInstrumentRubEditorDebugIt [ self assert: record selectedString equals: '41+1' printString ] -{ #category : 'tests - interactions' } +{ #category : #'tests - interactions' } DSSpyInstrumenterTest >> testInstrumentRubEditorDoIt [ | rubEditor | @@ -987,7 +956,7 @@ DSSpyInstrumenterTest >> testInstrumentRubEditorDoIt [ self assert: record selectedString equals: '41+1'printString ] -{ #category : 'tests - interactions' } +{ #category : #'tests - interactions' } DSSpyInstrumenterTest >> testInstrumentRubEditorPaste [ | rubEditor registerClipboardText | @@ -1018,7 +987,7 @@ DSSpyInstrumenterTest >> testInstrumentRubEditorPaste [ DSSpy recordClipboardContent: registerClipboardText ] ] -{ #category : 'tests - interactions' } +{ #category : #'tests - interactions' } DSSpyInstrumenterTest >> testInstrumentRubEditorPrintIt [ | rubEditor | @@ -1036,7 +1005,7 @@ DSSpyInstrumenterTest >> testInstrumentRubEditorPrintIt [ self assert: record selectedString equals: '41+1' ] -{ #category : 'tests - mouse events' } +{ #category : #'tests - mouse events' } DSSpyInstrumenterTest >> testInstrumentRubScrollTextMorphHandleMouseOver [ self should: [RubScrolledTextMorph >> #handlesMouseOver: ] raise: KeyNotFound. @@ -1046,7 +1015,7 @@ DSSpyInstrumenterTest >> testInstrumentRubScrollTextMorphHandleMouseOver [ self assert: (RubScrolledTextMorph new handlesMouseOver: nil) ] -{ #category : 'tests - mouse events' } +{ #category : #'tests - mouse events' } DSSpyInstrumenterTest >> testInstrumentRubScrollTextMorphMouseEnter [ |morph| @@ -1063,21 +1032,21 @@ DSSpyInstrumenterTest >> testInstrumentRubScrollTextMorphMouseEnter [ self assert: record itemElement equals: (DSMouseEventRecord printStringMorphs: {morph}) ] -{ #category : 'tests - debugger' } +{ #category : #'tests - debugger' } DSSpyInstrumenterTest >> testInstrumentRunTo [ self assertInstrumentDebuggerCommandNamed: 'Run to' ] -{ #category : 'tests - mouse events' } +{ #category : #'tests - mouse events' } DSSpyInstrumenterTest >> testInstrumentScrollingByDraggingSlider [ |slider| - modifiedClass := SliderMorph. - modifiedMethodSource := (SliderMorph >> #dragging:) sourceCode. + modifiedClass := Slider. + modifiedMethodSource := (Slider >> #dragging:) sourceCode. instrumenter instrumentScrollingByDraggingSlider. - slider := SliderMorph new. + slider := Slider new. slider privateOwner: SystemWindow new. slider dragging: true. @@ -1093,15 +1062,15 @@ DSSpyInstrumenterTest >> testInstrumentScrollingByDraggingSlider [ self assert: record windowId equals: slider window hash. ] -{ #category : 'tests - mouse events' } +{ #category : #'tests - mouse events' } DSSpyInstrumenterTest >> testInstrumentScrollingInScrollPanesEvents [ |pane| - modifiedClass := GeneralScrollPaneMorph. - modifiedMethodSource := (GeneralScrollPaneMorph >> #mouseWheel:) sourceCode. + modifiedClass := GeneralScrollPane. + modifiedMethodSource := (GeneralScrollPane >> #mouseWheel:) sourceCode. instrumenter instrumentScrollingInScrollPanesEvents. - pane := GeneralScrollPaneMorph new. + pane := GeneralScrollPane new. pane privateOwner: SystemWindow new. pane mouseWheel: MouseWheelEvent new. @@ -1111,7 +1080,7 @@ DSSpyInstrumenterTest >> testInstrumentScrollingInScrollPanesEvents [ self assert: record windowId equals: pane window hash ] -{ #category : 'tests - mouse events' } +{ #category : #'tests - mouse events' } DSSpyInstrumenterTest >> testInstrumentScrollingInTablesEvents [ |table| @@ -1129,7 +1098,7 @@ DSSpyInstrumenterTest >> testInstrumentScrollingInTablesEvents [ self assert: record windowId equals: table window hash ] -{ #category : 'tests - interactions' } +{ #category : #'tests - interactions' } DSSpyInstrumenterTest >> testInstrumentSpCodeDebugIt [ | codePresenter debugItCommand | @@ -1152,7 +1121,7 @@ DSSpyInstrumenterTest >> testInstrumentSpCodeDebugIt [ self assert: record selectedString equals: '41+1' ] -{ #category : 'tests - interactions' } +{ #category : #'tests - interactions' } DSSpyInstrumenterTest >> testInstrumentSpCodeDoIt [ | codePresenter printItCommand | @@ -1174,7 +1143,7 @@ DSSpyInstrumenterTest >> testInstrumentSpCodeDoIt [ self assert: record selectedString equals: '41+1' ] -{ #category : 'tests - interactions' } +{ #category : #'tests - interactions' } DSSpyInstrumenterTest >> testInstrumentSpCodeDoItAndGoForInspector [ | presenter | @@ -1197,7 +1166,7 @@ DSSpyInstrumenterTest >> testInstrumentSpCodeDoItAndGoForInspector [ self assert: record selectedString equals: '4+2' ] -{ #category : 'tests - interactions' } +{ #category : #'tests - interactions' } DSSpyInstrumenterTest >> testInstrumentSpCodeDoItAndGoForPlayground [ | presenter | @@ -1221,7 +1190,7 @@ DSSpyInstrumenterTest >> testInstrumentSpCodeDoItAndGoForPlayground [ self assert: record selectedString equals: '4+2' ] -{ #category : 'tests - interactions' } +{ #category : #'tests - interactions' } DSSpyInstrumenterTest >> testInstrumentSpCodePrintIt [ | codePresenter printItCommand | @@ -1241,13 +1210,13 @@ DSSpyInstrumenterTest >> testInstrumentSpCodePrintIt [ self assert: record selectedString equals: '41+1' ] -{ #category : 'tests - playground' } +{ #category : #'tests - playground' } DSSpyInstrumenterTest >> testInstrumentStPlayground [ |playground| - modifiedClass := StPlaygroundPresenter class. - modifiedMethodSource := (StPlaygroundPresenter class >> #open) sourceCode. + modifiedClass := StPlayground. + modifiedMethodSource := (StPlayground class >> #open) sourceCode. instrumenter instrumentPlaygroundCode. - playground := StPlaygroundPresenter open. + playground := StPlayground open. "On opening, the playground generates an opening record" self assert: self registry size equals: 1. @@ -1256,55 +1225,55 @@ DSSpyInstrumenterTest >> testInstrumentStPlayground [ self assert: record windowId equals: playground window window hash ] -{ #category : 'tests - debugger' } +{ #category : #'tests - debugger' } DSSpyInstrumenterTest >> testInstrumentStepInto [ self assertInstrumentDebuggerCommandNamed: 'Into' ] -{ #category : 'tests - debugger' } +{ #category : #'tests - debugger' } DSSpyInstrumenterTest >> testInstrumentStepOver [ self assertInstrumentDebuggerCommandNamed: 'Over' ] -{ #category : 'tests - debugger' } +{ #category : #'tests - debugger' } DSSpyInstrumenterTest >> testInstrumentStepThrough [ self assertInstrumentDebuggerCommandNamed: 'Through' ] -{ #category : 'tests - debugger' } +{ #category : #'tests - debugger' } DSSpyInstrumenterTest >> testInstrumentStepToMethodEntry [ self assertInstrumentSindarinDebuggerCommandNamed: 'To method entry' ] -{ #category : 'tests - debugger' } +{ #category : #'tests - debugger' } DSSpyInstrumenterTest >> testInstrumentStepToNextCallInClass [ self assertInstrumentSindarinDebuggerCommandNamed: 'Next call in class' ] -{ #category : 'tests - debugger' } +{ #category : #'tests - debugger' } DSSpyInstrumenterTest >> testInstrumentStepToNextCallInObject [ self assertInstrumentSindarinDebuggerCommandNamed: 'Next call in receiver' ] -{ #category : 'tests - debugger' } +{ #category : #'tests - debugger' } DSSpyInstrumenterTest >> testInstrumentStepToNextInstanceCreation [ self assertInstrumentSindarinDebuggerCommandNamed: 'Next instance creation' ] -{ #category : 'tests - debugger' } +{ #category : #'tests - debugger' } DSSpyInstrumenterTest >> testInstrumentStepToReturnCommand [ self assertInstrumentSindarinDebuggerCommandNamed: 'To return' ] -{ #category : 'tests - interactions' } +{ #category : #'tests - interactions' } DSSpyInstrumenterTest >> testLoggingInteractionsWithNoSourceCode [ DSSpy recordSourceCode: false. { diff --git a/DebuggingSpy-Tests/DSSpyTest.class.st b/DebuggingSpy-Tests/DSSpyTest.class.st index e632e07..b031d15 100644 --- a/DebuggingSpy-Tests/DSSpyTest.class.st +++ b/DebuggingSpy-Tests/DSSpyTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'DSSpyTest', - #superclass : 'TestCase', + #name : #DSSpyTest, + #superclass : #TestCase, #instVars : [ 'record', 'browser', @@ -12,11 +12,10 @@ Class { 'survey', 'recordSourceCode' ], - #category : 'DebuggingSpy-Tests', - #package : 'DebuggingSpy-Tests' + #category : #'DebuggingSpy-Tests' } -{ #category : 'assertions' } +{ #category : #assertions } DSSpyTest >> assertBreakpointRecordedAs: aDSRecordClass forBreakpointEvent: aBreakpointEventClass target: aTarget [ self assert: record class equals: aDSRecordClass. @@ -29,19 +28,19 @@ DSSpyTest >> assertBreakpointRecordedAs: aDSRecordClass forBreakpointEvent: aBre self assert: record node equals: self breakpointedMethod ast printString ] -{ #category : 'assertions' } +{ #category : #assertions } DSSpyTest >> assertMethodEventRecordedAs: aClass [ self assert: record class identicalTo: aClass. self assert: record methodName equals: self methodEvent method name ] -{ #category : 'assertions' } +{ #category : #assertions } DSSpyTest >> assertMethodEventRecordedAs: aClass for: aMethod [ self assert: record class identicalTo: aClass. self assert: record methodName equals: aMethod name ] -{ #category : 'assertions' } +{ #category : #assertions } DSSpyTest >> assertMethodSourceCodeNotRecorded [ self @@ -49,7 +48,7 @@ DSSpyTest >> assertMethodSourceCodeNotRecorded [ equals: DSSpy recordSourceCodeDisabledErrorMessage ] -{ #category : 'assertions' } +{ #category : #assertions } DSSpyTest >> assertMethodSourceCodeRecorded [ self @@ -57,7 +56,7 @@ DSSpyTest >> assertMethodSourceCodeRecorded [ equals: (self class >> #methodEvent) sourceCode ] -{ #category : 'assertions' } +{ #category : #assertions } DSSpyTest >> assertVariableBreakpointRecordedAs: aDSRecordClass forBreakpointEvent: aBreakpointEventClass target: aTarget [ self assert: record class equals: aDSRecordClass. @@ -71,53 +70,55 @@ DSSpyTest >> assertVariableBreakpointRecordedAs: aDSRecordClass forBreakpointEve self assert: record accessStrategy equals: #all ] -{ #category : 'assertions' } +{ #category : #assertions } DSSpyTest >> assertWindowEventRecordedAs: aClass [ self assert: record class identicalTo: aClass. self assert: record windowId equals: self windowEvent window hash. self assert: record windowName equals: self windowEvent window label ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyTest >> breakpointMethod [ |value| value := 4 squared. ^value ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyTest >> breakpointedMethod [ ^self class >> #breakpointMethod ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyTest >> compileModifyMethodWithHalt [ DSFakeTextEditor compile: 'newMethodWithHalt self halt. self haltIf:[true]' ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyTest >> compileModifyMethodWithNoHaltChange [ DSFakeTextEditor compile: 'newMethodWithHalt self halt' ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyTest >> compileNewMethodWithHalt [ DSFakeTextEditor compile: 'newMethodWithHalt self halt' ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyTest >> compileTestMethod [ DSFakeTextEditor compile: 'dsTestMethod ^self' ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyTest >> installBreakpoint [ - breakpoint := Breakpoint new node: self breakpointedMethod ast. + breakpoint := Breakpoint new + node: self breakpointedMethod ast; + always. breakpoint install ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyTest >> installVariableBreakpoint [ breakpoint := VariableBreakpoint @@ -125,7 +126,7 @@ DSSpyTest >> installVariableBreakpoint [ inClass: self breakpointedMethod ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyTest >> methodEvent [ ^ methodEvent ifNil: [ @@ -134,7 +135,7 @@ DSSpyTest >> methodEvent [ yourself ] ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyTest >> methodModifiedEvent [ ^ methodEvent ifNil: [ @@ -144,47 +145,47 @@ DSSpyTest >> methodModifiedEvent [ oldProtocol: #test ] ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyTest >> modifyTestMethod [ DSFakeTextEditor compile: 'dsTestMethod ^self + 1' ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyTest >> recoverTestMethod [ ^DSFakeTextEditor lookupSelector: #dsTestMethod ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyTest >> registry [ ^DSRecordRegistry current records ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyTest >> removeBreakpoint [ breakpoint remove. breakpoint := nil ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyTest >> removeHaltInMethodWithHalt [ DSFakeTextEditor compile: 'newMethodWithHalt ^self' ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyTest >> removeNewMethodWithHalt [ (DSFakeTextEditor lookupSelector: #newMethodWithHalt) ifNotNil: [ :c | c removeFromSystem ] ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyTest >> removeTestMethod [ self recoverTestMethod removeFromSystem ] -{ #category : 'running' } +{ #category : #running } DSSpyTest >> setUp [ super setUp. @@ -198,7 +199,7 @@ DSSpyTest >> setUp [ DSSpy scopeSourceCodeChangesRecording: true ] -{ #category : 'running' } +{ #category : #running } DSSpyTest >> tearDown [ DSRecordRegistry autoSerialize: false. instrumenter unsubscribeFromSystemAnnouncer. @@ -211,7 +212,7 @@ DSSpyTest >> tearDown [ super tearDown ] -{ #category : 'tests - breakpoints events' } +{ #category : #'tests - breakpoints events' } DSSpyTest >> testBreakpointAdded [ instrumenter listenToBreakpointChanges. @@ -226,7 +227,7 @@ DSSpyTest >> testBreakpointAdded [ target: nil ] -{ #category : 'tests - breakpoints events' } +{ #category : #'tests - breakpoints events' } DSSpyTest >> testBreakpointHit [ self installBreakpoint. @@ -243,7 +244,7 @@ DSSpyTest >> testBreakpointHit [ ] -{ #category : 'tests - breakpoints events' } +{ #category : #'tests - breakpoints events' } DSSpyTest >> testBreakpointRemoved [ self installBreakpoint. @@ -259,7 +260,7 @@ DSSpyTest >> testBreakpointRemoved [ target: nil ] -{ #category : 'tests - task management' } +{ #category : #'tests - task management' } DSSpyTest >> testCloseSurvey [ |taskLoggingFileName recordedSurvey| @@ -295,13 +296,13 @@ DSSpyTest >> testCloseSurvey [ ] -{ #category : 'tests - logging' } +{ #category : #'tests - logging' } DSSpyTest >> testDefaultLogger [ DSSpy logger: nil. self assert: DSSpy logger class equals: DSSpy defaultLoggerClass ] -{ #category : 'tests - task management' } +{ #category : #'tests - task management' } DSSpyTest >> testEndTask [ DSSpy endTask: task. self assert: self registry size equals: 1. @@ -312,7 +313,7 @@ DSSpyTest >> testEndTask [ self assert: record answer equals: DSTask dsTaskDescription ] -{ #category : 'tests - halts events' } +{ #category : #'tests - halts events' } DSSpyTest >> testIndexesOfHaltNodesIn [ | haltData realHaltNode | @@ -324,7 +325,7 @@ DSSpyTest >> testIndexesOfHaltNodesIn [ self assert: haltData first value equals: (realHaltNode start to: realHaltNode stop) ] -{ #category : 'tests - logging' } +{ #category : #'tests - logging' } DSSpyTest >> testLog [ DSSpy logger loggingFileReference ensureDelete. @@ -333,7 +334,7 @@ DSSpyTest >> testLog [ self assert: DSSpy logger loggingFileReference readStream contents equals: '[''test'']' ] -{ #category : 'tests - logging' } +{ #category : #'tests - logging' } DSSpyTest >> testLogKey [ [DSSpy log: nil key: #TEST] on: Halt do:[:h| h proceed]. self assert: self registry size equals: 1. @@ -341,7 +342,7 @@ DSSpyTest >> testLogKey [ self assert: record event equals: #TEST ] -{ #category : 'tests - logging' } +{ #category : #'tests - logging' } DSSpyTest >> testLogOnlyWhenTaskStarted [ |str dir| dir := DSSpy logger loggingDirectory. @@ -366,7 +367,7 @@ DSSpyTest >> testLogOnlyWhenTaskStarted [ ] -{ #category : 'tests - window events' } +{ #category : #'tests - window events' } DSSpyTest >> testLogWindowActivated [ DSSpy logWindowActivated: self windowEvent. @@ -376,7 +377,7 @@ DSSpyTest >> testLogWindowActivated [ self assertWindowEventRecordedAs: DSWindowActivatedRecord ] -{ #category : 'tests - window events' } +{ #category : #'tests - window events' } DSSpyTest >> testLogWindowClosed [ DSSpy logWindowClosed: self windowEvent. @@ -387,7 +388,7 @@ DSSpyTest >> testLogWindowClosed [ self assertWindowEventRecordedAs: DSWindowClosedRecord ] -{ #category : 'tests - window events' } +{ #category : #'tests - window events' } DSSpyTest >> testLogWindowOpened [ DSSpy logWindowOpened: self windowEvent. @@ -398,7 +399,7 @@ DSSpyTest >> testLogWindowOpened [ self assertWindowEventRecordedAs: DSWindowOpenedRecord ] -{ #category : 'tests - serialize/materialize' } +{ #category : #'tests - serialize/materialize' } DSSpyTest >> testMaterialize [ |records materializedRecords| DSSpy logger loggingFileReference ensureDelete. @@ -419,7 +420,7 @@ DSSpyTest >> testMaterialize [ self assert: materializedRecords second event equals: records second event ] -{ #category : 'tests - methods events' } +{ #category : #'tests - methods events' } DSSpyTest >> testMethodAdded [ DSSpy recordSourceCode: true. DSSpy methodAdded: self methodEvent. @@ -430,7 +431,7 @@ DSSpyTest >> testMethodAdded [ self assertMethodSourceCodeRecorded ] -{ #category : 'tests - methods events' } +{ #category : #'tests - methods events' } DSSpyTest >> testMethodAddedNoSourceCode [ DSSpy methodAdded: self methodEvent. self assert: self registry size equals: 1. @@ -440,7 +441,7 @@ DSSpyTest >> testMethodAddedNoSourceCode [ self assertMethodSourceCodeNotRecorded ] -{ #category : 'tests - methods events' } +{ #category : #'tests - methods events' } DSSpyTest >> testMethodChanged [ DSSpy recordSourceCode: true. @@ -452,7 +453,7 @@ DSSpyTest >> testMethodChanged [ self assertMethodSourceCodeRecorded ] -{ #category : 'tests - methods events' } +{ #category : #'tests - methods events' } DSSpyTest >> testMethodChangedNoSourceCode [ DSSpy methodChanged: self methodModifiedEvent. @@ -463,7 +464,7 @@ DSSpyTest >> testMethodChangedNoSourceCode [ self assertMethodSourceCodeNotRecorded ] -{ #category : 'tests - methods events' } +{ #category : #'tests - methods events' } DSSpyTest >> testMethodEventsInstrumentation [ |method| @@ -485,7 +486,7 @@ DSSpyTest >> testMethodEventsInstrumentation [ self assertMethodEventRecordedAs: DSMethodRemovedRecord for: method ] -{ #category : 'tests - methods events' } +{ #category : #'tests - methods events' } DSSpyTest >> testMethodRemoved [ DSSpy recordSourceCode: true. @@ -497,7 +498,7 @@ DSSpyTest >> testMethodRemoved [ self assertMethodSourceCodeRecorded ] -{ #category : 'tests - methods events' } +{ #category : #'tests - methods events' } DSSpyTest >> testMethodRemovedNoSourceCode [ DSSpy methodRemoved: self methodEvent. self assert: self registry size equals: 1. @@ -507,7 +508,7 @@ DSSpyTest >> testMethodRemovedNoSourceCode [ self assertMethodSourceCodeNotRecorded ] -{ #category : 'tests - methods events' } +{ #category : #'tests - methods events' } DSSpyTest >> testMonitorPackageForSourceCodeChanges [ DSSpy monitorPackageForSourceCodeChanges: self class package name. @@ -523,7 +524,7 @@ DSSpyTest >> testMonitorPackageForSourceCodeChanges [ self assert: (DSSpy packagesMonitoredForSourceCodeChanges includes: self class package name). ] -{ #category : 'tests - breakpoints events' } +{ #category : #'tests - breakpoints events' } DSSpyTest >> testObjectCentricBreakpointRecord [ |target| @@ -556,7 +557,7 @@ DSSpyTest >> testObjectCentricBreakpointRecord [ target: (DSAbstractBreakpointEventRecord basicNew printTargetInstance: target). ] -{ #category : 'tests - breakpoints events' } +{ #category : #'tests - breakpoints events' } DSSpyTest >> testObjectCentricVariableBreakpointRecord [ | target | @@ -600,13 +601,13 @@ DSSpyTest >> testObjectCentricVariableBreakpointRecord [ target) ] -{ #category : 'tests - methods events' } +{ #category : #'tests - methods events' } DSSpyTest >> testPackagesMonitoredForSourceCodeChanges [ self assert: DSSpy packagesMonitoredForSourceCodeChanges isEmpty ] -{ #category : 'tests - halts events' } +{ #category : #'tests - halts events' } DSSpyTest >> testRecordHaltInAddedMethod [ | haltData realHaltNode | instrumenter listenToMethodChanges. @@ -628,7 +629,7 @@ DSSpyTest >> testRecordHaltInAddedMethod [ self assert: haltData first value equals: (realHaltNode start to: realHaltNode stop) ] -{ #category : 'tests - halts events' } +{ #category : #'tests - halts events' } DSSpyTest >> testRecordHaltInMethodmodifiedBy [ | oldHaltData haltData addedHaltNode | @@ -662,7 +663,7 @@ DSSpyTest >> testRecordHaltInMethodmodifiedBy [ self assert: haltData second value equals: (addedHaltNode start to: addedHaltNode stop) ] -{ #category : 'tests - halts events' } +{ #category : #'tests - halts events' } DSSpyTest >> testRecordHaltInRemovedMethod [ | haltData methodName realHaltNode | @@ -687,7 +688,7 @@ DSSpyTest >> testRecordHaltInRemovedMethod [ self assert: haltData first value equals: (realHaltNode start to: realHaltNode stop) ] -{ #category : 'tests - methods events' } +{ #category : #'tests - methods events' } DSSpyTest >> testRecordMethodChangesSourceCode [ |method| @@ -713,7 +714,7 @@ DSSpyTest >> testRecordMethodChangesSourceCode [ self assert: record newSource equals: method sourceCode ] -{ #category : 'tests - methods events' } +{ #category : #'tests - methods events' } DSSpyTest >> testRecordMethodChangesSourceCodeActivated [ DSSpy methodChanged: self methodModifiedEvent. @@ -722,7 +723,7 @@ DSSpyTest >> testRecordMethodChangesSourceCodeActivated [ self deny: record class identicalTo: DSSourceCodeChangeEventRecord ] -{ #category : 'tests - methods events' } +{ #category : #'tests - methods events' } DSSpyTest >> testRecordMethodChangesSourceCodeNotScoped [ DSSpy scopeSourceCodeChangesRecording: false. @@ -733,7 +734,7 @@ DSSpyTest >> testRecordMethodChangesSourceCodeNotScoped [ self assert: record class identicalTo: DSSourceCodeChangeEventRecord ] -{ #category : 'tests - halts events' } +{ #category : #'tests - halts events' } DSSpyTest >> testRecordRemoveHaltInMethodmodified [ | haltData realHaltNode | self compileNewMethodWithHalt. @@ -757,7 +758,7 @@ DSSpyTest >> testRecordRemoveHaltInMethodmodified [ self assert: haltData first value equals: (realHaltNode start to: realHaltNode stop) ] -{ #category : 'tests - methods events' } +{ #category : #'tests - methods events' } DSSpyTest >> testRecordSourceCodeChangeFromTo [ |oldMethod newMethod| @@ -778,13 +779,13 @@ DSSpyTest >> testRecordSourceCodeChangeFromTo [ self assert: record newSource equals: newMethod sourceCode ] -{ #category : 'tests - configuration' } +{ #category : #'tests - configuration' } DSSpyTest >> testRecordSourceCodeDefaultValue [ DSSpy recordSourceCode: nil. self deny: DSSpy recordSourceCode ] -{ #category : 'tests - task management' } +{ #category : #'tests - task management' } DSSpyTest >> testResetSpy [ DSSpy startTask: task. @@ -795,13 +796,13 @@ DSSpyTest >> testResetSpy [ equals: DSSpy logger defaultLoggingFileName ] -{ #category : 'tests - methods events' } +{ #category : #'tests - methods events' } DSSpyTest >> testScopeSourceCodeChangesRecording [ DSSpy scopeSourceCodeChangesRecording: nil. self deny: DSSpy scopeSourceCodeChangesRecording ] -{ #category : 'tests - serialize/materialize' } +{ #category : #'tests - serialize/materialize' } DSSpyTest >> testSerialize [ DSSpy logger loggingFileReference ensureDelete. @@ -813,7 +814,7 @@ DSSpyTest >> testSerialize [ equals: '[' , (STON toString: record) , ']' ] -{ #category : 'tests - task management' } +{ #category : #'tests - task management' } DSSpyTest >> testStartTask [ DSSpy startTask: task. @@ -824,7 +825,7 @@ DSSpyTest >> testStartTask [ self assert: record description equals: DSTask dsTaskDescription ] -{ #category : 'tests - task management' } +{ #category : #'tests - task management' } DSSpyTest >> testStartTaskSerialization [ | recordedTask | @@ -837,7 +838,7 @@ DSSpyTest >> testStartTaskSerialization [ self assert: recordedTask taskName equals: task title ] -{ #category : 'tests - task management' } +{ #category : #'tests - task management' } DSSpyTest >> testTaskStarted [ self deny: DSSpy taskStarted. @@ -847,7 +848,7 @@ DSSpyTest >> testTaskStarted [ self deny: DSSpy taskStarted ] -{ #category : 'tests - breakpoints events' } +{ #category : #'tests - breakpoints events' } DSSpyTest >> testVariableBreakpointAdded [ instrumenter listenToBreakpointChanges. @@ -862,7 +863,7 @@ DSSpyTest >> testVariableBreakpointAdded [ ] -{ #category : 'tests - breakpoints events' } +{ #category : #'tests - breakpoints events' } DSSpyTest >> testVariableBreakpointAddedToMultipleVariables [ instrumenter listenToBreakpointChanges. @@ -878,7 +879,7 @@ DSSpyTest >> testVariableBreakpointAddedToMultipleVariables [ (DSTestClassWithInstanceVariables allSlots collect: [ :s | s name ]) ] -{ #category : 'tests - breakpoints events' } +{ #category : #'tests - breakpoints events' } DSSpyTest >> testVariableBreakpointHit [ self installVariableBreakpoint. @@ -894,7 +895,7 @@ DSSpyTest >> testVariableBreakpointHit [ target: nil ] -{ #category : 'tests - breakpoints events' } +{ #category : #'tests - breakpoints events' } DSSpyTest >> testVariableBreakpointRemoved [ self installVariableBreakpoint. @@ -910,7 +911,7 @@ DSSpyTest >> testVariableBreakpointRemoved [ target: nil ] -{ #category : 'tests - window events' } +{ #category : #'tests - window events' } DSSpyTest >> testWindowOpenedListensToWindowActivatedAndClosedEvents [ DSSpy logWindowOpened: self windowEvent. @@ -930,7 +931,7 @@ DSSpyTest >> testWindowOpenedListensToWindowActivatedAndClosedEvents [ self assert: record class identicalTo: DSWindowClosedRecord ] -{ #category : 'helpers' } +{ #category : #helpers } DSSpyTest >> windowEvent [ ^ windowEvent ifNil: [ diff --git a/DebuggingSpy-Tests/DSSurvey.class.st b/DebuggingSpy-Tests/DSSurvey.class.st index bbabb12..f2c235e 100644 --- a/DebuggingSpy-Tests/DSSurvey.class.st +++ b/DebuggingSpy-Tests/DSSurvey.class.st @@ -2,51 +2,50 @@ I simulate a survey that can be managed through DSSpy. " Class { - #name : 'DSSurvey', - #superclass : 'Object', + #name : #DSSurvey, + #superclass : #Object, #instVars : [ 'answer', 'uuid' ], - #category : 'DebuggingSpy-Tests', - #package : 'DebuggingSpy-Tests' + #category : #'DebuggingSpy-Tests' } -{ #category : 'accessing' } +{ #category : #accessing } DSSurvey class >> dsSurveyDescription [ ^ 'DS test survey' ] -{ #category : 'accessing' } +{ #category : #accessing } DSSurvey >> answer [ ^answer ] -{ #category : 'accessing' } +{ #category : #accessing } DSSurvey >> answer: anObject [ answer := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } DSSurvey >> description [ ^self class dsSurveyDescription ] -{ #category : 'initialization' } +{ #category : #initialization } DSSurvey >> initialize [ super initialize. answer := self class dsSurveyDescription ] -{ #category : 'accessing' } +{ #category : #accessing } DSSurvey >> title [ ^self description ] -{ #category : 'accessing' } +{ #category : #accessing } DSSurvey >> uuid [ ^ uuid ifNil: [ uuid := UUID new ] diff --git a/DebuggingSpy-Tests/DSTask.class.st b/DebuggingSpy-Tests/DSTask.class.st index 497b457..bd12915 100644 --- a/DebuggingSpy-Tests/DSTask.class.st +++ b/DebuggingSpy-Tests/DSTask.class.st @@ -2,45 +2,44 @@ I simulate a task that can be managed through DSSpy. " Class { - #name : 'DSTask', - #superclass : 'Object', + #name : #DSTask, + #superclass : #Object, #instVars : [ 'answer' ], - #category : 'DebuggingSpy-Tests', - #package : 'DebuggingSpy-Tests' + #category : #'DebuggingSpy-Tests' } -{ #category : 'accessing' } +{ #category : #accessing } DSTask class >> dsTaskDescription [ ^ 'DS test task' ] -{ #category : 'accessing' } +{ #category : #accessing } DSTask >> answer [ ^answer ] -{ #category : 'accessing' } +{ #category : #accessing } DSTask >> answer: anObject [ answer := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } DSTask >> description [ ^self class dsTaskDescription ] -{ #category : 'initialization' } +{ #category : #initialization } DSTask >> initialize [ super initialize. answer := self class dsTaskDescription ] -{ #category : 'accessing' } +{ #category : #accessing } DSTask >> title [ ^self class dsTaskDescription ] diff --git a/DebuggingSpy-Tests/DSTestClassWithInstanceVariables.class.st b/DebuggingSpy-Tests/DSTestClassWithInstanceVariables.class.st index f11bb11..7f7bec2 100644 --- a/DebuggingSpy-Tests/DSTestClassWithInstanceVariables.class.st +++ b/DebuggingSpy-Tests/DSTestClassWithInstanceVariables.class.st @@ -2,61 +2,60 @@ I'm a class with instance variables to test variable breakpoints events. " Class { - #name : 'DSTestClassWithInstanceVariables', - #superclass : 'Object', + #name : #DSTestClassWithInstanceVariables, + #superclass : #Object, #instVars : [ 'a', 'b', 'c', 'd' ], - #category : 'DebuggingSpy-Tests', - #package : 'DebuggingSpy-Tests' + #category : #'DebuggingSpy-Tests' } -{ #category : 'accessing' } +{ #category : #accessing } DSTestClassWithInstanceVariables >> a [ ^ a ] -{ #category : 'accessing' } +{ #category : #accessing } DSTestClassWithInstanceVariables >> a: anObject [ a := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } DSTestClassWithInstanceVariables >> b [ ^ b ] -{ #category : 'accessing' } +{ #category : #accessing } DSTestClassWithInstanceVariables >> b: anObject [ b := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } DSTestClassWithInstanceVariables >> c [ ^ c ] -{ #category : 'accessing' } +{ #category : #accessing } DSTestClassWithInstanceVariables >> c: anObject [ c := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } DSTestClassWithInstanceVariables >> d [ ^ d ] -{ #category : 'accessing' } +{ #category : #accessing } DSTestClassWithInstanceVariables >> d: anObject [ d := anObject diff --git a/DebuggingSpy-Tests/DSTestRecord.class.st b/DebuggingSpy-Tests/DSTestRecord.class.st index d51b681..c02039d 100644 --- a/DebuggingSpy-Tests/DSTestRecord.class.st +++ b/DebuggingSpy-Tests/DSTestRecord.class.st @@ -2,13 +2,12 @@ I am an event record class to test ds records mechanics. " Class { - #name : 'DSTestRecord', - #superclass : 'DSAbstractEventRecord', - #category : 'DebuggingSpy-Tests', - #package : 'DebuggingSpy-Tests' + #name : #DSTestRecord, + #superclass : #DSAbstractEventRecord, + #category : #'DebuggingSpy-Tests' } -{ #category : 'accessing' } +{ #category : #accessing } DSTestRecord >> eventName [ ^'test' ] diff --git a/DebuggingSpy-Tests/NewValueHolderForTestWithDummyPlaygroundPage.class.st b/DebuggingSpy-Tests/NewValueHolderForTestWithDummyPlaygroundPage.class.st deleted file mode 100644 index 401dc64..0000000 --- a/DebuggingSpy-Tests/NewValueHolderForTestWithDummyPlaygroundPage.class.st +++ /dev/null @@ -1,13 +0,0 @@ -Class { - #name : 'NewValueHolderForTestWithDummyPlaygroundPage', - #superclass : 'NewValueHolder', - #category : 'DebuggingSpy-Tests', - #package : 'DebuggingSpy-Tests' -} - -{ #category : 'accessing' } -NewValueHolderForTestWithDummyPlaygroundPage >> ensureContentsFlushed [ - "just to implement the StPlaygroundPage API" - - -] diff --git a/DebuggingSpy-Tests/SpAbstractMorphicAdapter.extension.st b/DebuggingSpy-Tests/SpAbstractMorphicAdapter.extension.st index 0e92329..4bace44 100644 --- a/DebuggingSpy-Tests/SpAbstractMorphicAdapter.extension.st +++ b/DebuggingSpy-Tests/SpAbstractMorphicAdapter.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'SpAbstractMorphicAdapter' } +Extension { #name : #SpAbstractMorphicAdapter } -{ #category : '*DebuggingSpy-Tests' } +{ #category : #'*DebuggingSpy-Tests' } SpAbstractMorphicAdapter >> sendMouseEnterEvent [ | evt | diff --git a/DebuggingSpy-Tests/SpWindowPresenter.extension.st b/DebuggingSpy-Tests/SpWindowPresenter.extension.st deleted file mode 100644 index d114c70..0000000 --- a/DebuggingSpy-Tests/SpWindowPresenter.extension.st +++ /dev/null @@ -1,9 +0,0 @@ -Extension { #name : 'SpWindowPresenter' } - -{ #category : '*DebuggingSpy-Tests' } -SpWindowPresenter >> basicPresenter: aPresenter [ - "Set the presenter to show as content of the window." - - aPresenter owner: self. - presenter := aPresenter -] diff --git a/DebuggingSpy-Tests/package.st b/DebuggingSpy-Tests/package.st index a525a41..526a735 100644 --- a/DebuggingSpy-Tests/package.st +++ b/DebuggingSpy-Tests/package.st @@ -1 +1 @@ -Package { #name : 'DebuggingSpy-Tests' } +Package { #name : #'DebuggingSpy-Tests' } diff --git a/DebuggingSpy/Breakpoint.extension.st b/DebuggingSpy/Breakpoint.extension.st index 6d1a33d..3d6d036 100644 --- a/DebuggingSpy/Breakpoint.extension.st +++ b/DebuggingSpy/Breakpoint.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'Breakpoint' } +Extension { #name : #Breakpoint } -{ #category : '*DebuggingSpy' } +{ #category : #'*DebuggingSpy' } Breakpoint >> breakpointRecordFor: aBreakpointEvent [ ^DSBreakpointEventRecord for: aBreakpointEvent ] diff --git a/DebuggingSpy/BreakpointAnnouncement.extension.st b/DebuggingSpy/BreakpointAnnouncement.extension.st index 2d64f47..a6ec505 100644 --- a/DebuggingSpy/BreakpointAnnouncement.extension.st +++ b/DebuggingSpy/BreakpointAnnouncement.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'BreakpointAnnouncement' } +Extension { #name : #BreakpointAnnouncement } -{ #category : '*DebuggingSpy' } +{ #category : #'*DebuggingSpy' } BreakpointAnnouncement >> recordBreakpoint [ ^self breakpoint breakpointRecordFor: self ] diff --git a/DebuggingSpy/DSAbstractBreakpointEventRecord.class.st b/DebuggingSpy/DSAbstractBreakpointEventRecord.class.st index a78d41c..18f18ce 100644 --- a/DebuggingSpy/DSAbstractBreakpointEventRecord.class.st +++ b/DebuggingSpy/DSAbstractBreakpointEventRecord.class.st @@ -3,36 +3,34 @@ I record breakpoint events information, whatever the type of breakpoint. My subclasses have to handle the real recording, depending on the breakpoint. " Class { - #name : 'DSAbstractBreakpointEventRecord', - #superclass : 'DSAbstractEventRecord', + #name : #DSAbstractBreakpointEventRecord, + #superclass : #DSAbstractEventRecord, #instVars : [ 'target', 'objectCentric', 'eventName', 'once' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSAbstractBreakpointEventRecord >> eventName [ ^eventName ] -{ #category : 'accessing' } +{ #category : #accessing } DSAbstractBreakpointEventRecord >> objectCentric [ ^ objectCentric ] -{ #category : 'accessing' } +{ #category : #accessing } DSAbstractBreakpointEventRecord >> once [ ^ once ] -{ #category : 'printing' } +{ #category : #printing } DSAbstractBreakpointEventRecord >> printTargetInstance: anObject [ | str | @@ -45,20 +43,20 @@ DSAbstractBreakpointEventRecord >> printTargetInstance: anObject [ ^ str contents ] -{ #category : 'actions api' } +{ #category : #'actions api' } DSAbstractBreakpointEventRecord >> record: aBreakpointEvent [ eventName := aBreakpointEvent class name. objectCentric := aBreakpointEvent breakpoint isObjectCentric. target := objectCentric - ifTrue: [ + ifTrue: [ self printTargetInstance: aBreakpointEvent breakpoint targetInstance ] ifFalse: [ nil ]. - once := aBreakpointEvent breakpoint once + once := aBreakpointEvent breakpoint oneShot ] -{ #category : 'accessing' } +{ #category : #accessing } DSAbstractBreakpointEventRecord >> target [ ^ target diff --git a/DebuggingSpy/DSAbstractEventRecord.class.st b/DebuggingSpy/DSAbstractEventRecord.class.st index 7f56cdc..2d77d3e 100644 --- a/DebuggingSpy/DSAbstractEventRecord.class.st +++ b/DebuggingSpy/DSAbstractEventRecord.class.st @@ -2,19 +2,17 @@ I represent a recorded event, that happened from a tool. " Class { - #name : 'DSAbstractEventRecord', - #superclass : 'Object', + #name : #DSAbstractEventRecord, + #superclass : #Object, #instVars : [ 'dateTime', 'windowId', 'uuid' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } DSAbstractEventRecord class >> for: anObject [ | rec | @@ -23,7 +21,7 @@ DSAbstractEventRecord class >> for: anObject [ ^ rec ] -{ #category : 'printing' } +{ #category : #printing } DSAbstractEventRecord class >> printStringMorphs: anArrayOfMorphs [ | str | @@ -35,77 +33,77 @@ DSAbstractEventRecord class >> printStringMorphs: anArrayOfMorphs [ ^ str contents ] -{ #category : 'comparing' } +{ #category : #comparing } DSAbstractEventRecord >> < aDSAbstractRecord [ ^self dateTime < aDSAbstractRecord dateTime ] -{ #category : 'comparing' } +{ #category : #comparing } DSAbstractEventRecord >> <= aDSAbstractRecord [ ^self dateTime <= aDSAbstractRecord dateTime ] -{ #category : 'comparing' } +{ #category : #comparing } DSAbstractEventRecord >> > aDSAbstractRecord [ ^self dateTime > aDSAbstractRecord dateTime ] -{ #category : 'comparing' } +{ #category : #comparing } DSAbstractEventRecord >> >= aDSAbstractRecord [ ^self dateTime >= aDSAbstractRecord dateTime ] -{ #category : 'accessing' } +{ #category : #accessing } DSAbstractEventRecord >> dateTime [ ^ dateTime ] -{ #category : 'accessing' } +{ #category : #accessing } DSAbstractEventRecord >> dateTime: anObject [ dateTime := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } DSAbstractEventRecord >> eventName [ ^self subclassResponsibility ] -{ #category : 'initialization' } +{ #category : #initialization } DSAbstractEventRecord >> initialize [ dateTime := DateAndTime now. uuid := UUID new ] -{ #category : 'printing' } +{ #category : #printing } DSAbstractEventRecord >> printOn: aStream [ aStream << self eventName ] -{ #category : 'actions api' } +{ #category : #'actions api' } DSAbstractEventRecord >> record: aWindow [ windowId := aWindow identityHash ] -{ #category : 'API-history' } +{ #category : #'API-history' } DSAbstractEventRecord >> recordWindowHistoryOn: aDSRecordHistory [ aDSRecordHistory addWindowRecord: self ] -{ #category : 'accessing' } +{ #category : #accessing } DSAbstractEventRecord >> uuid [ ^ uuid ] -{ #category : 'accessing' } +{ #category : #accessing } DSAbstractEventRecord >> windowId [ ^ windowId ] -{ #category : 'accessing' } +{ #category : #accessing } DSAbstractEventRecord >> windowId: anObject [ windowId := anObject diff --git a/DebuggingSpy/DSAbstractHaltRecord.class.st b/DebuggingSpy/DSAbstractHaltRecord.class.st index c58ca8f..f005a12 100644 --- a/DebuggingSpy/DSAbstractHaltRecord.class.st +++ b/DebuggingSpy/DSAbstractHaltRecord.class.st @@ -2,30 +2,28 @@ My subclasses record particular halts events such as: installing a halt, or hitting a halt at run time. " Class { - #name : 'DSAbstractHaltRecord', - #superclass : 'DSAbstractEventRecord', + #name : #DSAbstractHaltRecord, + #superclass : #DSAbstractEventRecord, #instVars : [ 'method', 'sourceCodeInterval' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSAbstractHaltRecord >> method [ ^ method ] -{ #category : 'actions api' } +{ #category : #'actions api' } DSAbstractHaltRecord >> record: anRBProgramNode [ method := anRBProgramNode methodNode method name. sourceCodeInterval := anRBProgramNode start to: anRBProgramNode stop ] -{ #category : 'accessing' } +{ #category : #accessing } DSAbstractHaltRecord >> sourceCodeInterval [ ^ sourceCodeInterval diff --git a/DebuggingSpy/DSAbstractTaskRecord.class.st b/DebuggingSpy/DSAbstractTaskRecord.class.st index 7d20053..ee6e01a 100644 --- a/DebuggingSpy/DSAbstractTaskRecord.class.st +++ b/DebuggingSpy/DSAbstractTaskRecord.class.st @@ -5,28 +5,26 @@ My subclasses specialize me to provide specific task management. Tasks should be objects answering `#name` and `#description`, both returning a string. " Class { - #name : 'DSAbstractTaskRecord', - #superclass : 'DSAbstractEventRecord', + #name : #DSAbstractTaskRecord, + #superclass : #DSAbstractEventRecord, #instVars : [ 'task' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSAbstractTaskRecord >> description [ ^ task description ] -{ #category : 'actions api' } +{ #category : #'actions api' } DSAbstractTaskRecord >> record: aTask [ task := aTask ] -{ #category : 'accessing' } +{ #category : #accessing } DSAbstractTaskRecord >> taskName [ ^ task title diff --git a/DebuggingSpy/DSBreakpointEventRecord.class.st b/DebuggingSpy/DSBreakpointEventRecord.class.st index 3f449ca..a5b6444 100644 --- a/DebuggingSpy/DSBreakpointEventRecord.class.st +++ b/DebuggingSpy/DSBreakpointEventRecord.class.st @@ -2,30 +2,28 @@ I record breakpoint events information. " Class { - #name : 'DSBreakpointEventRecord', - #superclass : 'DSAbstractBreakpointEventRecord', + #name : #DSBreakpointEventRecord, + #superclass : #DSAbstractBreakpointEventRecord, #instVars : [ 'method', 'node' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSBreakpointEventRecord >> method [ ^ method ] -{ #category : 'accessing' } +{ #category : #accessing } DSBreakpointEventRecord >> node [ ^ node ] -{ #category : 'actions api' } +{ #category : #'actions api' } DSBreakpointEventRecord >> record: aBreakpointEvent [ super record: aBreakpointEvent. method := aBreakpointEvent breakpoint node methodNode method name. diff --git a/DebuggingSpy/DSBrowseContextRecord.class.st b/DebuggingSpy/DSBrowseContextRecord.class.st index 4d099ae..00e6c63 100644 --- a/DebuggingSpy/DSBrowseContextRecord.class.st +++ b/DebuggingSpy/DSBrowseContextRecord.class.st @@ -4,35 +4,33 @@ I record printed representation of browsed contexts in the debugger: - the selector " Class { - #name : 'DSBrowseContextRecord', - #superclass : 'DSDebuggerRecord', + #name : #DSBrowseContextRecord, + #superclass : #DSDebuggerRecord, #instVars : [ 'receiver', 'selector' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSBrowseContextRecord >> eventName [ ^'Browse context' ] -{ #category : 'accessing' } +{ #category : #accessing } DSBrowseContextRecord >> receiver [ ^ receiver ] -{ #category : 'accessing' } +{ #category : #accessing } DSBrowseContextRecord >> receiver: anObject [ receiver := anObject ] -{ #category : 'actions api' } +{ #category : #'actions api' } DSBrowseContextRecord >> record: aContextAndWindow [ |ctx| super record: aContextAndWindow. @@ -41,13 +39,13 @@ DSBrowseContextRecord >> record: aContextAndWindow [ selector := ctx selector ] -{ #category : 'accessing' } +{ #category : #accessing } DSBrowseContextRecord >> selector [ ^ selector ] -{ #category : 'accessing' } +{ #category : #accessing } DSBrowseContextRecord >> selector: anObject [ selector := anObject diff --git a/DebuggingSpy/DSClipboardActionRecord.class.st b/DebuggingSpy/DSClipboardActionRecord.class.st index 6b3f0fb..3fdabbe 100644 --- a/DebuggingSpy/DSClipboardActionRecord.class.st +++ b/DebuggingSpy/DSClipboardActionRecord.class.st @@ -4,42 +4,40 @@ The records might include the clipboard text if the the shared variable #registe The record also includes the windowId and the editor class name. " Class { - #name : 'DSClipboardActionRecord', - #superclass : 'DSAbstractEventRecord', + #name : #DSClipboardActionRecord, + #superclass : #DSAbstractEventRecord, #instVars : [ 'clipboardText', 'editorClassName' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSClipboardActionRecord >> clipboardText [ ^ clipboardText ] -{ #category : 'accessing' } +{ #category : #accessing } DSClipboardActionRecord >> clipboardText: anObject [ clipboardText := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } DSClipboardActionRecord >> editorClassName [ ^ editorClassName ] -{ #category : 'accessing' } +{ #category : #accessing } DSClipboardActionRecord >> editorClassName: anObject [ editorClassName := anObject ] -{ #category : 'actions api' } +{ #category : #'actions api' } DSClipboardActionRecord >> record: recordInfo [ clipboardText := DSSpy recordClipboardContent ifTrue: [ recordInfo first] ifFalse: ['RecordClipboarContent disabled']. windowId := recordInfo second. diff --git a/DebuggingSpy/DSClipboardCopyRecord.class.st b/DebuggingSpy/DSClipboardCopyRecord.class.st index 4196313..ce863a5 100644 --- a/DebuggingSpy/DSClipboardCopyRecord.class.st +++ b/DebuggingSpy/DSClipboardCopyRecord.class.st @@ -1,12 +1,10 @@ Class { - #name : 'DSClipboardCopyRecord', - #superclass : 'DSClipboardActionRecord', - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #name : #DSClipboardCopyRecord, + #superclass : #DSClipboardActionRecord, + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSClipboardCopyRecord >> eventName [ ^ 'Clipboard Copy' diff --git a/DebuggingSpy/DSClipboardPasteRecord.class.st b/DebuggingSpy/DSClipboardPasteRecord.class.st index 8a53497..fb192a3 100644 --- a/DebuggingSpy/DSClipboardPasteRecord.class.st +++ b/DebuggingSpy/DSClipboardPasteRecord.class.st @@ -1,12 +1,10 @@ Class { - #name : 'DSClipboardPasteRecord', - #superclass : 'DSClipboardActionRecord', - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #name : #DSClipboardPasteRecord, + #superclass : #DSClipboardActionRecord, + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSClipboardPasteRecord >> eventName [ ^ 'Clipboard Paste' diff --git a/DebuggingSpy/DSCodeActionRecord.class.st b/DebuggingSpy/DSCodeActionRecord.class.st index 56a4ef7..c2e3603 100644 --- a/DebuggingSpy/DSCodeActionRecord.class.st +++ b/DebuggingSpy/DSCodeActionRecord.class.st @@ -3,17 +3,15 @@ I record user debugging actions applied on code, such as debug it, doit, print i I store the code string on which the user applied that action. " Class { - #name : 'DSCodeActionRecord', - #superclass : 'DSAbstractEventRecord', + #name : #DSCodeActionRecord, + #superclass : #DSAbstractEventRecord, #instVars : [ 'selectedString' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'actions api' } +{ #category : #'actions api' } DSCodeActionRecord >> record: aCodeString [ selectedString := DSSpy recordSourceCode @@ -22,13 +20,13 @@ DSCodeActionRecord >> record: aCodeString [ DSSpy recordSourceCodeDisabledErrorMessage ] ] -{ #category : 'accessing' } +{ #category : #accessing } DSCodeActionRecord >> selectedString [ ^ selectedString ] -{ #category : 'accessing' } +{ #category : #accessing } DSCodeActionRecord >> selectedString: anObject [ selectedString := anObject diff --git a/DebuggingSpy/DSDebugItRecord.class.st b/DebuggingSpy/DSDebugItRecord.class.st index 4c52909..99970cb 100644 --- a/DebuggingSpy/DSDebugItRecord.class.st +++ b/DebuggingSpy/DSDebugItRecord.class.st @@ -2,14 +2,12 @@ I record when the user selects code and debugs it. " Class { - #name : 'DSDebugItRecord', - #superclass : 'DSCodeActionRecord', - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #name : #DSDebugItRecord, + #superclass : #DSCodeActionRecord, + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSDebugItRecord >> eventName [ ^'Debug it' ] diff --git a/DebuggingSpy/DSDebuggerActionRecord.class.st b/DebuggingSpy/DSDebuggerActionRecord.class.st index fcc6566..8733cca 100644 --- a/DebuggingSpy/DSDebuggerActionRecord.class.st +++ b/DebuggingSpy/DSDebuggerActionRecord.class.st @@ -3,17 +3,15 @@ I record debugger actions such as step, stepOver, etc. The name of the action is stored in my event name " Class { - #name : 'DSDebuggerActionRecord', - #superclass : 'DSDebuggerRecord', + #name : #DSDebuggerActionRecord, + #superclass : #DSDebuggerRecord, #instVars : [ 'eventName' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'tests - instance creation' } +{ #category : #'tests - instance creation' } DSDebuggerActionRecord class >> into: aContext [ ^ (self for: aContext) @@ -21,7 +19,7 @@ DSDebuggerActionRecord class >> into: aContext [ yourself ] -{ #category : 'tests - instance creation' } +{ #category : #'tests - instance creation' } DSDebuggerActionRecord class >> over: aContext [ ^ (self for: aContext) @@ -29,7 +27,7 @@ DSDebuggerActionRecord class >> over: aContext [ yourself ] -{ #category : 'tests - instance creation' } +{ #category : #'tests - instance creation' } DSDebuggerActionRecord class >> proceed: aContext [ ^ (self for: aContext) @@ -37,7 +35,7 @@ DSDebuggerActionRecord class >> proceed: aContext [ yourself ] -{ #category : 'tests - instance creation' } +{ #category : #'tests - instance creation' } DSDebuggerActionRecord class >> restart: aContext [ ^ (self for: aContext) @@ -45,7 +43,7 @@ DSDebuggerActionRecord class >> restart: aContext [ yourself ] -{ #category : 'tests - instance creation' } +{ #category : #'tests - instance creation' } DSDebuggerActionRecord class >> return: aContext [ ^ (self for: aContext) @@ -53,7 +51,7 @@ DSDebuggerActionRecord class >> return: aContext [ yourself ] -{ #category : 'tests - instance creation' } +{ #category : #'tests - instance creation' } DSDebuggerActionRecord class >> runTo: aContext [ ^ (self for: aContext) @@ -61,7 +59,7 @@ DSDebuggerActionRecord class >> runTo: aContext [ yourself ] -{ #category : 'tests - instance creation' } +{ #category : #'tests - instance creation' } DSDebuggerActionRecord class >> through: aContext [ ^ (self for: aContext) @@ -69,18 +67,18 @@ DSDebuggerActionRecord class >> through: aContext [ yourself ] -{ #category : 'accessing' } +{ #category : #accessing } DSDebuggerActionRecord >> eventName [ ^eventName ] -{ #category : 'accessing' } +{ #category : #accessing } DSDebuggerActionRecord >> eventName: anObject [ eventName := anObject ] -{ #category : 'actions api' } +{ #category : #'actions api' } DSDebuggerActionRecord >> record: aContext [ super record: aContext. diff --git a/DebuggingSpy/DSDebuggerOpeningRecord.class.st b/DebuggingSpy/DSDebuggerOpeningRecord.class.st index 4e0d29c..66b9a83 100644 --- a/DebuggingSpy/DSDebuggerOpeningRecord.class.st +++ b/DebuggingSpy/DSDebuggerOpeningRecord.class.st @@ -2,34 +2,32 @@ I am generated when a debugger is opened. " Class { - #name : 'DSDebuggerOpeningRecord', - #superclass : 'DSDebuggerRecord', + #name : #DSDebuggerOpeningRecord, + #superclass : #DSDebuggerRecord, #instVars : [ 'debuggerId' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSDebuggerOpeningRecord >> debuggerId [ ^ debuggerId ] -{ #category : 'accessing' } +{ #category : #accessing } DSDebuggerOpeningRecord >> debuggerId: anObject [ debuggerId := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } DSDebuggerOpeningRecord >> eventName [ ^'Debugger open' ] -{ #category : 'actions api' } +{ #category : #'actions api' } DSDebuggerOpeningRecord >> record: aDebugger [ debuggerId := aDebugger identityHash. super record: { aDebugger currentContext. aDebugger window window } diff --git a/DebuggingSpy/DSDebuggerRecord.class.st b/DebuggingSpy/DSDebuggerRecord.class.st index ee6c1d1..465702d 100644 --- a/DebuggingSpy/DSDebuggerRecord.class.st +++ b/DebuggingSpy/DSDebuggerRecord.class.st @@ -3,31 +3,29 @@ I record debugger events triggered from users' interaction with the debugger. I store the browsed debugger context: the executed method and the node that is going to be executed next. " Class { - #name : 'DSDebuggerRecord', - #superclass : 'DSAbstractEventRecord', + #name : #DSDebuggerRecord, + #superclass : #DSAbstractEventRecord, #instVars : [ 'contextName', 'sourceNodeClass', 'sourceNodeCode' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSDebuggerRecord >> contextName [ ^ contextName ] -{ #category : 'accessing' } +{ #category : #accessing } DSDebuggerRecord >> contextName: anObject [ contextName := anObject ] -{ #category : 'actions api' } +{ #category : #'actions api' } DSDebuggerRecord >> record: aContextAndWindow [ |aContext method sourceNode| super record: aContextAndWindow second. @@ -39,25 +37,25 @@ DSDebuggerRecord >> record: aContextAndWindow [ sourceNodeCode := sourceNode sourceCode ] -{ #category : 'accessing' } +{ #category : #accessing } DSDebuggerRecord >> sourceNodeClass [ ^ sourceNodeClass ] -{ #category : 'accessing' } +{ #category : #accessing } DSDebuggerRecord >> sourceNodeClass: anObject [ sourceNodeClass := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } DSDebuggerRecord >> sourceNodeCode [ ^ sourceNodeCode ] -{ #category : 'accessing' } +{ #category : #accessing } DSDebuggerRecord >> sourceNodeCode: anObject [ sourceNodeCode := anObject diff --git a/DebuggingSpy/DSDoItAndGoRecord.class.st b/DebuggingSpy/DSDoItAndGoRecord.class.st index b819680..38e34fc 100644 --- a/DebuggingSpy/DSDoItAndGoRecord.class.st +++ b/DebuggingSpy/DSDoItAndGoRecord.class.st @@ -2,14 +2,12 @@ I record when the user selects code, executes it and inspect the result immediately. " Class { - #name : 'DSDoItAndGoRecord', - #superclass : 'DSDoItRecord', - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #name : #DSDoItAndGoRecord, + #superclass : #DSDoItRecord, + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSDoItAndGoRecord >> eventName [ ^'Do it and Go' ] diff --git a/DebuggingSpy/DSDoItRecord.class.st b/DebuggingSpy/DSDoItRecord.class.st index 4d2a4b0..0f28462 100644 --- a/DebuggingSpy/DSDoItRecord.class.st +++ b/DebuggingSpy/DSDoItRecord.class.st @@ -2,14 +2,12 @@ I record when the user selects code and debugs it. " Class { - #name : 'DSDoItRecord', - #superclass : 'DSCodeActionRecord', - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #name : #DSDoItRecord, + #superclass : #DSCodeActionRecord, + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSDoItRecord >> eventName [ ^'Do it' ] diff --git a/DebuggingSpy/DSEndingTaskRecord.class.st b/DebuggingSpy/DSEndingTaskRecord.class.st index 49321ad..e4de7d0 100644 --- a/DebuggingSpy/DSEndingTaskRecord.class.st +++ b/DebuggingSpy/DSEndingTaskRecord.class.st @@ -4,19 +4,17 @@ Tasks are object that should answer to `#name`, `#description` and `#answer`, al " Class { - #name : 'DSEndingTaskRecord', - #superclass : 'DSAbstractTaskRecord', - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #name : #DSEndingTaskRecord, + #superclass : #DSAbstractTaskRecord, + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSEndingTaskRecord >> answer [ ^ task answer ] -{ #category : 'accessing' } +{ #category : #accessing } DSEndingTaskRecord >> eventName [ ^'Ending task' ] diff --git a/DebuggingSpy/DSExpandAttributeRecord.class.st b/DebuggingSpy/DSExpandAttributeRecord.class.st index bfe6bde..ac43c75 100644 --- a/DebuggingSpy/DSExpandAttributeRecord.class.st +++ b/DebuggingSpy/DSExpandAttributeRecord.class.st @@ -2,14 +2,12 @@ I record the inspection of an inspected object's attribute through expanding inspector trees " Class { - #name : 'DSExpandAttributeRecord', - #superclass : 'DSInspectAttributeRecord', - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #name : #DSExpandAttributeRecord, + #superclass : #DSInspectAttributeRecord, + #category : #'DebuggingSpy-Records' } -{ #category : 'actions - api' } +{ #category : #'actions - api' } DSExpandAttributeRecord >> record: aFTTableItem [ |window| window := aFTTableItem dataSource model window. diff --git a/DebuggingSpy/DSFullBrowseRecord.class.st b/DebuggingSpy/DSFullBrowseRecord.class.st index 3fbdb8b..9e12ebd 100644 --- a/DebuggingSpy/DSFullBrowseRecord.class.st +++ b/DebuggingSpy/DSFullBrowseRecord.class.st @@ -7,60 +7,58 @@ If one of them is nil, for instance, `package>class>nil`, it means that the user I have to register names instead of objects, as there are no guarantees that the image that analyzes the record has these package/class/method. " Class { - #name : 'DSFullBrowseRecord', - #superclass : 'DSAbstractEventRecord', + #name : #DSFullBrowseRecord, + #superclass : #DSAbstractEventRecord, #instVars : [ 'methodBrowsed', 'packageBrowsed', 'classBrowsed' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSFullBrowseRecord >> classBrowsed [ ^ classBrowsed ] -{ #category : 'accessing' } +{ #category : #accessing } DSFullBrowseRecord >> classBrowsed: anObject [ classBrowsed := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } DSFullBrowseRecord >> eventName [ ^'Browse' ] -{ #category : 'accessing' } +{ #category : #accessing } DSFullBrowseRecord >> methodBrowsed [ ^ methodBrowsed ] -{ #category : 'accessing' } +{ #category : #accessing } DSFullBrowseRecord >> methodBrowsed: anObject [ methodBrowsed := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } DSFullBrowseRecord >> packageBrowsed [ ^ packageBrowsed ] -{ #category : 'accessing' } +{ #category : #accessing } DSFullBrowseRecord >> packageBrowsed: anObject [ packageBrowsed := anObject ] -{ #category : 'actions api' } +{ #category : #'actions api' } DSFullBrowseRecord >> record: aClyFullBrowser [ super record: aClyFullBrowser window. packageBrowsed := aClyFullBrowser packageSelection isEmpty diff --git a/DebuggingSpy/DSHaltChangeRecord.class.st b/DebuggingSpy/DSHaltChangeRecord.class.st index 3619b93..ca64943 100644 --- a/DebuggingSpy/DSHaltChangeRecord.class.st +++ b/DebuggingSpy/DSHaltChangeRecord.class.st @@ -2,61 +2,59 @@ I record the installation or the modification of halt in the source code. " Class { - #name : 'DSHaltChangeRecord', - #superclass : 'DSAbstractHaltRecord', + #name : #DSHaltChangeRecord, + #superclass : #DSAbstractHaltRecord, #instVars : [ 'haltChange', 'haltData' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'adding' } +{ #category : #adding } DSHaltChangeRecord class >> add [ ^#HALT_ADD ] -{ #category : 'adding' } +{ #category : #adding } DSHaltChangeRecord class >> modify [ ^#HALT_MODIFY ] -{ #category : 'adding' } +{ #category : #adding } DSHaltChangeRecord class >> remove [ ^#HALT_REMOVE ] -{ #category : 'accessing' } +{ #category : #accessing } DSHaltChangeRecord >> eventName [ ^'Halt change' ] -{ #category : 'accessing' } +{ #category : #accessing } DSHaltChangeRecord >> haltChange [ ^ haltChange ] -{ #category : 'accessing' } +{ #category : #accessing } DSHaltChangeRecord >> haltData [ ^ haltData ] -{ #category : 'accessing' } +{ #category : #accessing } DSHaltChangeRecord >> haltData: anObject [ haltData := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } DSHaltChangeRecord >> method: aMethodName [ method := aMethodName ] -{ #category : 'actions api' } +{ #category : #'actions api' } DSHaltChangeRecord >> record: aSymbol [ haltChange := aSymbol diff --git a/DebuggingSpy/DSHaltHitRecord.class.st b/DebuggingSpy/DSHaltHitRecord.class.st index 9abfcad..d3640d1 100644 --- a/DebuggingSpy/DSHaltHitRecord.class.st +++ b/DebuggingSpy/DSHaltHitRecord.class.st @@ -2,36 +2,34 @@ I record a halt hitting at run time. " Class { - #name : 'DSHaltHitRecord', - #superclass : 'DSAbstractHaltRecord', + #name : #DSHaltHitRecord, + #superclass : #DSAbstractHaltRecord, #instVars : [ 'once', 'conditional', 'selector' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSHaltHitRecord >> conditional [ ^ conditional ] -{ #category : 'accessing' } +{ #category : #accessing } DSHaltHitRecord >> eventName [ ^'Halt hit' ] -{ #category : 'accessing' } +{ #category : #accessing } DSHaltHitRecord >> once [ ^ once ] -{ #category : 'actions api' } +{ #category : #'actions api' } DSHaltHitRecord >> record: anRBProgramNodeAndASelector [ once := false. conditional := false. @@ -42,7 +40,7 @@ DSHaltHitRecord >> record: anRBProgramNodeAndASelector [ ] -{ #category : 'accessing' } +{ #category : #accessing } DSHaltHitRecord >> selector [ ^ selector diff --git a/DebuggingSpy/DSInspectAttributeRecord.class.st b/DebuggingSpy/DSInspectAttributeRecord.class.st index d37db54..5b93708 100644 --- a/DebuggingSpy/DSInspectAttributeRecord.class.st +++ b/DebuggingSpy/DSInspectAttributeRecord.class.st @@ -2,60 +2,58 @@ I record the inspection of an inspected object's attribute " Class { - #name : 'DSInspectAttributeRecord', - #superclass : 'DSInspectorRecord', + #name : #DSInspectAttributeRecord, + #superclass : #DSInspectorRecord, #instVars : [ 'attributeName', 'attributeValue', 'attributeHash' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSInspectAttributeRecord >> attributeHash [ ^ attributeHash ] -{ #category : 'accessing' } +{ #category : #accessing } DSInspectAttributeRecord >> attributeHash: anObject [ attributeHash := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } DSInspectAttributeRecord >> attributeName [ ^ attributeName ] -{ #category : 'accessing' } +{ #category : #accessing } DSInspectAttributeRecord >> attributeName: anObject [ attributeName := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } DSInspectAttributeRecord >> attributeValue [ ^ attributeValue ] -{ #category : 'accessing' } +{ #category : #accessing } DSInspectAttributeRecord >> attributeValue: anObject [ attributeValue := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } DSInspectAttributeRecord >> eventName [ ^'Inspect object' ] -{ #category : 'actions api' } +{ #category : #'actions api' } DSInspectAttributeRecord >> record: inspectorNodeWithInspectedObjectWithWindow [ | inspectorNode window | diff --git a/DebuggingSpy/DSInspectMethodSourceRecord.class.st b/DebuggingSpy/DSInspectMethodSourceRecord.class.st index 63fd86c..9c59d93 100644 --- a/DebuggingSpy/DSInspectMethodSourceRecord.class.st +++ b/DebuggingSpy/DSInspectMethodSourceRecord.class.st @@ -2,17 +2,15 @@ I record inspections of the source of a method in the meta pane of an inspector " Class { - #name : 'DSInspectMethodSourceRecord', - #superclass : 'DSInspectMethodsRecord', + #name : #DSInspectMethodSourceRecord, + #superclass : #DSInspectMethodsRecord, #instVars : [ 'selectedMethod' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'actions api' } +{ #category : #'actions api' } DSInspectMethodSourceRecord >> record: inspectedObjectWithSelectedClassWithSelectedMethodWithWindow [ super record: { @@ -22,13 +20,13 @@ DSInspectMethodSourceRecord >> record: inspectedObjectWithSelectedClassWithSelec selectedMethod := inspectedObjectWithSelectedClassWithSelectedMethodWithWindow third name ] -{ #category : 'accessing' } +{ #category : #accessing } DSInspectMethodSourceRecord >> selectedMethod [ ^ selectedMethod ] -{ #category : 'accessing' } +{ #category : #accessing } DSInspectMethodSourceRecord >> selectedMethod: anObject [ selectedMethod := anObject diff --git a/DebuggingSpy/DSInspectMethodsRecord.class.st b/DebuggingSpy/DSInspectMethodsRecord.class.st index 3ff9a07..1663d72 100644 --- a/DebuggingSpy/DSInspectMethodsRecord.class.st +++ b/DebuggingSpy/DSInspectMethodsRecord.class.st @@ -2,22 +2,20 @@ I record inspections of the methods of a class in the meta pane of an inspector. " Class { - #name : 'DSInspectMethodsRecord', - #superclass : 'DSInspectorRecord', + #name : #DSInspectMethodsRecord, + #superclass : #DSInspectorRecord, #instVars : [ 'selectedClass' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSInspectMethodsRecord >> eventName [ ^'Inspect methods' ] -{ #category : 'actions api' } +{ #category : #'actions api' } DSInspectMethodsRecord >> record: inspectedObjectWithSelectedClassWithWindow [ super record: { @@ -26,13 +24,13 @@ DSInspectMethodsRecord >> record: inspectedObjectWithSelectedClassWithWindow [ selectedClass := inspectedObjectWithSelectedClassWithWindow second name ] -{ #category : 'accessing' } +{ #category : #accessing } DSInspectMethodsRecord >> selectedClass [ ^ selectedClass ] -{ #category : 'accessing' } +{ #category : #accessing } DSInspectMethodsRecord >> selectedClass: anObject [ selectedClass := anObject diff --git a/DebuggingSpy/DSInspectObjectRecord.class.st b/DebuggingSpy/DSInspectObjectRecord.class.st index b025b13..0d8cb18 100644 --- a/DebuggingSpy/DSInspectObjectRecord.class.st +++ b/DebuggingSpy/DSInspectObjectRecord.class.st @@ -2,14 +2,12 @@ I record the opening of an inspector on an object " Class { - #name : 'DSInspectObjectRecord', - #superclass : 'DSInspectorRecord', - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #name : #DSInspectObjectRecord, + #superclass : #DSInspectorRecord, + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSInspectObjectRecord >> eventName [ ^'Inspect object' ] diff --git a/DebuggingSpy/DSInspectorRecord.class.st b/DebuggingSpy/DSInspectorRecord.class.st index c68c07b..e46d488 100644 --- a/DebuggingSpy/DSInspectorRecord.class.st +++ b/DebuggingSpy/DSInspectorRecord.class.st @@ -2,42 +2,40 @@ I represent recorded events from an open inspector (standalone or embedded in another presenter). " Class { - #name : 'DSInspectorRecord', - #superclass : 'DSAbstractEventRecord', + #name : #DSInspectorRecord, + #superclass : #DSAbstractEventRecord, #instVars : [ 'inspectedObject', 'inspectedObjectHash' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSInspectorRecord >> inspectedObject [ ^ inspectedObject ] -{ #category : 'accessing' } +{ #category : #accessing } DSInspectorRecord >> inspectedObject: anObject [ inspectedObject := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } DSInspectorRecord >> inspectedObjectHash [ ^ inspectedObjectHash ] -{ #category : 'accessing' } +{ #category : #accessing } DSInspectorRecord >> inspectedObjectHash: anObject [ inspectedObjectHash := anObject ] -{ #category : 'actions api' } +{ #category : #'actions api' } DSInspectorRecord >> record: inspectedObjectAndWindow [ super record: inspectedObjectAndWindow second. diff --git a/DebuggingSpy/DSLoggingErrorRecord.class.st b/DebuggingSpy/DSLoggingErrorRecord.class.st index 3bbe719..2c131e0 100644 --- a/DebuggingSpy/DSLoggingErrorRecord.class.st +++ b/DebuggingSpy/DSLoggingErrorRecord.class.st @@ -2,28 +2,26 @@ I am generated when an event provokes an error while instantiating a Debugging Spy record. " Class { - #name : 'DSLoggingErrorRecord', - #superclass : 'DSAbstractEventRecord', + #name : #DSLoggingErrorRecord, + #superclass : #DSAbstractEventRecord, #instVars : [ 'event' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSLoggingErrorRecord >> event [ ^ event ] -{ #category : 'accessing' } +{ #category : #accessing } DSLoggingErrorRecord >> eventName [ ^'Error' ] -{ #category : 'actions api' } +{ #category : #'actions api' } DSLoggingErrorRecord >> record: anEventError [ event := anEventError ] diff --git a/DebuggingSpy/DSMethodAddedRecord.class.st b/DebuggingSpy/DSMethodAddedRecord.class.st index 5779389..d0fda25 100644 --- a/DebuggingSpy/DSMethodAddedRecord.class.st +++ b/DebuggingSpy/DSMethodAddedRecord.class.st @@ -2,14 +2,12 @@ I record when a method is added. " Class { - #name : 'DSMethodAddedRecord', - #superclass : 'DSMethodEventRecord', - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #name : #DSMethodAddedRecord, + #superclass : #DSMethodEventRecord, + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSMethodAddedRecord >> eventName [ ^'Method added' ] diff --git a/DebuggingSpy/DSMethodEventRecord.class.st b/DebuggingSpy/DSMethodEventRecord.class.st index 1db38c9..cb9f5e3 100644 --- a/DebuggingSpy/DSMethodEventRecord.class.st +++ b/DebuggingSpy/DSMethodEventRecord.class.st @@ -3,18 +3,16 @@ I register when a method event is generated, that is added, modified or removed. I just store the signature of the method. " Class { - #name : 'DSMethodEventRecord', - #superclass : 'DSAbstractEventRecord', + #name : #DSMethodEventRecord, + #superclass : #DSAbstractEventRecord, #instVars : [ 'methodName', 'methodSource' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } DSMethodEventRecord class >> added: aMethod [ ^ (self for: aMethod) @@ -22,7 +20,7 @@ DSMethodEventRecord class >> added: aMethod [ yourself ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } DSMethodEventRecord class >> modified: aMethod [ ^ (self for: aMethod) @@ -30,7 +28,7 @@ DSMethodEventRecord class >> modified: aMethod [ yourself ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } DSMethodEventRecord class >> removed: aMethod [ ^ (self for: aMethod) @@ -38,31 +36,31 @@ DSMethodEventRecord class >> removed: aMethod [ yourself ] -{ #category : 'accessing' } +{ #category : #accessing } DSMethodEventRecord >> methodName [ ^ methodName ] -{ #category : 'accessing' } +{ #category : #accessing } DSMethodEventRecord >> methodName: anObject [ methodName := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } DSMethodEventRecord >> methodSource [ ^ methodSource ] -{ #category : 'accessing' } +{ #category : #accessing } DSMethodEventRecord >> methodSource: anObject [ methodSource := anObject ] -{ #category : 'actions api' } +{ #category : #'actions api' } DSMethodEventRecord >> record: aCompiledMethod [ methodName := aCompiledMethod name. diff --git a/DebuggingSpy/DSMethodModifiedRecord.class.st b/DebuggingSpy/DSMethodModifiedRecord.class.st index 35c452f..c942920 100644 --- a/DebuggingSpy/DSMethodModifiedRecord.class.st +++ b/DebuggingSpy/DSMethodModifiedRecord.class.st @@ -2,14 +2,12 @@ I record when a method is modified. " Class { - #name : 'DSMethodModifiedRecord', - #superclass : 'DSMethodEventRecord', - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #name : #DSMethodModifiedRecord, + #superclass : #DSMethodEventRecord, + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSMethodModifiedRecord >> eventName [ ^ 'Method modified' diff --git a/DebuggingSpy/DSMethodRemovedRecord.class.st b/DebuggingSpy/DSMethodRemovedRecord.class.st index d85bbc2..a96df85 100644 --- a/DebuggingSpy/DSMethodRemovedRecord.class.st +++ b/DebuggingSpy/DSMethodRemovedRecord.class.st @@ -2,14 +2,12 @@ I record when a method is removed. " Class { - #name : 'DSMethodRemovedRecord', - #superclass : 'DSMethodEventRecord', - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #name : #DSMethodRemovedRecord, + #superclass : #DSMethodEventRecord, + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSMethodRemovedRecord >> eventName [ ^ 'Method removed' diff --git a/DebuggingSpy/DSMouseDownTableItemRecord.class.st b/DebuggingSpy/DSMouseDownTableItemRecord.class.st index 49676ee..241f068 100644 --- a/DebuggingSpy/DSMouseDownTableItemRecord.class.st +++ b/DebuggingSpy/DSMouseDownTableItemRecord.class.st @@ -2,14 +2,12 @@ This record is generated when the mouse clicks an item in a table. " Class { - #name : 'DSMouseDownTableItemRecord', - #superclass : 'DSMouseEventRecord', - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #name : #DSMouseDownTableItemRecord, + #superclass : #DSMouseEventRecord, + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSMouseDownTableItemRecord >> eventName [ ^'Click on table item' ] diff --git a/DebuggingSpy/DSMouseEnterTableItemRecord.class.st b/DebuggingSpy/DSMouseEnterTableItemRecord.class.st index fa49c1e..93490e9 100644 --- a/DebuggingSpy/DSMouseEnterTableItemRecord.class.st +++ b/DebuggingSpy/DSMouseEnterTableItemRecord.class.st @@ -2,14 +2,12 @@ This record is generated when the mouse enters an item in a table. " Class { - #name : 'DSMouseEnterTableItemRecord', - #superclass : 'DSMouseEventRecord', - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #name : #DSMouseEnterTableItemRecord, + #superclass : #DSMouseEventRecord, + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSMouseEnterTableItemRecord >> eventName [ ^'Mouse on table item' ] diff --git a/DebuggingSpy/DSMouseEnterTextEditorRecord.class.st b/DebuggingSpy/DSMouseEnterTextEditorRecord.class.st index d1eac25..fc99457 100644 --- a/DebuggingSpy/DSMouseEnterTextEditorRecord.class.st +++ b/DebuggingSpy/DSMouseEnterTextEditorRecord.class.st @@ -2,14 +2,12 @@ This record is generated when the mouse enters an item in a text editor. " Class { - #name : 'DSMouseEnterTextEditorRecord', - #superclass : 'DSMouseEventRecord', - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #name : #DSMouseEnterTextEditorRecord, + #superclass : #DSMouseEventRecord, + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSMouseEnterTextEditorRecord >> eventName [ ^'Mouse on text editor' ] diff --git a/DebuggingSpy/DSMouseEnterWindowRecord.class.st b/DebuggingSpy/DSMouseEnterWindowRecord.class.st index e44ec43..4b10ffa 100644 --- a/DebuggingSpy/DSMouseEnterWindowRecord.class.st +++ b/DebuggingSpy/DSMouseEnterWindowRecord.class.st @@ -2,14 +2,12 @@ This record is generated when the mouse enters a window (with or without focus). " Class { - #name : 'DSMouseEnterWindowRecord', - #superclass : 'DSMouseEventRecord', - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #name : #DSMouseEnterWindowRecord, + #superclass : #DSMouseEventRecord, + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSMouseEnterWindowRecord >> eventName [ ^'Enter window' ] diff --git a/DebuggingSpy/DSMouseEventRecord.class.st b/DebuggingSpy/DSMouseEventRecord.class.st index 3f3f67a..dec2875 100644 --- a/DebuggingSpy/DSMouseEventRecord.class.st +++ b/DebuggingSpy/DSMouseEventRecord.class.st @@ -6,29 +6,27 @@ For example the following events: means the user is currently browsing the method foo (and we assume there she reads the code).. " Class { - #name : 'DSMouseEventRecord', - #superclass : 'DSAbstractEventRecord', + #name : #DSMouseEventRecord, + #superclass : #DSAbstractEventRecord, #instVars : [ 'itemElement' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSMouseEventRecord >> itemElement [ ^ itemElement ] -{ #category : 'accessing' } +{ #category : #accessing } DSMouseEventRecord >> itemElement: anObject [ itemElement := anObject ] -{ #category : 'actions api' } +{ #category : #'actions api' } DSMouseEventRecord >> record: morphsAndWindow [ itemElement := self class printStringMorphs: morphsAndWindow first. diff --git a/DebuggingSpy/DSMouseLeaveWindowRecord.class.st b/DebuggingSpy/DSMouseLeaveWindowRecord.class.st index 86ec96d..ace1d84 100644 --- a/DebuggingSpy/DSMouseLeaveWindowRecord.class.st +++ b/DebuggingSpy/DSMouseLeaveWindowRecord.class.st @@ -2,14 +2,12 @@ This record is generated when the mouse leaves a window (with or without focus). " Class { - #name : 'DSMouseLeaveWindowRecord', - #superclass : 'DSMouseEventRecord', - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #name : #DSMouseLeaveWindowRecord, + #superclass : #DSMouseEventRecord, + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSMouseLeaveWindowRecord >> eventName [ ^'Leave window' ] diff --git a/DebuggingSpy/DSNavigateAttributeRecord.class.st b/DebuggingSpy/DSNavigateAttributeRecord.class.st index 3635e89..9de1e80 100644 --- a/DebuggingSpy/DSNavigateAttributeRecord.class.st +++ b/DebuggingSpy/DSNavigateAttributeRecord.class.st @@ -2,14 +2,12 @@ I record the inspection of an inspected object's attribute through selecting attributes in inspector tables " Class { - #name : 'DSNavigateAttributeRecord', - #superclass : 'DSInspectAttributeRecord', - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #name : #DSNavigateAttributeRecord, + #superclass : #DSInspectAttributeRecord, + #category : #'DebuggingSpy-Records' } -{ #category : 'actions api' } +{ #category : #'actions api' } DSNavigateAttributeRecord >> record: attributeWithModelAndWindow [ super record: { diff --git a/DebuggingSpy/DSPlaygroundOpenedRecord.class.st b/DebuggingSpy/DSPlaygroundOpenedRecord.class.st index 5ef07a9..9478ac0 100644 --- a/DebuggingSpy/DSPlaygroundOpenedRecord.class.st +++ b/DebuggingSpy/DSPlaygroundOpenedRecord.class.st @@ -2,14 +2,12 @@ I record that a StPlayground opened. " Class { - #name : 'DSPlaygroundOpenedRecord', - #superclass : 'DSPlaygroundRecord', - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #name : #DSPlaygroundOpenedRecord, + #superclass : #DSPlaygroundRecord, + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSPlaygroundOpenedRecord >> eventName [ ^'Playground open' ] diff --git a/DebuggingSpy/DSPlaygroundReadRecord.class.st b/DebuggingSpy/DSPlaygroundReadRecord.class.st index 5ad926c..4da546f 100644 --- a/DebuggingSpy/DSPlaygroundReadRecord.class.st +++ b/DebuggingSpy/DSPlaygroundReadRecord.class.st @@ -2,14 +2,12 @@ I record that a mouse entered a StPlayground's code, which may indicate that the developer is reading the code. " Class { - #name : 'DSPlaygroundReadRecord', - #superclass : 'DSPlaygroundRecord', - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #name : #DSPlaygroundReadRecord, + #superclass : #DSPlaygroundRecord, + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSPlaygroundReadRecord >> eventName [ ^ 'Playground read' diff --git a/DebuggingSpy/DSPlaygroundRecord.class.st b/DebuggingSpy/DSPlaygroundRecord.class.st index 344d5e4..81f0311 100644 --- a/DebuggingSpy/DSPlaygroundRecord.class.st +++ b/DebuggingSpy/DSPlaygroundRecord.class.st @@ -3,14 +3,12 @@ I record events that happens in a StPlayground. I do not really serve any purpose as an abstract class, but I'm just there to provide quick access to my subclasses' instances. " Class { - #name : 'DSPlaygroundRecord', - #superclass : 'DSAbstractEventRecord', - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #name : #DSPlaygroundRecord, + #superclass : #DSAbstractEventRecord, + #category : #'DebuggingSpy-Records' } -{ #category : 'actions api' } +{ #category : #'actions api' } DSPlaygroundRecord >> record: aPresenter [ super record: aPresenter window window ] diff --git a/DebuggingSpy/DSPlaygroundWriteRecord.class.st b/DebuggingSpy/DSPlaygroundWriteRecord.class.st index 1873721..28a2edd 100644 --- a/DebuggingSpy/DSPlaygroundWriteRecord.class.st +++ b/DebuggingSpy/DSPlaygroundWriteRecord.class.st @@ -2,14 +2,12 @@ I record that the developer is typing in an StPlayground. " Class { - #name : 'DSPlaygroundWriteRecord', - #superclass : 'DSPlaygroundRecord', - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #name : #DSPlaygroundWriteRecord, + #superclass : #DSPlaygroundRecord, + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSPlaygroundWriteRecord >> eventName [ ^'Playground write' ] diff --git a/DebuggingSpy/DSPrintItRecord.class.st b/DebuggingSpy/DSPrintItRecord.class.st index 5b8a487..a5b57d7 100644 --- a/DebuggingSpy/DSPrintItRecord.class.st +++ b/DebuggingSpy/DSPrintItRecord.class.st @@ -2,14 +2,12 @@ I record when the user selects code and debugs it. " Class { - #name : 'DSPrintItRecord', - #superclass : 'DSCodeActionRecord', - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #name : #DSPrintItRecord, + #superclass : #DSCodeActionRecord, + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSPrintItRecord >> eventName [ ^'Print it' ] diff --git a/DebuggingSpy/DSProceedCommand.class.st b/DebuggingSpy/DSProceedCommand.class.st index a49f9c9..85236f5 100644 --- a/DebuggingSpy/DSProceedCommand.class.st +++ b/DebuggingSpy/DSProceedCommand.class.st @@ -3,16 +3,14 @@ I specialize StProceedCommand with debugging spy record creation. I am meant to replace StProceedCommand commands in the debugger in order to provide such instrumentation. " Class { - #name : 'DSProceedCommand', - #superclass : 'StProceedCommand', + #name : #DSProceedCommand, + #superclass : #StProceedCommand, #traits : 'DSTCommandForTests', #classTraits : 'DSTCommandForTests classTrait', - #category : 'DebuggingSpy-Commands', - #package : 'DebuggingSpy', - #tag : 'Commands' + #category : #'DebuggingSpy-Commands' } -{ #category : 'executing' } +{ #category : #executing } DSProceedCommand >> execute [ [DSStepActionRecord for: self] on: Error do:[:e| DSSpy log: #ERROR key: #PROCEED]. diff --git a/DebuggingSpy/DSQueryBrowseRecord.class.st b/DebuggingSpy/DSQueryBrowseRecord.class.st index 1ee8a92..9cbd956 100644 --- a/DebuggingSpy/DSQueryBrowseRecord.class.st +++ b/DebuggingSpy/DSQueryBrowseRecord.class.st @@ -3,34 +3,32 @@ I record user browsing queries results (implementors, selectors...). I store the name of the query and the id of the window " Class { - #name : 'DSQueryBrowseRecord', - #superclass : 'DSAbstractEventRecord', + #name : #DSQueryBrowseRecord, + #superclass : #DSAbstractEventRecord, #instVars : [ 'queryName' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSQueryBrowseRecord >> eventName [ ^'Query' ] -{ #category : 'accessing' } +{ #category : #accessing } DSQueryBrowseRecord >> queryName [ ^ queryName ] -{ #category : 'accessing' } +{ #category : #accessing } DSQueryBrowseRecord >> queryName: anObject [ queryName := anObject ] -{ #category : 'actions api' } +{ #category : #'actions api' } DSQueryBrowseRecord >> record: aClyQueryBrowser [ super record: aClyQueryBrowser window. queryName := aClyQueryBrowser systemQuery description diff --git a/DebuggingSpy/DSRecordHistory.class.st b/DebuggingSpy/DSRecordHistory.class.st index 7b09398..c7896f6 100644 --- a/DebuggingSpy/DSRecordHistory.class.st +++ b/DebuggingSpy/DSRecordHistory.class.st @@ -2,8 +2,8 @@ I represent a user experiment record and expose an API to extract data from this record. " Class { - #name : 'DSRecordHistory', - #superclass : 'Object', + #name : #DSRecordHistory, + #superclass : #Object, #instVars : [ 'taskName', 'user', @@ -12,17 +12,15 @@ Class { 'tag', 'windowNames' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } DSRecordHistory class >> on: anArray [ ^self new processRecords: anArray ] -{ #category : 'API-history' } +{ #category : #'API-history' } DSRecordHistory >> addWindowRecord: aDSRecord [ (self windowsHistory @@ -30,44 +28,44 @@ DSRecordHistory >> addWindowRecord: aDSRecord [ ifAbsentPut: [ OrderedCollection new ]) add: aDSRecord ] -{ #category : 'private - history' } +{ #category : #'private - history' } DSRecordHistory >> allRecordsOfKind: aClass [ ^ records select: [ :record | record isKindOf: aClass ] ] -{ #category : 'API-history' } +{ #category : #'API-history' } DSRecordHistory >> breakpointAdds [ ^ (self breakpointEvents: BreakpointAdded name) size ] -{ #category : 'private - history' } +{ #category : #'private - history' } DSRecordHistory >> breakpointEvents [ ^ self records select: [ :r | r isKindOf: DSAbstractBreakpointEventRecord ] ] -{ #category : 'private - history' } +{ #category : #'private - history' } DSRecordHistory >> breakpointEvents: aBreakpointEventName [ ^ self breakpointEvents select: [ :bpEvent | bpEvent eventName = aBreakpointEventName ] ] -{ #category : 'API-history' } +{ #category : #'API-history' } DSRecordHistory >> breakpointHit [ ^ (self breakpointEvents: BreakpointHit name) size ] -{ #category : 'API-history' } +{ #category : #'API-history' } DSRecordHistory >> breakpointRemove [ ^ (self breakpointEvents: BreakpointRemoved name) size ] -{ #category : 'API-history' } +{ #category : #'API-history' } DSRecordHistory >> buildWindowHistory [ self windowsHistory removeAll. @@ -76,13 +74,13 @@ DSRecordHistory >> buildWindowHistory [ self fixWindowRecordKeysNames ] -{ #category : 'API-history' } +{ #category : #'API-history' } DSRecordHistory >> callStackBrowing [ ^ (self allRecordsOfKind: DSBrowseContextRecord) size ] -{ #category : 'private - history' } +{ #category : #'private - history' } DSRecordHistory >> collectTimeDiscrepancies [ | time currentRecord deltas | @@ -103,7 +101,7 @@ DSRecordHistory >> collectTimeDiscrepancies [ ^ deltas ] -{ #category : 'API-history' } +{ #category : #'API-history' } DSRecordHistory >> countDebugActions [ ^ self breakpointAdds + self breakpointHit + self breakpointRemove @@ -112,7 +110,7 @@ DSRecordHistory >> countDebugActions [ + self callStackBrowing ] -{ #category : 'private - history' } +{ #category : #'private - history' } DSRecordHistory >> detectTimeDiscrepancies [ |time currentRecord totalDelta| time := 0. @@ -131,23 +129,23 @@ DSRecordHistory >> detectTimeDiscrepancies [ ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } DSRecordHistory >> eventsAfter: aDateAndTime [ ^records select:[:e| e dateTime > aDateAndTime] ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } DSRecordHistory >> eventsBefore: aDateAndTime [ self shouldBeImplemented. ] -{ #category : 'API-history' } +{ #category : #'API-history' } DSRecordHistory >> executedCode [ ^ (self allRecordsOfKind: DSCodeActionRecord) size ] -{ #category : 'private - history' } +{ #category : #'private - history' } DSRecordHistory >> findWindowRecordKeyForID: id [ ^ self windowsHistory keys @@ -158,7 +156,7 @@ DSRecordHistory >> findWindowRecordKeyForID: id [ yourself ] ] -{ #category : 'private - history' } +{ #category : #'private - history' } DSRecordHistory >> fixMissingWindowIds [ | openedWindowStack | @@ -189,69 +187,69 @@ DSRecordHistory >> fixMissingWindowIds [ ifFalse: [ r windowId: openedWindowStack top ] ] ] ] -{ #category : 'private - history' } +{ #category : #'private - history' } DSRecordHistory >> fixWindowRecordKeysNames [ windowNames keysAndValuesDo: [ :id :name | (self findWindowRecordKeyForID: id) windowName: name ] ] -{ #category : 'initialization' } +{ #category : #initialization } DSRecordHistory >> initialize [ super initialize. self flag: 'I am not tested! Please do it!' ] -{ #category : 'API-history' } +{ #category : #'API-history' } DSRecordHistory >> methodsAdded [ ^ (self allRecordsOfKind: DSMethodAddedRecord) size ] -{ #category : 'API-history' } +{ #category : #'API-history' } DSRecordHistory >> methodsModified [ ^ (self allRecordsOfKind: DSMethodModifiedRecord) size ] -{ #category : 'API-history' } +{ #category : #'API-history' } DSRecordHistory >> methodsModifiedEvents [ ^ (self allRecordsOfKind: DSMethodModifiedRecord) ] -{ #category : 'API-history' } +{ #category : #'API-history' } DSRecordHistory >> methodsRemoved [ ^ (self allRecordsOfKind: DSMethodRemovedRecord) size ] -{ #category : 'accessing' } +{ #category : #accessing } DSRecordHistory >> name [ ^ self user, ': ', self taskName, '(', tag, ')' ] -{ #category : 'testing' } +{ #category : #testing } DSRecordHistory >> numberOfSeekerActions [ ^ (self records select: [ :r | DSSeekerActionRecord withAllSubclasses includes: r class ]) size ] -{ #category : 'API-history' } +{ #category : #'API-history' } DSRecordHistory >> numberOfSteps [ ^ (self allRecordsOfKind: DSStepActionRecord) size ] -{ #category : 'API-history' } +{ #category : #'API-history' } DSRecordHistory >> openedDebuggers [ ^ (self allRecordsOfKind: DSDebuggerOpeningRecord) size ] -{ #category : 'initialization' } +{ #category : #initialization } DSRecordHistory >> processRecords: array [ self records: array. @@ -259,43 +257,43 @@ DSRecordHistory >> processRecords: array [ self taskName: self records first taskName ] ] -{ #category : 'accessing' } +{ #category : #accessing } DSRecordHistory >> records [ ^ records ] -{ #category : 'accessing' } +{ #category : #accessing } DSRecordHistory >> records: anObject [ records := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } DSRecordHistory >> tag [ ^ tag ] -{ #category : 'accessing' } +{ #category : #accessing } DSRecordHistory >> tag: anObject [ tag := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } DSRecordHistory >> taskName [ ^ taskName ] -{ #category : 'accessing' } +{ #category : #accessing } DSRecordHistory >> taskName: anObject [ taskName := anObject ] -{ #category : 'API-history' } +{ #category : #'API-history' } DSRecordHistory >> timeTaken [ "The time taken to perform the recording of user events. The time is calculated as: @@ -306,24 +304,24 @@ DSRecordHistory >> timeTaken [ - self collectTimeDiscrepancies) / 60) asFloat ] -{ #category : 'accessing' } +{ #category : #accessing } DSRecordHistory >> user [ ^ user ] -{ #category : 'accessing' } +{ #category : #accessing } DSRecordHistory >> user: anObject [ user := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } DSRecordHistory >> windowsHistory [ ^windowsHistory ifNil:[windowsHistory := IdentityDictionary new] ] -{ #category : 'accessing' } +{ #category : #accessing } DSRecordHistory >> windowsHistory: anObject [ windowsHistory := anObject diff --git a/DebuggingSpy/DSRecordHistoryWindowKey.class.st b/DebuggingSpy/DSRecordHistoryWindowKey.class.st index 1abbc14..8bffa45 100644 --- a/DebuggingSpy/DSRecordHistoryWindowKey.class.st +++ b/DebuggingSpy/DSRecordHistoryWindowKey.class.st @@ -2,18 +2,16 @@ I am a simple key to sort logs by windows. " Class { - #name : 'DSRecordHistoryWindowKey', - #superclass : 'Object', + #name : #DSRecordHistoryWindowKey, + #superclass : #Object, #instVars : [ 'windowName', 'windowId' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'printing' } +{ #category : #printing } DSRecordHistoryWindowKey >> printOn: aStream [ aStream << (windowName ifNil: [ 'Unnamed window' ]). @@ -23,25 +21,25 @@ DSRecordHistoryWindowKey >> printOn: aStream [ aStream << ']' ] -{ #category : 'accessing' } +{ #category : #accessing } DSRecordHistoryWindowKey >> windowId [ ^ windowId ] -{ #category : 'accessing' } +{ #category : #accessing } DSRecordHistoryWindowKey >> windowId: anObject [ windowId := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } DSRecordHistoryWindowKey >> windowName [ ^ windowName ] -{ #category : 'accessing' } +{ #category : #accessing } DSRecordHistoryWindowKey >> windowName: anObject [ windowName := anObject diff --git a/DebuggingSpy/DSRecordRegistry.class.st b/DebuggingSpy/DSRecordRegistry.class.st index 247a6e3..a1a1e8e 100644 --- a/DebuggingSpy/DSRecordRegistry.class.st +++ b/DebuggingSpy/DSRecordRegistry.class.st @@ -2,8 +2,8 @@ For now I am a dumb registry to simply record all events in an ordered collection " Class { - #name : 'DSRecordRegistry', - #superclass : 'Object', + #name : #DSRecordRegistry, + #superclass : #Object, #instVars : [ 'records' ], @@ -13,43 +13,41 @@ Class { #classInstVars : [ 'autoSerialize' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSRecordRegistry class >> autoSerialize [ ^ autoSerialize ifNil: [ autoSerialize := false ] ] -{ #category : 'accessing' } +{ #category : #accessing } DSRecordRegistry class >> autoSerialize: anObject [ autoSerialize := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } DSRecordRegistry class >> current [ ^Current ifNil:[Current := self new] ] -{ #category : 'private' } +{ #category : #private } DSRecordRegistry class >> log: aDSRecord [ self autoSerialize ifFalse: [ ^ self ]. DSSpy serialize: aDSRecord ] -{ #category : 'private' } +{ #category : #private } DSRecordRegistry class >> serialize: aDSRecord [ self autoSerialize ifFalse: [ ^ self ]. DSSpy serialize: aDSRecord ] -{ #category : 'initialization' } +{ #category : #initialization } DSRecordRegistry >> addRecord: aRecord [ self assert: aRecord dateTime notNil. records add: aRecord. @@ -58,18 +56,18 @@ DSRecordRegistry >> addRecord: aRecord [ "aRecord crTrace" ] -{ #category : 'initialization' } +{ #category : #initialization } DSRecordRegistry >> initialize [ records := OrderedCollection new ] -{ #category : 'accessing' } +{ #category : #accessing } DSRecordRegistry >> records [ ^ records ] -{ #category : 'initialization' } +{ #category : #initialization } DSRecordRegistry >> reset [ records removeAll. DSSpy resetSpy diff --git a/DebuggingSpy/DSRestartCommand.class.st b/DebuggingSpy/DSRestartCommand.class.st index e3ac9fc..318b926 100644 --- a/DebuggingSpy/DSRestartCommand.class.st +++ b/DebuggingSpy/DSRestartCommand.class.st @@ -3,14 +3,12 @@ I specialize StRestartCommand with debugging spy record creation. I am meant to replace StRestartCommand commands in the debugger in order to provide such instrumentation. " Class { - #name : 'DSRestartCommand', - #superclass : 'StRestartCommand', - #category : 'DebuggingSpy-Commands', - #package : 'DebuggingSpy', - #tag : 'Commands' + #name : #DSRestartCommand, + #superclass : #StRestartCommand, + #category : #'DebuggingSpy-Commands' } -{ #category : 'executing' } +{ #category : #executing } DSRestartCommand >> execute [ [DSStepActionRecord for: self] on: Error do:[:e| DSSpy log: #ERROR key: #RESTART]. ^super execute. diff --git a/DebuggingSpy/DSReturnValueCommand.class.st b/DebuggingSpy/DSReturnValueCommand.class.st index 630bee0..42ff4da 100644 --- a/DebuggingSpy/DSReturnValueCommand.class.st +++ b/DebuggingSpy/DSReturnValueCommand.class.st @@ -3,16 +3,14 @@ I specialize StReturnValueCommand with debugging spy record creation. I am meant to replace StReturnValueCommand commands in the debugger in order to provide such instrumentation. " Class { - #name : 'DSReturnValueCommand', - #superclass : 'StReturnValueCommand', + #name : #DSReturnValueCommand, + #superclass : #StReturnValueCommand, #traits : 'DSTCommandForTests', #classTraits : 'DSTCommandForTests classTrait', - #category : 'DebuggingSpy-Commands', - #package : 'DebuggingSpy', - #tag : 'Commands' + #category : #'DebuggingSpy-Commands' } -{ #category : 'executing' } +{ #category : #executing } DSReturnValueCommand >> execute [ [DSStepActionRecord for: self] on: Error do:[:e| DSSpy log: #ERROR key: #RETURN_VALUE]. self forTests ifTrue: [ ^ self ]. diff --git a/DebuggingSpy/DSRunToSelectionCommand.class.st b/DebuggingSpy/DSRunToSelectionCommand.class.st index 30adfe6..b3dbdc3 100644 --- a/DebuggingSpy/DSRunToSelectionCommand.class.st +++ b/DebuggingSpy/DSRunToSelectionCommand.class.st @@ -3,14 +3,12 @@ I specialize StRunToSelectionCommand with debugging spy record creation. I am meant to replace StRunToSelectionCommand commands in the debugger in order to provide such instrumentation. " Class { - #name : 'DSRunToSelectionCommand', - #superclass : 'StRunToSelectionCommand', - #category : 'DebuggingSpy-Commands', - #package : 'DebuggingSpy', - #tag : 'Commands' + #name : #DSRunToSelectionCommand, + #superclass : #StRunToSelectionCommand, + #category : #'DebuggingSpy-Commands' } -{ #category : 'executing' } +{ #category : #executing } DSRunToSelectionCommand >> execute [ [DSStepActionRecord for: self] on: Error do:[:e| DSSpy log: #ERROR key: #RUN_TO]. ^super execute. diff --git a/DebuggingSpy/DSSTONFileLogger.class.st b/DebuggingSpy/DSSTONFileLogger.class.st index 8437d68..b538041 100644 --- a/DebuggingSpy/DSSTONFileLogger.class.st +++ b/DebuggingSpy/DSSTONFileLogger.class.st @@ -2,8 +2,8 @@ I log DSRecords as STON into files. " Class { - #name : 'DSSTONFileLogger', - #superclass : 'Object', + #name : #DSSTONFileLogger, + #superclass : #Object, #traits : 'TDSLogger', #classTraits : 'TDSLogger classTrait', #instVars : [ @@ -12,23 +12,21 @@ Class { 'loggingFileReference', 'savedConfiguration' ], - #category : 'DebuggingSpy-Loggers', - #package : 'DebuggingSpy', - #tag : 'Loggers' + #category : #'DebuggingSpy-Loggers' } -{ #category : 'accessing' } +{ #category : #accessing } DSSTONFileLogger >> defaultLoggingDirectoryName [ ^'ds-spy' ] -{ #category : 'accessing' } +{ #category : #accessing } DSSTONFileLogger >> defaultLoggingFileName [ ^ SessionManager default currentSession id asString ] -{ #category : 'logging' } +{ #category : #logging } DSSTONFileLogger >> ensureCreateLoggingFileReference [ | fname fr | @@ -38,47 +36,47 @@ DSSTONFileLogger >> ensureCreateLoggingFileReference [ ^ fr ] -{ #category : 'task management' } +{ #category : #'task management' } DSSTONFileLogger >> filenameForSurvey: aSurvey [ ^aSurvey uuid asString , '_' , self defaultLoggingFileName, '.', self surveyFileExtension ] -{ #category : 'task management' } +{ #category : #'task management' } DSSTONFileLogger >> forceLoggingFileNameFor: aTask [ loggingFilename := aTask title , '-' , self defaultLoggingFileName. loggingFileReference := self ensureCreateLoggingFileReference ] -{ #category : 'logging' } +{ #category : #logging } DSSTONFileLogger >> log: aDSEventRecord [ self writeToFile: (STON toString: aDSEventRecord) ] -{ #category : 'accessing' } +{ #category : #accessing } DSSTONFileLogger >> loggingDirectory [ ^loggingDirectory ifNil:[loggingDirectory := self defaultLoggingDirectoryName asFileReference] ] -{ #category : 'logging' } +{ #category : #logging } DSSTONFileLogger >> loggingDirectory: aStringOrFileReference [ loggingDirectory := aStringOrFileReference asFileReferenceWithRelativePath / self defaultLoggingDirectoryName asFileReference. loggingDirectory ensureCreateDirectory ] -{ #category : 'accessing' } +{ #category : #accessing } DSSTONFileLogger >> loggingFileName [ ^loggingFilename ifNil:[loggingFilename := self defaultLoggingFileName] ] -{ #category : 'accessing' } +{ #category : #accessing } DSSTONFileLogger >> loggingFileReference [ ^loggingFileReference ifNil:[loggingFileReference := self ensureCreateLoggingFileReference] ] -{ #category : 'initialization' } +{ #category : #initialization } DSSTONFileLogger >> reset [ loggingDirectory := nil. @@ -86,7 +84,7 @@ DSSTONFileLogger >> reset [ loggingFileReference := nil ] -{ #category : 'private' } +{ #category : #private } DSSTONFileLogger >> restoreCurrentConfiguration [ loggingFilename := self savedConfiguration at: @@ -95,7 +93,7 @@ DSSTONFileLogger >> restoreCurrentConfiguration [ #currentLoggingFileReference ] -{ #category : 'private' } +{ #category : #private } DSSTONFileLogger >> saveCurrentConfiguration [ self savedConfiguration @@ -106,18 +104,18 @@ DSSTONFileLogger >> saveCurrentConfiguration [ put: loggingFileReference ] -{ #category : 'accessing' } +{ #category : #accessing } DSSTONFileLogger >> savedConfiguration [ ^savedConfiguration ifNil:[savedConfiguration := Dictionary new] ] -{ #category : 'setup' } +{ #category : #setup } DSSTONFileLogger >> setupLoggerAfterSurvey: aSurvey [ self restoreCurrentConfiguration ] -{ #category : 'setup' } +{ #category : #setup } DSSTONFileLogger >> setupLoggerBeforeSurvey: aSurvey [ self saveCurrentConfiguration. @@ -125,23 +123,23 @@ DSSTONFileLogger >> setupLoggerBeforeSurvey: aSurvey [ loggingFileReference := self ensureCreateLoggingFileReference ] -{ #category : 'setup' } +{ #category : #setup } DSSTONFileLogger >> setupLoggerForTask: aTask [ self forceLoggingFileNameFor: aTask ] -{ #category : 'logging' } +{ #category : #logging } DSSTONFileLogger >> stream [ ^ self loggingFileReference writeStream ] -{ #category : 'task management' } +{ #category : #'task management' } DSSTONFileLogger >> surveyFileExtension [ ^'survey' ] -{ #category : 'logging' } +{ #category : #logging } DSSTONFileLogger >> writeToFile: aString [ | str strSize firstWrite writingPosition | diff --git a/DebuggingSpy/DSScrollEventRecord.class.st b/DebuggingSpy/DSScrollEventRecord.class.st index a839bd2..0909d9e 100644 --- a/DebuggingSpy/DSScrollEventRecord.class.st +++ b/DebuggingSpy/DSScrollEventRecord.class.st @@ -3,14 +3,12 @@ I record a scrolling event somewhere in a FTTableMorph or a GeneralScrollPane. To identify where I am scrolling, use the window id recorded by my superclass. " Class { - #name : 'DSScrollEventRecord', - #superclass : 'DSAbstractEventRecord', - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #name : #DSScrollEventRecord, + #superclass : #DSAbstractEventRecord, + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSScrollEventRecord >> eventName [ ^'Scrolling' ] diff --git a/DebuggingSpy/DSSelectInspectorPageRecord.class.st b/DebuggingSpy/DSSelectInspectorPageRecord.class.st index 0d753a5..1750b70 100644 --- a/DebuggingSpy/DSSelectInspectorPageRecord.class.st +++ b/DebuggingSpy/DSSelectInspectorPageRecord.class.st @@ -2,34 +2,32 @@ I record the selection of an inspector page when inspecting an object " Class { - #name : 'DSSelectInspectorPageRecord', - #superclass : 'DSInspectorRecord', + #name : #DSSelectInspectorPageRecord, + #superclass : #DSInspectorRecord, #instVars : [ 'pageTitle' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'accessing' } +{ #category : #accessing } DSSelectInspectorPageRecord >> eventName [ ^'Selecting inspector page' ] -{ #category : 'accessing' } +{ #category : #accessing } DSSelectInspectorPageRecord >> pageTitle [ ^ pageTitle ] -{ #category : 'accessing' } +{ #category : #accessing } DSSelectInspectorPageRecord >> pageTitle: anObject [ pageTitle := anObject ] -{ #category : 'actions api' } +{ #category : #'actions api' } DSSelectInspectorPageRecord >> record: pageTitleWithInspectedObjectWithWindow [ super record: { diff --git a/DebuggingSpy/DSSourceCodeChangeEventRecord.class.st b/DebuggingSpy/DSSourceCodeChangeEventRecord.class.st index f13a638..520c20c 100644 --- a/DebuggingSpy/DSSourceCodeChangeEventRecord.class.st +++ b/DebuggingSpy/DSSourceCodeChangeEventRecord.class.st @@ -5,18 +5,16 @@ I record a change in source code: - I know the new source code " Class { - #name : 'DSSourceCodeChangeEventRecord', - #superclass : 'DSMethodEventRecord', + #name : #DSSourceCodeChangeEventRecord, + #superclass : #DSMethodEventRecord, #instVars : [ 'oldSource', 'newSource' ], - #category : 'DebuggingSpy-Records', - #package : 'DebuggingSpy', - #tag : 'Records' + #category : #'DebuggingSpy-Records' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } DSSourceCodeChangeEventRecord class >> added: aMethod [ ^ (self for: aMethod) @@ -24,7 +22,7 @@ DSSourceCodeChangeEventRecord class >> added: aMethod [ yourself ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } DSSourceCodeChangeEventRecord class >> modified: aMethod [ ^ (self for: aMethod) @@ -32,7 +30,7 @@ DSSourceCodeChangeEventRecord class >> modified: aMethod [ yourself ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } DSSourceCodeChangeEventRecord class >> removed: aMethod [ ^ (self for: aMethod) @@ -40,24 +38,24 @@ DSSourceCodeChangeEventRecord class >> removed: aMethod [ yourself ] -{ #category : 'accessing' } +{ #category : #accessing } DSSourceCodeChangeEventRecord >> eventName [ ^'Source code modification' ] -{ #category : 'accessing' } +{ #category : #accessing } DSSourceCodeChangeEventRecord >> newSource [ ^ newSource ] -{ #category : 'accessing' } +{ #category : #accessing } DSSourceCodeChangeEventRecord >> oldSource [ ^ oldSource ] -{ #category : 'actions api' } +{ #category : #'actions api' } DSSourceCodeChangeEventRecord >> record: anArray [ super record: anArray first. oldSource := anArray second. diff --git a/DebuggingSpy/DSSpy.class.st b/DebuggingSpy/DSSpy.class.st index 079d064..741c54c 100644 --- a/DebuggingSpy/DSSpy.class.st +++ b/DebuggingSpy/DSSpy.class.st @@ -2,8 +2,8 @@ I collect spy informations " Class { - #name : 'DSSpy', - #superclass : 'Object', + #name : #DSSpy, + #superclass : #Object, #classVars : [ 'HandlingError', 'monitor' @@ -17,12 +17,10 @@ Class { 'recordClipboardContent', 'scopeSourceCodeChangesRecording' ], - #category : 'DebuggingSpy-Instrumentation', - #package : 'DebuggingSpy', - #tag : 'Instrumentation' + #category : #'DebuggingSpy-Instrumentation' } -{ #category : 'task management' } +{ #category : #'task management' } DSSpy class >> closeSurvey: aSurvey [ | currentTaskStarted | @@ -36,17 +34,17 @@ DSSpy class >> closeSurvey: aSurvey [ logger setupLoggerAfterSurvey: aSurvey ] -{ #category : 'mutual exclusion' } +{ #category : #'mutual exclusion' } DSSpy class >> critical: aBlock [ self monitor critical: aBlock ] -{ #category : 'logging' } +{ #category : #logging } DSSpy class >> defaultLoggerClass [ ^DSSTONFileLogger ] -{ #category : 'task management' } +{ #category : #'task management' } DSSpy class >> endTask: aTask [ DSEndingTaskRecord for: aTask. @@ -54,19 +52,19 @@ DSSpy class >> endTask: aTask [ taskStarted := false ] -{ #category : 'task management' } +{ #category : #'task management' } DSSpy class >> forceRunningTask: aTask [ logger setupLoggerForTask: aTask. taskStarted := true ] -{ #category : 'accessing' } +{ #category : #accessing } DSSpy class >> handlingError: anObject [ ^ HandlingError := anObject ] -{ #category : 'events - breakpoints' } +{ #category : #'events - breakpoints' } DSSpy class >> indexesOfHaltNodesIn: aMethod [ | haltNodes | @@ -74,7 +72,7 @@ DSSpy class >> indexesOfHaltNodesIn: aMethod [ ^ haltNodes collect: [ :hn | hn selector -> (hn start to: hn stop) ] ] -{ #category : 'logging' } +{ #category : #logging } DSSpy class >> log: aDSRecord [ (self logOnlyWhenTaskStarted and: [ self taskStarted not ]) ifTrue: [ @@ -82,7 +80,7 @@ DSSpy class >> log: aDSRecord [ self critical: [ logger log: aDSRecord ] ] -{ #category : 'logging' } +{ #category : #logging } DSSpy class >> log: elements key: key [ " HandlingError ifNil: [ HandlingError := false ]. @@ -93,19 +91,19 @@ DSSpy class >> log: elements key: key [ DSLoggingErrorRecord for: key ] -{ #category : 'accessing' } +{ #category : #accessing } DSSpy class >> logOnlyWhenTaskStarted [ ^ logOnlyWhenTaskStarted ifNil:[logOnlyWhenTaskStarted := false] ] -{ #category : 'accessing' } +{ #category : #accessing } DSSpy class >> logOnlyWhenTaskStarted: anObject [ logOnlyWhenTaskStarted := anObject ] -{ #category : 'events - windows' } +{ #category : #'events - windows' } DSSpy class >> logWindowActivated: anEvent [ [ DSWindowActivatedRecord for: anEvent ] @@ -113,14 +111,14 @@ DSSpy class >> logWindowActivated: anEvent [ do: [ self log: #ERROR key: #WINDOW_ACTIVATED ] ] -{ #category : 'events - windows' } +{ #category : #'events - windows' } DSSpy class >> logWindowClosed: anEvent [ [ DSWindowClosedRecord for: anEvent ] on: Error do: [ self log: #ERROR key: #WINDOW_CLOSED ] ] -{ #category : 'events - windows' } +{ #category : #'events - windows' } DSSpy class >> logWindowOpened: anEvent [ | window | window := anEvent window. @@ -134,25 +132,25 @@ DSSpy class >> logWindowOpened: anEvent [ window announcer when: WindowClosed send: #logWindowClosed: to: self ] -{ #category : 'accessing' } +{ #category : #accessing } DSSpy class >> logger [ ^ logger ifNil:[logger := self defaultLoggerClass new] ] -{ #category : 'accessing' } +{ #category : #accessing } DSSpy class >> logger: anObject [ logger := anObject ] -{ #category : 'serialize/materialize' } +{ #category : #'serialize/materialize' } DSSpy class >> materialize: aFilename [ ^STON fromString: aFilename asFileReference contents ] -{ #category : 'events - methods' } +{ #category : #'events - methods' } DSSpy class >> methodAdded: evt [ [ @@ -164,7 +162,7 @@ DSSpy class >> methodAdded: evt [ do: [ :e | self log: #ERROR key: #METHOD_ADDED ] ] -{ #category : 'events - methods' } +{ #category : #'events - methods' } DSSpy class >> methodChanged: evt [ [ @@ -185,7 +183,7 @@ DSSpy class >> methodChanged: evt [ do: [ self log: #ERROR key: #METHOD_MODIFIED ] ] -{ #category : 'events - methods' } +{ #category : #'events - methods' } DSSpy class >> methodRemoved: evt [ [ @@ -197,47 +195,47 @@ DSSpy class >> methodRemoved: evt [ do: [ self log: #ERROR key: #METHOD_REMOVED ] ] -{ #category : 'accessing' } +{ #category : #accessing } DSSpy class >> monitor [ ^monitor ifNil:[monitor := Monitor new] ] -{ #category : 'events - methods' } +{ #category : #'events - methods' } DSSpy class >> monitorPackageForSourceCodeChanges: aString [ self packagesMonitoredForSourceCodeChanges add: aString ] -{ #category : 'events - methods' } +{ #category : #'events - methods' } DSSpy class >> packagesMonitoredForSourceCodeChanges [ ^ packagesMonitoredForSourceCodeChanges ifNil: [ packagesMonitoredForSourceCodeChanges := Set new ] ] -{ #category : 'accessing' } +{ #category : #accessing } DSSpy class >> packagesMonitoredForSourceCodeChanges: anObject [ packagesMonitoredForSourceCodeChanges := anObject ] -{ #category : 'events - breakpoints' } +{ #category : #'events - breakpoints' } DSSpy class >> recordBreakpointEvent: aBreakpointEvent [ ^aBreakpointEvent recordBreakpoint ] -{ #category : 'accessing' } +{ #category : #accessing } DSSpy class >> recordClipboardContent [ ^ recordClipboardContent ifNil: [ recordClipboardContent := false ] ] -{ #category : 'accessing' } +{ #category : #accessing } DSSpy class >> recordClipboardContent: anObject [ recordClipboardContent := anObject ] -{ #category : 'events - breakpoints' } +{ #category : #'events - breakpoints' } DSSpy class >> recordHaltInAddedMethod: method [ |nodesSelectorsWithIndexes record| nodesSelectorsWithIndexes := self indexesOfHaltNodesIn: method. @@ -246,7 +244,7 @@ DSSpy class >> recordHaltInAddedMethod: method [ record method: method name ] -{ #category : 'events - breakpoints' } +{ #category : #'events - breakpoints' } DSSpy class >> recordHaltInMethod: oldMethod modifiedBy: newMethod [ | oldHalts newHalts record | @@ -262,7 +260,7 @@ DSSpy class >> recordHaltInMethod: oldMethod modifiedBy: newMethod [ record method: newMethod name ] -{ #category : 'events - breakpoints' } +{ #category : #'events - breakpoints' } DSSpy class >> recordHaltInRemovedMethod: oldMethod [ |nodesSelectorsWithIndexes record| nodesSelectorsWithIndexes := self indexesOfHaltNodesIn: oldMethod. @@ -271,19 +269,19 @@ DSSpy class >> recordHaltInRemovedMethod: oldMethod [ record method: oldMethod name ] -{ #category : 'accessing' } +{ #category : #accessing } DSSpy class >> recordSourceCode [ ^ recordSourceCode ifNil: [ recordSourceCode := false ] ] -{ #category : 'accessing' } +{ #category : #accessing } DSSpy class >> recordSourceCode: aBoolean [ recordSourceCode := aBoolean ] -{ #category : 'events - methods' } +{ #category : #'events - methods' } DSSpy class >> recordSourceCodeChangeFrom: oldMethod to: newMethod [ self scopeSourceCodeChangesRecording ifTrue: [ @@ -297,13 +295,13 @@ DSSpy class >> recordSourceCodeChangeFrom: oldMethod to: newMethod [ newMethod sourceCode } ] -{ #category : 'accessing' } +{ #category : #accessing } DSSpy class >> recordSourceCodeDisabledErrorMessage [ ^ 'Source code recording disabled' ] -{ #category : 'initialization' } +{ #category : #initialization } DSSpy class >> resetSpy [ logger ifNotNil:[:l| l reset]. @@ -311,25 +309,25 @@ DSSpy class >> resetSpy [ logOnlyWhenTaskStarted := false ] -{ #category : 'accessing' } +{ #category : #accessing } DSSpy class >> scopeSourceCodeChangesRecording [ ^ scopeSourceCodeChangesRecording ifNil: [ scopeSourceCodeChangesRecording := false ] ] -{ #category : 'accessing' } +{ #category : #accessing } DSSpy class >> scopeSourceCodeChangesRecording: anObject [ scopeSourceCodeChangesRecording := anObject ] -{ #category : 'serialize/materialize' } +{ #category : #'serialize/materialize' } DSSpy class >> serialize: aDSEventRecord [ self log: aDSEventRecord ] -{ #category : 'task management' } +{ #category : #'task management' } DSSpy class >> startTask: aTask [ logger setupLoggerForTask: aTask. @@ -337,7 +335,7 @@ DSSpy class >> startTask: aTask [ DSStartTaskRecord for: aTask ] -{ #category : 'accessing' } +{ #category : #accessing } DSSpy class >> taskStarted [ ^ taskStarted ifNil: [ taskStarted := false ] diff --git a/DebuggingSpy/DSSpyInstrumenter.class.st b/DebuggingSpy/DSSpyInstrumenter.class.st index e44eee1..c1d5ada 100644 --- a/DebuggingSpy/DSSpyInstrumenter.class.st +++ b/DebuggingSpy/DSSpyInstrumenter.class.st @@ -2,21 +2,19 @@ I instrument the system by adding spying instructions (directly in the code, by meta-programming, or by registering to system-events) " Class { - #name : 'DSSpyInstrumenter', - #superclass : 'Object', - #category : 'DebuggingSpy-Instrumentation', - #package : 'DebuggingSpy', - #tag : 'Instrumentation' + #name : #DSSpyInstrumenter, + #superclass : #Object, + #category : #'DebuggingSpy-Instrumentation' } -{ #category : 'system instrumentation' } +{ #category : #'system instrumentation' } DSSpyInstrumenter class >> instrumentSystem [