diff --git a/.github/workflows/dsspy.yaml b/.github/workflows/dsspy.yaml index 7dcd310..7213dad 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-9.0 ] + smalltalk: [ Pharo64-12 ] name: ${{ matrix.smalltalk }} steps: - uses: actions/checkout@v2 diff --git a/DebuggingSpy-Tests/DSFakeTextEditor.class.st b/DebuggingSpy-Tests/DSFakeTextEditor.class.st index a1c06c7..39abfc1 100644 --- a/DebuggingSpy-Tests/DSFakeTextEditor.class.st +++ b/DebuggingSpy-Tests/DSFakeTextEditor.class.st @@ -3,11 +3,12 @@ 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' + #name : 'DSFakeTextEditor', + #superclass : 'RubSmalltalkEditor', + #category : 'DebuggingSpy-Tests', + #package : 'DebuggingSpy-Tests' } -{ #category : #accessing } +{ #category : 'accessing' } DSFakeTextEditor >> contents: anObject [ ] diff --git a/DebuggingSpy-Tests/DSNoDebuggerSelectionStrategy.class.st b/DebuggingSpy-Tests/DSNoDebuggerSelectionStrategy.class.st index f9048c6..7b47f33 100644 --- a/DebuggingSpy-Tests/DSNoDebuggerSelectionStrategy.class.st +++ b/DebuggingSpy-Tests/DSNoDebuggerSelectionStrategy.class.st @@ -2,17 +2,18 @@ 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' + #name : 'DSNoDebuggerSelectionStrategy', + #superclass : 'OupsDebuggerSelectionStrategy', + #category : 'DebuggingSpy-Tests', + #package : '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 b444cdd..a3ca554 100644 --- a/DebuggingSpy-Tests/DSRecordRegistryTest.class.st +++ b/DebuggingSpy-Tests/DSRecordRegistryTest.class.st @@ -1,25 +1,26 @@ Class { - #name : #DSRecordRegistryTest, - #superclass : #TestCase, + #name : 'DSRecordRegistryTest', + #superclass : 'TestCase', #instVars : [ 'record' ], - #category : #'DebuggingSpy-Tests' + #category : 'DebuggingSpy-Tests', + #package : '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 30fed27..6248fd9 100644 --- a/DebuggingSpy-Tests/DSRecordTest.class.st +++ b/DebuggingSpy-Tests/DSRecordTest.class.st @@ -1,13 +1,14 @@ Class { - #name : #DSRecordTest, - #superclass : #TestCase, + #name : 'DSRecordTest', + #superclass : 'TestCase', #instVars : [ 'record' ], - #category : #'DebuggingSpy-Tests' + #category : 'DebuggingSpy-Tests', + #package : 'DebuggingSpy-Tests' } -{ #category : #tests } +{ #category : 'tests' } DSRecordTest >> testRecordPrinting [ | str | diff --git a/DebuggingSpy-Tests/DSSTONFileLoggerTest.class.st b/DebuggingSpy-Tests/DSSTONFileLoggerTest.class.st index f0a727c..b187f94 100644 --- a/DebuggingSpy-Tests/DSSTONFileLoggerTest.class.st +++ b/DebuggingSpy-Tests/DSSTONFileLoggerTest.class.st @@ -1,16 +1,17 @@ Class { - #name : #DSSTONFileLoggerTest, - #superclass : #TestCase, + #name : 'DSSTONFileLoggerTest', + #superclass : 'TestCase', #instVars : [ 'logger', 'survey', 'task', 'oldLogger' ], - #category : #'DebuggingSpy-Tests' + #category : 'DebuggingSpy-Tests', + #package : 'DebuggingSpy-Tests' } -{ #category : #running } +{ #category : 'running' } DSSTONFileLoggerTest >> setUp [ super setUp. oldLogger := DSSpy logger. @@ -20,14 +21,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 @@ -35,12 +36,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 | @@ -51,7 +52,7 @@ DSSTONFileLoggerTest >> testEnsureCreateLoggingFileReference [ self assert: fileReference exists ] -{ #category : #'tests - task management' } +{ #category : 'tests - task management' } DSSTONFileLoggerTest >> testFilenameForSurvey [ |fnameStream| fnameStream := (logger filenameForSurvey: survey) readStream. @@ -60,7 +61,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. @@ -69,7 +70,7 @@ DSSTONFileLoggerTest >> testForceLoggingFileNameFor [ self assert: logger loggingFileReference exists ] -{ #category : #'tests - task management' } +{ #category : 'tests - task management' } DSSTONFileLoggerTest >> testForceRunningTask [ DSSpy resetSpy. @@ -80,7 +81,7 @@ DSSTONFileLoggerTest >> testForceRunningTask [ task title , '-' , SessionManager default currentSession id asString ] -{ #category : #'tests - file handling' } +{ #category : 'tests - file handling' } DSSTONFileLoggerTest >> testLoggingDirectory [ self @@ -88,7 +89,7 @@ DSSTONFileLoggerTest >> testLoggingDirectory [ equals: logger defaultLoggingDirectoryName asFileReference ] -{ #category : #'tests - file handling' } +{ #category : 'tests - file handling' } DSSTONFileLoggerTest >> testLoggingFileName [ self @@ -96,7 +97,7 @@ DSSTONFileLoggerTest >> testLoggingFileName [ equals: logger defaultLoggingFileName ] -{ #category : #'tests - file handling' } +{ #category : 'tests - file handling' } DSSTONFileLoggerTest >> testLoggingFileNameAfterTaskEnded [ DSSpy startTask: task. @@ -106,7 +107,7 @@ DSSTONFileLoggerTest >> testLoggingFileNameAfterTaskEnded [ equals: logger defaultLoggingFileName ] -{ #category : #'tests - file handling' } +{ #category : 'tests - file handling' } DSSTONFileLoggerTest >> testLoggingFileNameAfterTaskStarted [ DSSpy startTask: task. @@ -116,7 +117,7 @@ DSSTONFileLoggerTest >> testLoggingFileNameAfterTaskStarted [ equals: (task title, '-', logger defaultLoggingFileName) ] -{ #category : #'tests - file handling' } +{ #category : 'tests - file handling' } DSSTONFileLoggerTest >> testLoggingFileReference [ | fileReference | @@ -127,7 +128,7 @@ DSSTONFileLoggerTest >> testLoggingFileReference [ self assert: fileReference exists ] -{ #category : #tests } +{ #category : 'tests' } DSSTONFileLoggerTest >> testReset [ logger forceLoggingFileNameFor: task. logger reset. @@ -136,12 +137,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 3db1804..2bb7b55 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,10 +12,11 @@ Class { 'methodsToRemove', 'recordSourceCode' ], - #category : #'DebuggingSpy-Tests' + #category : 'DebuggingSpy-Tests', + #package : 'DebuggingSpy-Tests' } -{ #category : #assertions } +{ #category : 'assertions' } DSSpyInstrumenterTest >> assertHaltHitRecordingMethod: method [ self assert: record class equals: DSHaltHitRecord. @@ -24,7 +25,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. @@ -32,7 +33,7 @@ DSSpyInstrumenterTest >> assertHaltHitRecordingMethod: method conditional: isHal self assertHaltHitRecordingMethod: method ] -{ #category : #assertions } +{ #category : 'assertions' } DSSpyInstrumenterTest >> assertInstrumentDebuggerCommandNamed: debuggerCommandName [ | cmds cmd | @@ -60,7 +61,7 @@ DSSpyInstrumenterTest >> assertInstrumentDebuggerCommandNamed: debuggerCommandNa self assertStepActionRecordForCommandNamed: debuggerCommandName ] -{ #category : #assertions } +{ #category : 'assertions' } DSSpyInstrumenterTest >> assertInstrumentSindarinDebuggerCommandNamed: debuggerCommandName [ | modifiedMethod cmds cmd | @@ -102,7 +103,7 @@ DSSpyInstrumenterTest >> assertInstrumentSindarinDebuggerCommandNamed: debuggerC self assertStepActionRecordForCommandNamed: debuggerCommandName. ] -{ #category : #assertions } +{ #category : 'assertions' } DSSpyInstrumenterTest >> assertStepActionRecordForCommandNamed: debuggerCommandName [ self assert: self registry size equals: 1. @@ -121,7 +122,7 @@ DSSpyInstrumenterTest >> assertStepActionRecordForCommandNamed: debuggerCommandN self assert: record receiverClass equals: debugger currentContext receiver class name ] -{ #category : #helpers } +{ #category : 'helpers' } DSSpyInstrumenterTest >> clyTextEditor [ | editor textArea | @@ -135,7 +136,7 @@ DSSpyInstrumenterTest >> clyTextEditor [ ^ editor ] -{ #category : #helpers } +{ #category : 'helpers' } DSSpyInstrumenterTest >> codePresenterFrom: aPlaygroundPagePresenter [ | codePresenter adapter | @@ -153,7 +154,7 @@ DSSpyInstrumenterTest >> codePresenterFrom: aPlaygroundPagePresenter [ ^ codePresenter ] -{ #category : #helpers } +{ #category : 'helpers' } DSSpyInstrumenterTest >> debuggerForTesting [ debugger := StTestDebuggerProvider new debuggerWithObjectHalting. @@ -162,7 +163,7 @@ DSSpyInstrumenterTest >> debuggerForTesting [ ^ debugger ] -{ #category : #helpers } +{ #category : 'helpers' } DSSpyInstrumenterTest >> debuggerForTestingWithWindow [ debugger := StTestDebuggerProvider new debuggerWithObjectHalting. @@ -172,7 +173,7 @@ DSSpyInstrumenterTest >> debuggerForTestingWithWindow [ ^ debugger ] -{ #category : #helpers } +{ #category : 'helpers' } DSSpyInstrumenterTest >> debuggerOnRecursiveContextForTesting [ ^ StTestDebuggerProvider new debuggerWithRecursiveContext @@ -180,7 +181,7 @@ DSSpyInstrumenterTest >> debuggerOnRecursiveContextForTesting [ initialize ] -{ #category : #helpers } +{ #category : 'helpers' } DSSpyInstrumenterTest >> debuggerWithRunnableContext [ ^ StTestDebuggerProvider new debuggerWithObjectHalting @@ -188,49 +189,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 := StInspector basicNew. + inspector := StInspectorPresenter basicNew. self setDummyWindowForPresenter: inspector. inspector setModelBeforeInitialization: (StInspectorModel on: anObject). @@ -238,19 +239,20 @@ DSSpyInstrumenterTest >> newInspectorOn: anObject [ ^ inspector ] -{ #category : #helpers } +{ #category : 'helpers' } DSSpyInstrumenterTest >> playgroundPagePresenter [ | playground | playground := StPlaygroundPagePresenter basicNew. self setDummyWindowForPresenter: playground. - playground setModelBeforeInitialization: (NewValueHolder value: nil). + playground setModelBeforeInitialization: + (NewValueHolderForTestWithDummyPlaygroundPage value: nil). playground application: StPharoApplication current. playground initialize. ^ playground ] -{ #category : #helpers } +{ #category : 'helpers' } DSSpyInstrumenterTest >> press: aCharacter in: aPresenter [ aPresenter adapter @@ -261,7 +263,7 @@ DSSpyInstrumenterTest >> press: aCharacter in: aPresenter [ option: false ] -{ #category : #helpers } +{ #category : 'helpers' } DSSpyInstrumenterTest >> recompileExecuteHaltOnce [ self class compile: 'executeHaltOnce @@ -269,26 +271,28 @@ 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). - textArea setTextWith: '41+1' printString. + (textArea := RubEditingArea new + beForSmalltalkCode; + yourself). + 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 | @@ -307,7 +311,7 @@ DSSpyInstrumenterTest >> runWithoutOpeningDebugger: aBlock [ debuggerSelectionStrategy ] -{ #category : #helpers } +{ #category : 'helpers' } DSSpyInstrumenterTest >> setDummyWindowForMorph: morph [ [ morph privateOwner: SystemWindow basicNew ] @@ -315,7 +319,7 @@ DSSpyInstrumenterTest >> setDummyWindowForMorph: morph [ do: [ ] ] -{ #category : #helpers } +{ #category : 'helpers' } DSSpyInstrumenterTest >> setDummyWindowForPresenter: presenter [ | windowPresenter | @@ -326,13 +330,13 @@ DSSpyInstrumenterTest >> setDummyWindowForPresenter: presenter [ ] -{ #category : #helpers } +{ #category : 'helpers' } DSSpyInstrumenterTest >> setDummyWindowPresenter: windowPresenter forPresenter: presenter [ - windowPresenter presenter: presenter + windowPresenter basicPresenter: presenter ] -{ #category : #running } +{ #category : 'running' } DSSpyInstrumenterTest >> setUp [ super setUp. @@ -342,7 +346,7 @@ DSSpyInstrumenterTest >> setUp [ DSRecordRegistry current reset ] -{ #category : #helpers } +{ #category : 'helpers' } DSSpyInstrumenterTest >> simulatedMouseEventFor: morph [ ^ MouseMoveEvent new @@ -355,7 +359,7 @@ DSSpyInstrumenterTest >> simulatedMouseEventFor: morph [ stamp: 0 ] -{ #category : #helpers } +{ #category : 'helpers' } DSSpyInstrumenterTest >> stObjectContextModelMock [ | model context | @@ -370,11 +374,11 @@ DSSpyInstrumenterTest >> stObjectContextModelMock [ yourself ] -{ #category : #helpers } +{ #category : 'helpers' } DSSpyInstrumenterTest >> tableItemsListFromInspector: anInspector [ | ctxPresenter rawView attrTable widget | - anInspector buildWithSpec. + anInspector build. self setDummyWindowForPresenter: anInspector. ctxPresenter := anInspector firstPage rawInspectorPageOrNil retrievePresenter. @@ -382,13 +386,13 @@ DSSpyInstrumenterTest >> tableItemsListFromInspector: anInspector [ self setDummyWindowPresenter: anInspector window forPresenter: rawView. attrTable := rawView attributeTable. - attrTable buildWithSpec. + attrTable build. self setDummyWindowPresenter: anInspector window forPresenter: attrTable. widget := attrTable adapter widget. ^ widget dataSource rootItem children ] -{ #category : #running } +{ #category : 'running' } DSSpyInstrumenterTest >> tearDown [ (modifiedClass notNil and: [ @@ -411,7 +415,7 @@ DSSpyInstrumenterTest >> tearDown [ super tearDown ] -{ #category : #'tests - browsers' } +{ #category : 'tests - browsers' } DSSpyInstrumenterTest >> testInstrumentClyFullBrowser [ modifiedClass := ClyFullBrowserMorph. @@ -432,7 +436,7 @@ DSSpyInstrumenterTest >> testInstrumentClyFullBrowser [ self assert: record methodBrowsed equals: (Object>>#yourself) name ] -{ #category : #'tests - browsers' } +{ #category : 'tests - browsers' } DSSpyInstrumenterTest >> testInstrumentClyQueryBrowser [ modifiedClass := ClyQueryBrowserMorph. @@ -451,7 +455,7 @@ DSSpyInstrumenterTest >> testInstrumentClyQueryBrowser [ self assert: record queryName equals: browser systemQuery description ] -{ #category : #'tests - interactions' } +{ #category : 'tests - interactions' } DSSpyInstrumenterTest >> testInstrumentClyTextEditorPrintIt [ | clyEditor | @@ -469,7 +473,7 @@ DSSpyInstrumenterTest >> testInstrumentClyTextEditorPrintIt [ self assert: record selectedString equals: '41+1' ] -{ #category : #'tests - playground' } +{ #category : 'tests - playground' } DSSpyInstrumenterTest >> testInstrumentCodePresenter [ |playground code| modifiedClass := SpCodePresenter. @@ -495,7 +499,7 @@ DSSpyInstrumenterTest >> testInstrumentCodePresenter [ ] -{ #category : #'tests - debugger' } +{ #category : 'tests - debugger' } DSSpyInstrumenterTest >> testInstrumentDebuggerCode [ |code adapter| modifiedClass := SpCodePresenter. @@ -525,7 +529,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]. @@ -545,7 +549,7 @@ DSSpyInstrumenterTest >> testInstrumentDebuggerOpening [ ] -{ #category : #'tests - debugger' } +{ #category : 'tests - debugger' } DSSpyInstrumenterTest >> testInstrumentDebuggerStack [ |selectedItem| modifiedClass := StDebugger. @@ -584,29 +588,32 @@ 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 := StInspector onObject: object. - items := self tableItemsListFromInspector: inspector. + inspector := StInspectorPresenter 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. @@ -648,7 +655,7 @@ DSSpyInstrumenterTest >> testInstrumentHaltHits [ self assertHaltHitRecordingMethod: (self class >> #executeHaltWithMessage) conditional: false once: false. ] -{ #category : #'tests - halts' } +{ #category : 'tests - halts' } DSSpyInstrumenterTest >> testInstrumentHaltHitsInBlock [ |executedMethod| instrumenter instrumentHaltHits. @@ -673,67 +680,86 @@ 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 := StMetaBrowser. - modifiedMethodSource := (StMetaBrowser >> #methodsOf:) sourceCode. + + | metaPane object classes | + modifiedClass := StMetaBrowserPresenter. + modifiedMethodSource := (StMetaBrowserPresenter >> #methodsOf:) + sourceCode. instrumenter instrumentInspectMethodsOfClass. - + object := OrderedCollection new. - metaPane := StMetaBrowser basicNew. + metaPane := StMetaBrowserPresenter basicNew. self setDummyWindowForPresenter: metaPane. metaPane application: StPharoApplication current. metaPane setModelBeforeInitialization: object. - metaPane initialize. - classes := self metaPaneClassesItems: #classes FromInspector: metaPane. - + + metaPane initialize. + + classes := self + metaPaneClassesItems: #classes + FromInspector: metaPane. + classes selectPath: + (Array new: OrderedCollection allSuperclasses size + 1 withAll: 1). + 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| - modifiedClass := StMetaBrowser. - modifiedMethodSource := (StMetaBrowser >> #updateSourceWith:) sourceCode. + + | metaPane object methods classes | + modifiedClass := StMetaBrowserPresenter. + modifiedMethodSource := (StMetaBrowserPresenter >> #updateSourceWith:) + sourceCode. instrumenter instrumentInspectSourceOfMethod. - + object := OrderedCollection new. - metaPane := StMetaBrowser on: object. - methods := self metaPaneClassesItems: #methods FromInspector: metaPane. - + metaPane := StMetaBrowserPresenter on: object. + methods := self + metaPaneClassesItems: #methods + FromInspector: metaPane. + classes := self + metaPaneClassesItems: #classes + 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 := StInspector. - modifiedMethodSource := (StInspector >> #initializePresenters) sourceCode. + modifiedClass := StInspectorPresenter. + modifiedMethodSource := (StInspectorPresenter >> #initializePresenters) sourceCode. instrumenter instrumentInspectorOnObject. object := OrderedCollection new. @@ -749,34 +775,39 @@ 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| @@ -795,7 +826,7 @@ DSSpyInstrumenterTest >> testInstrumentMouseDownFTSelectableMorph [ self assert: record itemElement equals: (DSMouseEventRecord printStringMorphs: {morph}) ] -{ #category : #'tests - mouse events' } +{ #category : 'tests - mouse events' } DSSpyInstrumenterTest >> testInstrumentMouseEnterFTSelectableMorph [ |morph| @@ -814,7 +845,7 @@ DSSpyInstrumenterTest >> testInstrumentMouseEnterFTSelectableMorph [ self assert: record itemElement equals: (DSMouseEventRecord printStringMorphs: {morph}) ] -{ #category : #'tests - mouse events' } +{ #category : 'tests - mouse events' } DSSpyInstrumenterTest >> testInstrumentMouseEnterWindow [ |window| @@ -832,7 +863,7 @@ DSSpyInstrumenterTest >> testInstrumentMouseEnterWindow [ self assert: record itemElement equals: (DSMouseEventRecord printStringMorphs: {window}) ] -{ #category : #'tests - mouse events' } +{ #category : 'tests - mouse events' } DSSpyInstrumenterTest >> testInstrumentMouseLeaveWindow [ |window| @@ -850,15 +881,15 @@ DSSpyInstrumenterTest >> testInstrumentMouseLeaveWindow [ self assert: record itemElement equals: (DSMouseEventRecord printStringMorphs: {window}) ] -{ #category : #'tests - inspector' } +{ #category : 'tests - inspector' } DSSpyInstrumenterTest >> testInstrumentNavigateAttribute [ |raw object| - modifiedClass := StRawInspection. - modifiedMethodSource := (StRawInspection >> #setAttributeTable) sourceCode. + modifiedClass := StRawInspectionPresenter. + modifiedMethodSource := (StRawInspectionPresenter >> #setAttributeTable) sourceCode. instrumenter instrumentNavigateAttribute. object := OrderedCollection new. - raw := StRawInspection on: object. + raw := StRawInspectionPresenter on: object. self setDummyWindowForPresenter: raw. raw selectPath: #(2). @@ -871,25 +902,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 | @@ -917,7 +948,7 @@ DSSpyInstrumenterTest >> testInstrumentRubEditorCopySelection [ ensure: [ DSSpy recordClipboardContent: registerClipboardText ] ] -{ #category : #'tests - interactions' } +{ #category : 'tests - interactions' } DSSpyInstrumenterTest >> testInstrumentRubEditorDebugIt [ | rubEditor | @@ -937,7 +968,7 @@ DSSpyInstrumenterTest >> testInstrumentRubEditorDebugIt [ self assert: record selectedString equals: '41+1' printString ] -{ #category : #'tests - interactions' } +{ #category : 'tests - interactions' } DSSpyInstrumenterTest >> testInstrumentRubEditorDoIt [ | rubEditor | @@ -956,7 +987,7 @@ DSSpyInstrumenterTest >> testInstrumentRubEditorDoIt [ self assert: record selectedString equals: '41+1'printString ] -{ #category : #'tests - interactions' } +{ #category : 'tests - interactions' } DSSpyInstrumenterTest >> testInstrumentRubEditorPaste [ | rubEditor registerClipboardText | @@ -987,7 +1018,7 @@ DSSpyInstrumenterTest >> testInstrumentRubEditorPaste [ DSSpy recordClipboardContent: registerClipboardText ] ] -{ #category : #'tests - interactions' } +{ #category : 'tests - interactions' } DSSpyInstrumenterTest >> testInstrumentRubEditorPrintIt [ | rubEditor | @@ -1005,7 +1036,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. @@ -1015,7 +1046,7 @@ DSSpyInstrumenterTest >> testInstrumentRubScrollTextMorphHandleMouseOver [ self assert: (RubScrolledTextMorph new handlesMouseOver: nil) ] -{ #category : #'tests - mouse events' } +{ #category : 'tests - mouse events' } DSSpyInstrumenterTest >> testInstrumentRubScrollTextMorphMouseEnter [ |morph| @@ -1032,21 +1063,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 := Slider. - modifiedMethodSource := (Slider >> #dragging:) sourceCode. + modifiedClass := SliderMorph. + modifiedMethodSource := (SliderMorph >> #dragging:) sourceCode. instrumenter instrumentScrollingByDraggingSlider. - slider := Slider new. + slider := SliderMorph new. slider privateOwner: SystemWindow new. slider dragging: true. @@ -1062,15 +1093,15 @@ DSSpyInstrumenterTest >> testInstrumentScrollingByDraggingSlider [ self assert: record windowId equals: slider window hash. ] -{ #category : #'tests - mouse events' } +{ #category : 'tests - mouse events' } DSSpyInstrumenterTest >> testInstrumentScrollingInScrollPanesEvents [ |pane| - modifiedClass := GeneralScrollPane. - modifiedMethodSource := (GeneralScrollPane >> #mouseWheel:) sourceCode. + modifiedClass := GeneralScrollPaneMorph. + modifiedMethodSource := (GeneralScrollPaneMorph >> #mouseWheel:) sourceCode. instrumenter instrumentScrollingInScrollPanesEvents. - pane := GeneralScrollPane new. + pane := GeneralScrollPaneMorph new. pane privateOwner: SystemWindow new. pane mouseWheel: MouseWheelEvent new. @@ -1080,7 +1111,7 @@ DSSpyInstrumenterTest >> testInstrumentScrollingInScrollPanesEvents [ self assert: record windowId equals: pane window hash ] -{ #category : #'tests - mouse events' } +{ #category : 'tests - mouse events' } DSSpyInstrumenterTest >> testInstrumentScrollingInTablesEvents [ |table| @@ -1098,7 +1129,7 @@ DSSpyInstrumenterTest >> testInstrumentScrollingInTablesEvents [ self assert: record windowId equals: table window hash ] -{ #category : #'tests - interactions' } +{ #category : 'tests - interactions' } DSSpyInstrumenterTest >> testInstrumentSpCodeDebugIt [ | codePresenter debugItCommand | @@ -1121,7 +1152,7 @@ DSSpyInstrumenterTest >> testInstrumentSpCodeDebugIt [ self assert: record selectedString equals: '41+1' ] -{ #category : #'tests - interactions' } +{ #category : 'tests - interactions' } DSSpyInstrumenterTest >> testInstrumentSpCodeDoIt [ | codePresenter printItCommand | @@ -1143,7 +1174,7 @@ DSSpyInstrumenterTest >> testInstrumentSpCodeDoIt [ self assert: record selectedString equals: '41+1' ] -{ #category : #'tests - interactions' } +{ #category : 'tests - interactions' } DSSpyInstrumenterTest >> testInstrumentSpCodeDoItAndGoForInspector [ | presenter | @@ -1166,7 +1197,7 @@ DSSpyInstrumenterTest >> testInstrumentSpCodeDoItAndGoForInspector [ self assert: record selectedString equals: '4+2' ] -{ #category : #'tests - interactions' } +{ #category : 'tests - interactions' } DSSpyInstrumenterTest >> testInstrumentSpCodeDoItAndGoForPlayground [ | presenter | @@ -1190,7 +1221,7 @@ DSSpyInstrumenterTest >> testInstrumentSpCodeDoItAndGoForPlayground [ self assert: record selectedString equals: '4+2' ] -{ #category : #'tests - interactions' } +{ #category : 'tests - interactions' } DSSpyInstrumenterTest >> testInstrumentSpCodePrintIt [ | codePresenter printItCommand | @@ -1210,13 +1241,13 @@ DSSpyInstrumenterTest >> testInstrumentSpCodePrintIt [ self assert: record selectedString equals: '41+1' ] -{ #category : #'tests - playground' } +{ #category : 'tests - playground' } DSSpyInstrumenterTest >> testInstrumentStPlayground [ |playground| - modifiedClass := StPlayground. - modifiedMethodSource := (StPlayground class >> #open) sourceCode. + modifiedClass := StPlaygroundPresenter class. + modifiedMethodSource := (StPlaygroundPresenter class >> #open) sourceCode. instrumenter instrumentPlaygroundCode. - playground := StPlayground open. + playground := StPlaygroundPresenter open. "On opening, the playground generates an opening record" self assert: self registry size equals: 1. @@ -1225,55 +1256,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 b031d15..e632e07 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,10 +12,11 @@ Class { 'survey', 'recordSourceCode' ], - #category : #'DebuggingSpy-Tests' + #category : 'DebuggingSpy-Tests', + #package : 'DebuggingSpy-Tests' } -{ #category : #assertions } +{ #category : 'assertions' } DSSpyTest >> assertBreakpointRecordedAs: aDSRecordClass forBreakpointEvent: aBreakpointEventClass target: aTarget [ self assert: record class equals: aDSRecordClass. @@ -28,19 +29,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 @@ -48,7 +49,7 @@ DSSpyTest >> assertMethodSourceCodeNotRecorded [ equals: DSSpy recordSourceCodeDisabledErrorMessage ] -{ #category : #assertions } +{ #category : 'assertions' } DSSpyTest >> assertMethodSourceCodeRecorded [ self @@ -56,7 +57,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. @@ -70,55 +71,53 @@ 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; - always. + breakpoint := Breakpoint new node: self breakpointedMethod ast. breakpoint install ] -{ #category : #helpers } +{ #category : 'helpers' } DSSpyTest >> installVariableBreakpoint [ breakpoint := VariableBreakpoint @@ -126,7 +125,7 @@ DSSpyTest >> installVariableBreakpoint [ inClass: self breakpointedMethod ] -{ #category : #helpers } +{ #category : 'helpers' } DSSpyTest >> methodEvent [ ^ methodEvent ifNil: [ @@ -135,7 +134,7 @@ DSSpyTest >> methodEvent [ yourself ] ] -{ #category : #helpers } +{ #category : 'helpers' } DSSpyTest >> methodModifiedEvent [ ^ methodEvent ifNil: [ @@ -145,47 +144,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. @@ -199,7 +198,7 @@ DSSpyTest >> setUp [ DSSpy scopeSourceCodeChangesRecording: true ] -{ #category : #running } +{ #category : 'running' } DSSpyTest >> tearDown [ DSRecordRegistry autoSerialize: false. instrumenter unsubscribeFromSystemAnnouncer. @@ -212,7 +211,7 @@ DSSpyTest >> tearDown [ super tearDown ] -{ #category : #'tests - breakpoints events' } +{ #category : 'tests - breakpoints events' } DSSpyTest >> testBreakpointAdded [ instrumenter listenToBreakpointChanges. @@ -227,7 +226,7 @@ DSSpyTest >> testBreakpointAdded [ target: nil ] -{ #category : #'tests - breakpoints events' } +{ #category : 'tests - breakpoints events' } DSSpyTest >> testBreakpointHit [ self installBreakpoint. @@ -244,7 +243,7 @@ DSSpyTest >> testBreakpointHit [ ] -{ #category : #'tests - breakpoints events' } +{ #category : 'tests - breakpoints events' } DSSpyTest >> testBreakpointRemoved [ self installBreakpoint. @@ -260,7 +259,7 @@ DSSpyTest >> testBreakpointRemoved [ target: nil ] -{ #category : #'tests - task management' } +{ #category : 'tests - task management' } DSSpyTest >> testCloseSurvey [ |taskLoggingFileName recordedSurvey| @@ -296,13 +295,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. @@ -313,7 +312,7 @@ DSSpyTest >> testEndTask [ self assert: record answer equals: DSTask dsTaskDescription ] -{ #category : #'tests - halts events' } +{ #category : 'tests - halts events' } DSSpyTest >> testIndexesOfHaltNodesIn [ | haltData realHaltNode | @@ -325,7 +324,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. @@ -334,7 +333,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. @@ -342,7 +341,7 @@ DSSpyTest >> testLogKey [ self assert: record event equals: #TEST ] -{ #category : #'tests - logging' } +{ #category : 'tests - logging' } DSSpyTest >> testLogOnlyWhenTaskStarted [ |str dir| dir := DSSpy logger loggingDirectory. @@ -367,7 +366,7 @@ DSSpyTest >> testLogOnlyWhenTaskStarted [ ] -{ #category : #'tests - window events' } +{ #category : 'tests - window events' } DSSpyTest >> testLogWindowActivated [ DSSpy logWindowActivated: self windowEvent. @@ -377,7 +376,7 @@ DSSpyTest >> testLogWindowActivated [ self assertWindowEventRecordedAs: DSWindowActivatedRecord ] -{ #category : #'tests - window events' } +{ #category : 'tests - window events' } DSSpyTest >> testLogWindowClosed [ DSSpy logWindowClosed: self windowEvent. @@ -388,7 +387,7 @@ DSSpyTest >> testLogWindowClosed [ self assertWindowEventRecordedAs: DSWindowClosedRecord ] -{ #category : #'tests - window events' } +{ #category : 'tests - window events' } DSSpyTest >> testLogWindowOpened [ DSSpy logWindowOpened: self windowEvent. @@ -399,7 +398,7 @@ DSSpyTest >> testLogWindowOpened [ self assertWindowEventRecordedAs: DSWindowOpenedRecord ] -{ #category : #'tests - serialize/materialize' } +{ #category : 'tests - serialize/materialize' } DSSpyTest >> testMaterialize [ |records materializedRecords| DSSpy logger loggingFileReference ensureDelete. @@ -420,7 +419,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. @@ -431,7 +430,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. @@ -441,7 +440,7 @@ DSSpyTest >> testMethodAddedNoSourceCode [ self assertMethodSourceCodeNotRecorded ] -{ #category : #'tests - methods events' } +{ #category : 'tests - methods events' } DSSpyTest >> testMethodChanged [ DSSpy recordSourceCode: true. @@ -453,7 +452,7 @@ DSSpyTest >> testMethodChanged [ self assertMethodSourceCodeRecorded ] -{ #category : #'tests - methods events' } +{ #category : 'tests - methods events' } DSSpyTest >> testMethodChangedNoSourceCode [ DSSpy methodChanged: self methodModifiedEvent. @@ -464,7 +463,7 @@ DSSpyTest >> testMethodChangedNoSourceCode [ self assertMethodSourceCodeNotRecorded ] -{ #category : #'tests - methods events' } +{ #category : 'tests - methods events' } DSSpyTest >> testMethodEventsInstrumentation [ |method| @@ -486,7 +485,7 @@ DSSpyTest >> testMethodEventsInstrumentation [ self assertMethodEventRecordedAs: DSMethodRemovedRecord for: method ] -{ #category : #'tests - methods events' } +{ #category : 'tests - methods events' } DSSpyTest >> testMethodRemoved [ DSSpy recordSourceCode: true. @@ -498,7 +497,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. @@ -508,7 +507,7 @@ DSSpyTest >> testMethodRemovedNoSourceCode [ self assertMethodSourceCodeNotRecorded ] -{ #category : #'tests - methods events' } +{ #category : 'tests - methods events' } DSSpyTest >> testMonitorPackageForSourceCodeChanges [ DSSpy monitorPackageForSourceCodeChanges: self class package name. @@ -524,7 +523,7 @@ DSSpyTest >> testMonitorPackageForSourceCodeChanges [ self assert: (DSSpy packagesMonitoredForSourceCodeChanges includes: self class package name). ] -{ #category : #'tests - breakpoints events' } +{ #category : 'tests - breakpoints events' } DSSpyTest >> testObjectCentricBreakpointRecord [ |target| @@ -557,7 +556,7 @@ DSSpyTest >> testObjectCentricBreakpointRecord [ target: (DSAbstractBreakpointEventRecord basicNew printTargetInstance: target). ] -{ #category : #'tests - breakpoints events' } +{ #category : 'tests - breakpoints events' } DSSpyTest >> testObjectCentricVariableBreakpointRecord [ | target | @@ -601,13 +600,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. @@ -629,7 +628,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 | @@ -663,7 +662,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 | @@ -688,7 +687,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| @@ -714,7 +713,7 @@ DSSpyTest >> testRecordMethodChangesSourceCode [ self assert: record newSource equals: method sourceCode ] -{ #category : #'tests - methods events' } +{ #category : 'tests - methods events' } DSSpyTest >> testRecordMethodChangesSourceCodeActivated [ DSSpy methodChanged: self methodModifiedEvent. @@ -723,7 +722,7 @@ DSSpyTest >> testRecordMethodChangesSourceCodeActivated [ self deny: record class identicalTo: DSSourceCodeChangeEventRecord ] -{ #category : #'tests - methods events' } +{ #category : 'tests - methods events' } DSSpyTest >> testRecordMethodChangesSourceCodeNotScoped [ DSSpy scopeSourceCodeChangesRecording: false. @@ -734,7 +733,7 @@ DSSpyTest >> testRecordMethodChangesSourceCodeNotScoped [ self assert: record class identicalTo: DSSourceCodeChangeEventRecord ] -{ #category : #'tests - halts events' } +{ #category : 'tests - halts events' } DSSpyTest >> testRecordRemoveHaltInMethodmodified [ | haltData realHaltNode | self compileNewMethodWithHalt. @@ -758,7 +757,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| @@ -779,13 +778,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. @@ -796,13 +795,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. @@ -814,7 +813,7 @@ DSSpyTest >> testSerialize [ equals: '[' , (STON toString: record) , ']' ] -{ #category : #'tests - task management' } +{ #category : 'tests - task management' } DSSpyTest >> testStartTask [ DSSpy startTask: task. @@ -825,7 +824,7 @@ DSSpyTest >> testStartTask [ self assert: record description equals: DSTask dsTaskDescription ] -{ #category : #'tests - task management' } +{ #category : 'tests - task management' } DSSpyTest >> testStartTaskSerialization [ | recordedTask | @@ -838,7 +837,7 @@ DSSpyTest >> testStartTaskSerialization [ self assert: recordedTask taskName equals: task title ] -{ #category : #'tests - task management' } +{ #category : 'tests - task management' } DSSpyTest >> testTaskStarted [ self deny: DSSpy taskStarted. @@ -848,7 +847,7 @@ DSSpyTest >> testTaskStarted [ self deny: DSSpy taskStarted ] -{ #category : #'tests - breakpoints events' } +{ #category : 'tests - breakpoints events' } DSSpyTest >> testVariableBreakpointAdded [ instrumenter listenToBreakpointChanges. @@ -863,7 +862,7 @@ DSSpyTest >> testVariableBreakpointAdded [ ] -{ #category : #'tests - breakpoints events' } +{ #category : 'tests - breakpoints events' } DSSpyTest >> testVariableBreakpointAddedToMultipleVariables [ instrumenter listenToBreakpointChanges. @@ -879,7 +878,7 @@ DSSpyTest >> testVariableBreakpointAddedToMultipleVariables [ (DSTestClassWithInstanceVariables allSlots collect: [ :s | s name ]) ] -{ #category : #'tests - breakpoints events' } +{ #category : 'tests - breakpoints events' } DSSpyTest >> testVariableBreakpointHit [ self installVariableBreakpoint. @@ -895,7 +894,7 @@ DSSpyTest >> testVariableBreakpointHit [ target: nil ] -{ #category : #'tests - breakpoints events' } +{ #category : 'tests - breakpoints events' } DSSpyTest >> testVariableBreakpointRemoved [ self installVariableBreakpoint. @@ -911,7 +910,7 @@ DSSpyTest >> testVariableBreakpointRemoved [ target: nil ] -{ #category : #'tests - window events' } +{ #category : 'tests - window events' } DSSpyTest >> testWindowOpenedListensToWindowActivatedAndClosedEvents [ DSSpy logWindowOpened: self windowEvent. @@ -931,7 +930,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 f2c235e..bbabb12 100644 --- a/DebuggingSpy-Tests/DSSurvey.class.st +++ b/DebuggingSpy-Tests/DSSurvey.class.st @@ -2,50 +2,51 @@ 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' + #category : 'DebuggingSpy-Tests', + #package : '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 bd12915..497b457 100644 --- a/DebuggingSpy-Tests/DSTask.class.st +++ b/DebuggingSpy-Tests/DSTask.class.st @@ -2,44 +2,45 @@ I simulate a task that can be managed through DSSpy. " Class { - #name : #DSTask, - #superclass : #Object, + #name : 'DSTask', + #superclass : 'Object', #instVars : [ 'answer' ], - #category : #'DebuggingSpy-Tests' + #category : 'DebuggingSpy-Tests', + #package : '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 7f7bec2..f11bb11 100644 --- a/DebuggingSpy-Tests/DSTestClassWithInstanceVariables.class.st +++ b/DebuggingSpy-Tests/DSTestClassWithInstanceVariables.class.st @@ -2,60 +2,61 @@ 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' + #category : 'DebuggingSpy-Tests', + #package : '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 c02039d..d51b681 100644 --- a/DebuggingSpy-Tests/DSTestRecord.class.st +++ b/DebuggingSpy-Tests/DSTestRecord.class.st @@ -2,12 +2,13 @@ I am an event record class to test ds records mechanics. " Class { - #name : #DSTestRecord, - #superclass : #DSAbstractEventRecord, - #category : #'DebuggingSpy-Tests' + #name : 'DSTestRecord', + #superclass : 'DSAbstractEventRecord', + #category : 'DebuggingSpy-Tests', + #package : 'DebuggingSpy-Tests' } -{ #category : #accessing } +{ #category : 'accessing' } DSTestRecord >> eventName [ ^'test' ] diff --git a/DebuggingSpy-Tests/NewValueHolderForTestWithDummyPlaygroundPage.class.st b/DebuggingSpy-Tests/NewValueHolderForTestWithDummyPlaygroundPage.class.st new file mode 100644 index 0000000..401dc64 --- /dev/null +++ b/DebuggingSpy-Tests/NewValueHolderForTestWithDummyPlaygroundPage.class.st @@ -0,0 +1,13 @@ +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 4bace44..0e92329 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 new file mode 100644 index 0000000..d114c70 --- /dev/null +++ b/DebuggingSpy-Tests/SpWindowPresenter.extension.st @@ -0,0 +1,9 @@ +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 526a735..a525a41 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 3d6d036..6d1a33d 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 a6ec505..2d64f47 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 18f18ce..a78d41c 100644 --- a/DebuggingSpy/DSAbstractBreakpointEventRecord.class.st +++ b/DebuggingSpy/DSAbstractBreakpointEventRecord.class.st @@ -3,34 +3,36 @@ 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' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : '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 | @@ -43,20 +45,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 oneShot + once := aBreakpointEvent breakpoint once ] -{ #category : #accessing } +{ #category : 'accessing' } DSAbstractBreakpointEventRecord >> target [ ^ target diff --git a/DebuggingSpy/DSAbstractEventRecord.class.st b/DebuggingSpy/DSAbstractEventRecord.class.st index 2d77d3e..7f56cdc 100644 --- a/DebuggingSpy/DSAbstractEventRecord.class.st +++ b/DebuggingSpy/DSAbstractEventRecord.class.st @@ -2,17 +2,19 @@ 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' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } DSAbstractEventRecord class >> for: anObject [ | rec | @@ -21,7 +23,7 @@ DSAbstractEventRecord class >> for: anObject [ ^ rec ] -{ #category : #printing } +{ #category : 'printing' } DSAbstractEventRecord class >> printStringMorphs: anArrayOfMorphs [ | str | @@ -33,77 +35,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 f005a12..c58ca8f 100644 --- a/DebuggingSpy/DSAbstractHaltRecord.class.st +++ b/DebuggingSpy/DSAbstractHaltRecord.class.st @@ -2,28 +2,30 @@ 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' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : '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 ee6e01a..7d20053 100644 --- a/DebuggingSpy/DSAbstractTaskRecord.class.st +++ b/DebuggingSpy/DSAbstractTaskRecord.class.st @@ -5,26 +5,28 @@ 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' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : '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 a5b6444..3f449ca 100644 --- a/DebuggingSpy/DSBreakpointEventRecord.class.st +++ b/DebuggingSpy/DSBreakpointEventRecord.class.st @@ -2,28 +2,30 @@ I record breakpoint events information. " Class { - #name : #DSBreakpointEventRecord, - #superclass : #DSAbstractBreakpointEventRecord, + #name : 'DSBreakpointEventRecord', + #superclass : 'DSAbstractBreakpointEventRecord', #instVars : [ 'method', 'node' ], - #category : #'DebuggingSpy-Records' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : '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 00e6c63..4d099ae 100644 --- a/DebuggingSpy/DSBrowseContextRecord.class.st +++ b/DebuggingSpy/DSBrowseContextRecord.class.st @@ -4,33 +4,35 @@ 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' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : '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. @@ -39,13 +41,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 3fdabbe..6b3f0fb 100644 --- a/DebuggingSpy/DSClipboardActionRecord.class.st +++ b/DebuggingSpy/DSClipboardActionRecord.class.st @@ -4,40 +4,42 @@ 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' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : '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 ce863a5..4196313 100644 --- a/DebuggingSpy/DSClipboardCopyRecord.class.st +++ b/DebuggingSpy/DSClipboardCopyRecord.class.st @@ -1,10 +1,12 @@ Class { - #name : #DSClipboardCopyRecord, - #superclass : #DSClipboardActionRecord, - #category : #'DebuggingSpy-Records' + #name : 'DSClipboardCopyRecord', + #superclass : 'DSClipboardActionRecord', + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #accessing } +{ #category : 'accessing' } DSClipboardCopyRecord >> eventName [ ^ 'Clipboard Copy' diff --git a/DebuggingSpy/DSClipboardPasteRecord.class.st b/DebuggingSpy/DSClipboardPasteRecord.class.st index fb192a3..8a53497 100644 --- a/DebuggingSpy/DSClipboardPasteRecord.class.st +++ b/DebuggingSpy/DSClipboardPasteRecord.class.st @@ -1,10 +1,12 @@ Class { - #name : #DSClipboardPasteRecord, - #superclass : #DSClipboardActionRecord, - #category : #'DebuggingSpy-Records' + #name : 'DSClipboardPasteRecord', + #superclass : 'DSClipboardActionRecord', + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #accessing } +{ #category : 'accessing' } DSClipboardPasteRecord >> eventName [ ^ 'Clipboard Paste' diff --git a/DebuggingSpy/DSCodeActionRecord.class.st b/DebuggingSpy/DSCodeActionRecord.class.st index c2e3603..56a4ef7 100644 --- a/DebuggingSpy/DSCodeActionRecord.class.st +++ b/DebuggingSpy/DSCodeActionRecord.class.st @@ -3,15 +3,17 @@ 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' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #'actions api' } +{ #category : 'actions api' } DSCodeActionRecord >> record: aCodeString [ selectedString := DSSpy recordSourceCode @@ -20,13 +22,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 99970cb..4c52909 100644 --- a/DebuggingSpy/DSDebugItRecord.class.st +++ b/DebuggingSpy/DSDebugItRecord.class.st @@ -2,12 +2,14 @@ I record when the user selects code and debugs it. " Class { - #name : #DSDebugItRecord, - #superclass : #DSCodeActionRecord, - #category : #'DebuggingSpy-Records' + #name : 'DSDebugItRecord', + #superclass : 'DSCodeActionRecord', + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #accessing } +{ #category : 'accessing' } DSDebugItRecord >> eventName [ ^'Debug it' ] diff --git a/DebuggingSpy/DSDebuggerActionRecord.class.st b/DebuggingSpy/DSDebuggerActionRecord.class.st index 8733cca..fcc6566 100644 --- a/DebuggingSpy/DSDebuggerActionRecord.class.st +++ b/DebuggingSpy/DSDebuggerActionRecord.class.st @@ -3,15 +3,17 @@ 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' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #'tests - instance creation' } +{ #category : 'tests - instance creation' } DSDebuggerActionRecord class >> into: aContext [ ^ (self for: aContext) @@ -19,7 +21,7 @@ DSDebuggerActionRecord class >> into: aContext [ yourself ] -{ #category : #'tests - instance creation' } +{ #category : 'tests - instance creation' } DSDebuggerActionRecord class >> over: aContext [ ^ (self for: aContext) @@ -27,7 +29,7 @@ DSDebuggerActionRecord class >> over: aContext [ yourself ] -{ #category : #'tests - instance creation' } +{ #category : 'tests - instance creation' } DSDebuggerActionRecord class >> proceed: aContext [ ^ (self for: aContext) @@ -35,7 +37,7 @@ DSDebuggerActionRecord class >> proceed: aContext [ yourself ] -{ #category : #'tests - instance creation' } +{ #category : 'tests - instance creation' } DSDebuggerActionRecord class >> restart: aContext [ ^ (self for: aContext) @@ -43,7 +45,7 @@ DSDebuggerActionRecord class >> restart: aContext [ yourself ] -{ #category : #'tests - instance creation' } +{ #category : 'tests - instance creation' } DSDebuggerActionRecord class >> return: aContext [ ^ (self for: aContext) @@ -51,7 +53,7 @@ DSDebuggerActionRecord class >> return: aContext [ yourself ] -{ #category : #'tests - instance creation' } +{ #category : 'tests - instance creation' } DSDebuggerActionRecord class >> runTo: aContext [ ^ (self for: aContext) @@ -59,7 +61,7 @@ DSDebuggerActionRecord class >> runTo: aContext [ yourself ] -{ #category : #'tests - instance creation' } +{ #category : 'tests - instance creation' } DSDebuggerActionRecord class >> through: aContext [ ^ (self for: aContext) @@ -67,18 +69,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 66b9a83..4e0d29c 100644 --- a/DebuggingSpy/DSDebuggerOpeningRecord.class.st +++ b/DebuggingSpy/DSDebuggerOpeningRecord.class.st @@ -2,32 +2,34 @@ I am generated when a debugger is opened. " Class { - #name : #DSDebuggerOpeningRecord, - #superclass : #DSDebuggerRecord, + #name : 'DSDebuggerOpeningRecord', + #superclass : 'DSDebuggerRecord', #instVars : [ 'debuggerId' ], - #category : #'DebuggingSpy-Records' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : '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 465702d..ee6c1d1 100644 --- a/DebuggingSpy/DSDebuggerRecord.class.st +++ b/DebuggingSpy/DSDebuggerRecord.class.st @@ -3,29 +3,31 @@ 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' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : '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. @@ -37,25 +39,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 38e34fc..b819680 100644 --- a/DebuggingSpy/DSDoItAndGoRecord.class.st +++ b/DebuggingSpy/DSDoItAndGoRecord.class.st @@ -2,12 +2,14 @@ I record when the user selects code, executes it and inspect the result immediately. " Class { - #name : #DSDoItAndGoRecord, - #superclass : #DSDoItRecord, - #category : #'DebuggingSpy-Records' + #name : 'DSDoItAndGoRecord', + #superclass : 'DSDoItRecord', + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #accessing } +{ #category : 'accessing' } DSDoItAndGoRecord >> eventName [ ^'Do it and Go' ] diff --git a/DebuggingSpy/DSDoItRecord.class.st b/DebuggingSpy/DSDoItRecord.class.st index 0f28462..4d2a4b0 100644 --- a/DebuggingSpy/DSDoItRecord.class.st +++ b/DebuggingSpy/DSDoItRecord.class.st @@ -2,12 +2,14 @@ I record when the user selects code and debugs it. " Class { - #name : #DSDoItRecord, - #superclass : #DSCodeActionRecord, - #category : #'DebuggingSpy-Records' + #name : 'DSDoItRecord', + #superclass : 'DSCodeActionRecord', + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #accessing } +{ #category : 'accessing' } DSDoItRecord >> eventName [ ^'Do it' ] diff --git a/DebuggingSpy/DSEndingTaskRecord.class.st b/DebuggingSpy/DSEndingTaskRecord.class.st index e4de7d0..49321ad 100644 --- a/DebuggingSpy/DSEndingTaskRecord.class.st +++ b/DebuggingSpy/DSEndingTaskRecord.class.st @@ -4,17 +4,19 @@ Tasks are object that should answer to `#name`, `#description` and `#answer`, al " Class { - #name : #DSEndingTaskRecord, - #superclass : #DSAbstractTaskRecord, - #category : #'DebuggingSpy-Records' + #name : 'DSEndingTaskRecord', + #superclass : 'DSAbstractTaskRecord', + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : '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 ac43c75..bfe6bde 100644 --- a/DebuggingSpy/DSExpandAttributeRecord.class.st +++ b/DebuggingSpy/DSExpandAttributeRecord.class.st @@ -2,12 +2,14 @@ I record the inspection of an inspected object's attribute through expanding inspector trees " Class { - #name : #DSExpandAttributeRecord, - #superclass : #DSInspectAttributeRecord, - #category : #'DebuggingSpy-Records' + #name : 'DSExpandAttributeRecord', + #superclass : 'DSInspectAttributeRecord', + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : '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 9e12ebd..3fbdb8b 100644 --- a/DebuggingSpy/DSFullBrowseRecord.class.st +++ b/DebuggingSpy/DSFullBrowseRecord.class.st @@ -7,58 +7,60 @@ 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' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : '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 ca64943..3619b93 100644 --- a/DebuggingSpy/DSHaltChangeRecord.class.st +++ b/DebuggingSpy/DSHaltChangeRecord.class.st @@ -2,59 +2,61 @@ 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' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : '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 d3640d1..9abfcad 100644 --- a/DebuggingSpy/DSHaltHitRecord.class.st +++ b/DebuggingSpy/DSHaltHitRecord.class.st @@ -2,34 +2,36 @@ I record a halt hitting at run time. " Class { - #name : #DSHaltHitRecord, - #superclass : #DSAbstractHaltRecord, + #name : 'DSHaltHitRecord', + #superclass : 'DSAbstractHaltRecord', #instVars : [ 'once', 'conditional', 'selector' ], - #category : #'DebuggingSpy-Records' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : '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. @@ -40,7 +42,7 @@ DSHaltHitRecord >> record: anRBProgramNodeAndASelector [ ] -{ #category : #accessing } +{ #category : 'accessing' } DSHaltHitRecord >> selector [ ^ selector diff --git a/DebuggingSpy/DSInspectAttributeRecord.class.st b/DebuggingSpy/DSInspectAttributeRecord.class.st index 5b93708..d37db54 100644 --- a/DebuggingSpy/DSInspectAttributeRecord.class.st +++ b/DebuggingSpy/DSInspectAttributeRecord.class.st @@ -2,58 +2,60 @@ 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' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : '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 9c59d93..63fd86c 100644 --- a/DebuggingSpy/DSInspectMethodSourceRecord.class.st +++ b/DebuggingSpy/DSInspectMethodSourceRecord.class.st @@ -2,15 +2,17 @@ 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' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #'actions api' } +{ #category : 'actions api' } DSInspectMethodSourceRecord >> record: inspectedObjectWithSelectedClassWithSelectedMethodWithWindow [ super record: { @@ -20,13 +22,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 1663d72..3ff9a07 100644 --- a/DebuggingSpy/DSInspectMethodsRecord.class.st +++ b/DebuggingSpy/DSInspectMethodsRecord.class.st @@ -2,20 +2,22 @@ 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' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #accessing } +{ #category : 'accessing' } DSInspectMethodsRecord >> eventName [ ^'Inspect methods' ] -{ #category : #'actions api' } +{ #category : 'actions api' } DSInspectMethodsRecord >> record: inspectedObjectWithSelectedClassWithWindow [ super record: { @@ -24,13 +26,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 0d8cb18..b025b13 100644 --- a/DebuggingSpy/DSInspectObjectRecord.class.st +++ b/DebuggingSpy/DSInspectObjectRecord.class.st @@ -2,12 +2,14 @@ I record the opening of an inspector on an object " Class { - #name : #DSInspectObjectRecord, - #superclass : #DSInspectorRecord, - #category : #'DebuggingSpy-Records' + #name : 'DSInspectObjectRecord', + #superclass : 'DSInspectorRecord', + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #accessing } +{ #category : 'accessing' } DSInspectObjectRecord >> eventName [ ^'Inspect object' ] diff --git a/DebuggingSpy/DSInspectorRecord.class.st b/DebuggingSpy/DSInspectorRecord.class.st index e46d488..c68c07b 100644 --- a/DebuggingSpy/DSInspectorRecord.class.st +++ b/DebuggingSpy/DSInspectorRecord.class.st @@ -2,40 +2,42 @@ 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' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : '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 2c131e0..3bbe719 100644 --- a/DebuggingSpy/DSLoggingErrorRecord.class.st +++ b/DebuggingSpy/DSLoggingErrorRecord.class.st @@ -2,26 +2,28 @@ 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' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : '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 d0fda25..5779389 100644 --- a/DebuggingSpy/DSMethodAddedRecord.class.st +++ b/DebuggingSpy/DSMethodAddedRecord.class.st @@ -2,12 +2,14 @@ I record when a method is added. " Class { - #name : #DSMethodAddedRecord, - #superclass : #DSMethodEventRecord, - #category : #'DebuggingSpy-Records' + #name : 'DSMethodAddedRecord', + #superclass : 'DSMethodEventRecord', + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #accessing } +{ #category : 'accessing' } DSMethodAddedRecord >> eventName [ ^'Method added' ] diff --git a/DebuggingSpy/DSMethodEventRecord.class.st b/DebuggingSpy/DSMethodEventRecord.class.st index cb9f5e3..1db38c9 100644 --- a/DebuggingSpy/DSMethodEventRecord.class.st +++ b/DebuggingSpy/DSMethodEventRecord.class.st @@ -3,16 +3,18 @@ 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' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } DSMethodEventRecord class >> added: aMethod [ ^ (self for: aMethod) @@ -20,7 +22,7 @@ DSMethodEventRecord class >> added: aMethod [ yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } DSMethodEventRecord class >> modified: aMethod [ ^ (self for: aMethod) @@ -28,7 +30,7 @@ DSMethodEventRecord class >> modified: aMethod [ yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } DSMethodEventRecord class >> removed: aMethod [ ^ (self for: aMethod) @@ -36,31 +38,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 c942920..35c452f 100644 --- a/DebuggingSpy/DSMethodModifiedRecord.class.st +++ b/DebuggingSpy/DSMethodModifiedRecord.class.st @@ -2,12 +2,14 @@ I record when a method is modified. " Class { - #name : #DSMethodModifiedRecord, - #superclass : #DSMethodEventRecord, - #category : #'DebuggingSpy-Records' + #name : 'DSMethodModifiedRecord', + #superclass : 'DSMethodEventRecord', + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #accessing } +{ #category : 'accessing' } DSMethodModifiedRecord >> eventName [ ^ 'Method modified' diff --git a/DebuggingSpy/DSMethodRemovedRecord.class.st b/DebuggingSpy/DSMethodRemovedRecord.class.st index a96df85..d85bbc2 100644 --- a/DebuggingSpy/DSMethodRemovedRecord.class.st +++ b/DebuggingSpy/DSMethodRemovedRecord.class.st @@ -2,12 +2,14 @@ I record when a method is removed. " Class { - #name : #DSMethodRemovedRecord, - #superclass : #DSMethodEventRecord, - #category : #'DebuggingSpy-Records' + #name : 'DSMethodRemovedRecord', + #superclass : 'DSMethodEventRecord', + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #accessing } +{ #category : 'accessing' } DSMethodRemovedRecord >> eventName [ ^ 'Method removed' diff --git a/DebuggingSpy/DSMouseDownTableItemRecord.class.st b/DebuggingSpy/DSMouseDownTableItemRecord.class.st index 241f068..49676ee 100644 --- a/DebuggingSpy/DSMouseDownTableItemRecord.class.st +++ b/DebuggingSpy/DSMouseDownTableItemRecord.class.st @@ -2,12 +2,14 @@ This record is generated when the mouse clicks an item in a table. " Class { - #name : #DSMouseDownTableItemRecord, - #superclass : #DSMouseEventRecord, - #category : #'DebuggingSpy-Records' + #name : 'DSMouseDownTableItemRecord', + #superclass : 'DSMouseEventRecord', + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #accessing } +{ #category : 'accessing' } DSMouseDownTableItemRecord >> eventName [ ^'Click on table item' ] diff --git a/DebuggingSpy/DSMouseEnterTableItemRecord.class.st b/DebuggingSpy/DSMouseEnterTableItemRecord.class.st index 93490e9..fa49c1e 100644 --- a/DebuggingSpy/DSMouseEnterTableItemRecord.class.st +++ b/DebuggingSpy/DSMouseEnterTableItemRecord.class.st @@ -2,12 +2,14 @@ This record is generated when the mouse enters an item in a table. " Class { - #name : #DSMouseEnterTableItemRecord, - #superclass : #DSMouseEventRecord, - #category : #'DebuggingSpy-Records' + #name : 'DSMouseEnterTableItemRecord', + #superclass : 'DSMouseEventRecord', + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #accessing } +{ #category : 'accessing' } DSMouseEnterTableItemRecord >> eventName [ ^'Mouse on table item' ] diff --git a/DebuggingSpy/DSMouseEnterTextEditorRecord.class.st b/DebuggingSpy/DSMouseEnterTextEditorRecord.class.st index fc99457..d1eac25 100644 --- a/DebuggingSpy/DSMouseEnterTextEditorRecord.class.st +++ b/DebuggingSpy/DSMouseEnterTextEditorRecord.class.st @@ -2,12 +2,14 @@ This record is generated when the mouse enters an item in a text editor. " Class { - #name : #DSMouseEnterTextEditorRecord, - #superclass : #DSMouseEventRecord, - #category : #'DebuggingSpy-Records' + #name : 'DSMouseEnterTextEditorRecord', + #superclass : 'DSMouseEventRecord', + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #accessing } +{ #category : 'accessing' } DSMouseEnterTextEditorRecord >> eventName [ ^'Mouse on text editor' ] diff --git a/DebuggingSpy/DSMouseEnterWindowRecord.class.st b/DebuggingSpy/DSMouseEnterWindowRecord.class.st index 4b10ffa..e44ec43 100644 --- a/DebuggingSpy/DSMouseEnterWindowRecord.class.st +++ b/DebuggingSpy/DSMouseEnterWindowRecord.class.st @@ -2,12 +2,14 @@ This record is generated when the mouse enters a window (with or without focus). " Class { - #name : #DSMouseEnterWindowRecord, - #superclass : #DSMouseEventRecord, - #category : #'DebuggingSpy-Records' + #name : 'DSMouseEnterWindowRecord', + #superclass : 'DSMouseEventRecord', + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #accessing } +{ #category : 'accessing' } DSMouseEnterWindowRecord >> eventName [ ^'Enter window' ] diff --git a/DebuggingSpy/DSMouseEventRecord.class.st b/DebuggingSpy/DSMouseEventRecord.class.st index dec2875..3f3f67a 100644 --- a/DebuggingSpy/DSMouseEventRecord.class.st +++ b/DebuggingSpy/DSMouseEventRecord.class.st @@ -6,27 +6,29 @@ 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' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : '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 ace1d84..86ec96d 100644 --- a/DebuggingSpy/DSMouseLeaveWindowRecord.class.st +++ b/DebuggingSpy/DSMouseLeaveWindowRecord.class.st @@ -2,12 +2,14 @@ This record is generated when the mouse leaves a window (with or without focus). " Class { - #name : #DSMouseLeaveWindowRecord, - #superclass : #DSMouseEventRecord, - #category : #'DebuggingSpy-Records' + #name : 'DSMouseLeaveWindowRecord', + #superclass : 'DSMouseEventRecord', + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #accessing } +{ #category : 'accessing' } DSMouseLeaveWindowRecord >> eventName [ ^'Leave window' ] diff --git a/DebuggingSpy/DSNavigateAttributeRecord.class.st b/DebuggingSpy/DSNavigateAttributeRecord.class.st index 9de1e80..3635e89 100644 --- a/DebuggingSpy/DSNavigateAttributeRecord.class.st +++ b/DebuggingSpy/DSNavigateAttributeRecord.class.st @@ -2,12 +2,14 @@ I record the inspection of an inspected object's attribute through selecting attributes in inspector tables " Class { - #name : #DSNavigateAttributeRecord, - #superclass : #DSInspectAttributeRecord, - #category : #'DebuggingSpy-Records' + #name : 'DSNavigateAttributeRecord', + #superclass : 'DSInspectAttributeRecord', + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : '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 9478ac0..5ef07a9 100644 --- a/DebuggingSpy/DSPlaygroundOpenedRecord.class.st +++ b/DebuggingSpy/DSPlaygroundOpenedRecord.class.st @@ -2,12 +2,14 @@ I record that a StPlayground opened. " Class { - #name : #DSPlaygroundOpenedRecord, - #superclass : #DSPlaygroundRecord, - #category : #'DebuggingSpy-Records' + #name : 'DSPlaygroundOpenedRecord', + #superclass : 'DSPlaygroundRecord', + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #accessing } +{ #category : 'accessing' } DSPlaygroundOpenedRecord >> eventName [ ^'Playground open' ] diff --git a/DebuggingSpy/DSPlaygroundReadRecord.class.st b/DebuggingSpy/DSPlaygroundReadRecord.class.st index 4da546f..5ad926c 100644 --- a/DebuggingSpy/DSPlaygroundReadRecord.class.st +++ b/DebuggingSpy/DSPlaygroundReadRecord.class.st @@ -2,12 +2,14 @@ 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' + #name : 'DSPlaygroundReadRecord', + #superclass : 'DSPlaygroundRecord', + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #accessing } +{ #category : 'accessing' } DSPlaygroundReadRecord >> eventName [ ^ 'Playground read' diff --git a/DebuggingSpy/DSPlaygroundRecord.class.st b/DebuggingSpy/DSPlaygroundRecord.class.st index 81f0311..344d5e4 100644 --- a/DebuggingSpy/DSPlaygroundRecord.class.st +++ b/DebuggingSpy/DSPlaygroundRecord.class.st @@ -3,12 +3,14 @@ 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' + #name : 'DSPlaygroundRecord', + #superclass : 'DSAbstractEventRecord', + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : '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 28a2edd..1873721 100644 --- a/DebuggingSpy/DSPlaygroundWriteRecord.class.st +++ b/DebuggingSpy/DSPlaygroundWriteRecord.class.st @@ -2,12 +2,14 @@ I record that the developer is typing in an StPlayground. " Class { - #name : #DSPlaygroundWriteRecord, - #superclass : #DSPlaygroundRecord, - #category : #'DebuggingSpy-Records' + #name : 'DSPlaygroundWriteRecord', + #superclass : 'DSPlaygroundRecord', + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #accessing } +{ #category : 'accessing' } DSPlaygroundWriteRecord >> eventName [ ^'Playground write' ] diff --git a/DebuggingSpy/DSPrintItRecord.class.st b/DebuggingSpy/DSPrintItRecord.class.st index a5b57d7..5b8a487 100644 --- a/DebuggingSpy/DSPrintItRecord.class.st +++ b/DebuggingSpy/DSPrintItRecord.class.st @@ -2,12 +2,14 @@ I record when the user selects code and debugs it. " Class { - #name : #DSPrintItRecord, - #superclass : #DSCodeActionRecord, - #category : #'DebuggingSpy-Records' + #name : 'DSPrintItRecord', + #superclass : 'DSCodeActionRecord', + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #accessing } +{ #category : 'accessing' } DSPrintItRecord >> eventName [ ^'Print it' ] diff --git a/DebuggingSpy/DSProceedCommand.class.st b/DebuggingSpy/DSProceedCommand.class.st index 85236f5..a49f9c9 100644 --- a/DebuggingSpy/DSProceedCommand.class.st +++ b/DebuggingSpy/DSProceedCommand.class.st @@ -3,14 +3,16 @@ 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' + #category : 'DebuggingSpy-Commands', + #package : 'DebuggingSpy', + #tag : '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 9cbd956..1ee8a92 100644 --- a/DebuggingSpy/DSQueryBrowseRecord.class.st +++ b/DebuggingSpy/DSQueryBrowseRecord.class.st @@ -3,32 +3,34 @@ 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' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : '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 c7896f6..7b09398 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,15 +12,17 @@ Class { 'tag', 'windowNames' ], - #category : #'DebuggingSpy-Records' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : '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 @@ -28,44 +30,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. @@ -74,13 +76,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 | @@ -101,7 +103,7 @@ DSRecordHistory >> collectTimeDiscrepancies [ ^ deltas ] -{ #category : #'API-history' } +{ #category : 'API-history' } DSRecordHistory >> countDebugActions [ ^ self breakpointAdds + self breakpointHit + self breakpointRemove @@ -110,7 +112,7 @@ DSRecordHistory >> countDebugActions [ + self callStackBrowing ] -{ #category : #'private - history' } +{ #category : 'private - history' } DSRecordHistory >> detectTimeDiscrepancies [ |time currentRecord totalDelta| time := 0. @@ -129,23 +131,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 @@ -156,7 +158,7 @@ DSRecordHistory >> findWindowRecordKeyForID: id [ yourself ] ] -{ #category : #'private - history' } +{ #category : 'private - history' } DSRecordHistory >> fixMissingWindowIds [ | openedWindowStack | @@ -187,69 +189,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. @@ -257,43 +259,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: @@ -304,24 +306,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 8bffa45..1abbc14 100644 --- a/DebuggingSpy/DSRecordHistoryWindowKey.class.st +++ b/DebuggingSpy/DSRecordHistoryWindowKey.class.st @@ -2,16 +2,18 @@ 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' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #printing } +{ #category : 'printing' } DSRecordHistoryWindowKey >> printOn: aStream [ aStream << (windowName ifNil: [ 'Unnamed window' ]). @@ -21,25 +23,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 a1a1e8e..247a6e3 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,41 +13,43 @@ Class { #classInstVars : [ 'autoSerialize' ], - #category : #'DebuggingSpy-Records' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : '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. @@ -56,18 +58,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 318b926..e3ac9fc 100644 --- a/DebuggingSpy/DSRestartCommand.class.st +++ b/DebuggingSpy/DSRestartCommand.class.st @@ -3,12 +3,14 @@ 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' + #name : 'DSRestartCommand', + #superclass : 'StRestartCommand', + #category : 'DebuggingSpy-Commands', + #package : 'DebuggingSpy', + #tag : '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 42ff4da..630bee0 100644 --- a/DebuggingSpy/DSReturnValueCommand.class.st +++ b/DebuggingSpy/DSReturnValueCommand.class.st @@ -3,14 +3,16 @@ 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' + #category : 'DebuggingSpy-Commands', + #package : 'DebuggingSpy', + #tag : '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 b3dbdc3..30adfe6 100644 --- a/DebuggingSpy/DSRunToSelectionCommand.class.st +++ b/DebuggingSpy/DSRunToSelectionCommand.class.st @@ -3,12 +3,14 @@ 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' + #name : 'DSRunToSelectionCommand', + #superclass : 'StRunToSelectionCommand', + #category : 'DebuggingSpy-Commands', + #package : 'DebuggingSpy', + #tag : '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 b538041..8437d68 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,21 +12,23 @@ Class { 'loggingFileReference', 'savedConfiguration' ], - #category : #'DebuggingSpy-Loggers' + #category : 'DebuggingSpy-Loggers', + #package : 'DebuggingSpy', + #tag : '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 | @@ -36,47 +38,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. @@ -84,7 +86,7 @@ DSSTONFileLogger >> reset [ loggingFileReference := nil ] -{ #category : #private } +{ #category : 'private' } DSSTONFileLogger >> restoreCurrentConfiguration [ loggingFilename := self savedConfiguration at: @@ -93,7 +95,7 @@ DSSTONFileLogger >> restoreCurrentConfiguration [ #currentLoggingFileReference ] -{ #category : #private } +{ #category : 'private' } DSSTONFileLogger >> saveCurrentConfiguration [ self savedConfiguration @@ -104,18 +106,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. @@ -123,23 +125,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 0909d9e..a839bd2 100644 --- a/DebuggingSpy/DSScrollEventRecord.class.st +++ b/DebuggingSpy/DSScrollEventRecord.class.st @@ -3,12 +3,14 @@ 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' + #name : 'DSScrollEventRecord', + #superclass : 'DSAbstractEventRecord', + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #accessing } +{ #category : 'accessing' } DSScrollEventRecord >> eventName [ ^'Scrolling' ] diff --git a/DebuggingSpy/DSSelectInspectorPageRecord.class.st b/DebuggingSpy/DSSelectInspectorPageRecord.class.st index 1750b70..0d753a5 100644 --- a/DebuggingSpy/DSSelectInspectorPageRecord.class.st +++ b/DebuggingSpy/DSSelectInspectorPageRecord.class.st @@ -2,32 +2,34 @@ 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' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : '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 520c20c..f13a638 100644 --- a/DebuggingSpy/DSSourceCodeChangeEventRecord.class.st +++ b/DebuggingSpy/DSSourceCodeChangeEventRecord.class.st @@ -5,16 +5,18 @@ 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' + #category : 'DebuggingSpy-Records', + #package : 'DebuggingSpy', + #tag : 'Records' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } DSSourceCodeChangeEventRecord class >> added: aMethod [ ^ (self for: aMethod) @@ -22,7 +24,7 @@ DSSourceCodeChangeEventRecord class >> added: aMethod [ yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } DSSourceCodeChangeEventRecord class >> modified: aMethod [ ^ (self for: aMethod) @@ -30,7 +32,7 @@ DSSourceCodeChangeEventRecord class >> modified: aMethod [ yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } DSSourceCodeChangeEventRecord class >> removed: aMethod [ ^ (self for: aMethod) @@ -38,24 +40,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 741c54c..079d064 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,10 +17,12 @@ Class { 'recordClipboardContent', 'scopeSourceCodeChangesRecording' ], - #category : #'DebuggingSpy-Instrumentation' + #category : 'DebuggingSpy-Instrumentation', + #package : 'DebuggingSpy', + #tag : 'Instrumentation' } -{ #category : #'task management' } +{ #category : 'task management' } DSSpy class >> closeSurvey: aSurvey [ | currentTaskStarted | @@ -34,17 +36,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. @@ -52,19 +54,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 | @@ -72,7 +74,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: [ @@ -80,7 +82,7 @@ DSSpy class >> log: aDSRecord [ self critical: [ logger log: aDSRecord ] ] -{ #category : #logging } +{ #category : 'logging' } DSSpy class >> log: elements key: key [ " HandlingError ifNil: [ HandlingError := false ]. @@ -91,19 +93,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 ] @@ -111,14 +113,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. @@ -132,25 +134,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 [ [ @@ -162,7 +164,7 @@ DSSpy class >> methodAdded: evt [ do: [ :e | self log: #ERROR key: #METHOD_ADDED ] ] -{ #category : #'events - methods' } +{ #category : 'events - methods' } DSSpy class >> methodChanged: evt [ [ @@ -183,7 +185,7 @@ DSSpy class >> methodChanged: evt [ do: [ self log: #ERROR key: #METHOD_MODIFIED ] ] -{ #category : #'events - methods' } +{ #category : 'events - methods' } DSSpy class >> methodRemoved: evt [ [ @@ -195,47 +197,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. @@ -244,7 +246,7 @@ DSSpy class >> recordHaltInAddedMethod: method [ record method: method name ] -{ #category : #'events - breakpoints' } +{ #category : 'events - breakpoints' } DSSpy class >> recordHaltInMethod: oldMethod modifiedBy: newMethod [ | oldHalts newHalts record | @@ -260,7 +262,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. @@ -269,19 +271,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: [ @@ -295,13 +297,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]. @@ -309,25 +311,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. @@ -335,7 +337,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 c1d5ada..e44eee1 100644 --- a/DebuggingSpy/DSSpyInstrumenter.class.st +++ b/DebuggingSpy/DSSpyInstrumenter.class.st @@ -2,19 +2,21 @@ 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' + #name : 'DSSpyInstrumenter', + #superclass : 'Object', + #category : 'DebuggingSpy-Instrumentation', + #package : 'DebuggingSpy', + #tag : 'Instrumentation' } -{ #category : #'system instrumentation' } +{ #category : 'system instrumentation' } DSSpyInstrumenter class >> instrumentSystem [