diff --git a/DebuggingSpy-Browser-Tests/DSRecordBrowserPresenterTest.class.st b/DebuggingSpy-Browser-Tests/DSRecordBrowserPresenterTest.class.st index cd701a2..411065c 100644 --- a/DebuggingSpy-Browser-Tests/DSRecordBrowserPresenterTest.class.st +++ b/DebuggingSpy-Browser-Tests/DSRecordBrowserPresenterTest.class.st @@ -164,19 +164,19 @@ DSRecordBrowserPresenterTest >> testColorAssociations [ | associations | associations := { ((Color fromHexString: '#1f48ff') -> 'Browser'). - ((Color fromHexString: '#772980') -> 'Debug point browser'). + ((Color fromHexString: '#772980') -> 'Debug Point Browser'). ((Color fromHexString: '#345e54') -> 'Epicea'). ((Color fromHexString: '#00e5ff') -> 'Iceberg'). - ((Color fromHexString: '#ff9100') -> 'Critique browser'). + ((Color fromHexString: '#ff9100') -> 'Critique Browser'). ((Color fromHexString: '#ff2200') -> 'Debugger'). ((Color fromHexString: '#fad314') -> 'Inspector'). ((Color fromHexString: '#70B77E') -> 'Playground'). - ((Color fromHexString: '#ffffff') -> 'Rewriter'). + (Color white -> 'Rewriter'). ((Color fromHexString: '#ec45ff') -> 'Debugging Spy'). - ((Color fromHexString: '#b3b3b3') -> 'Unknown window') }. + ((Color fromHexString: '#b3b3b3') -> 'Unknown Window') }. self assert: associations size equals: DSRecordBrowserPresenter colorAssociations size. - self assert: (associations allSatisfy: [ :asso | DSRecordBrowserPresenter colorAssociations includes: asso ]) + associations do: [ :asso | self assert: (DSRecordBrowserPresenter colorAssociations includes: asso) ] ] { #category : 'tests' } diff --git a/DebuggingSpy-Browser-Tests/DSTimerWindowTest.class.st b/DebuggingSpy-Browser-Tests/DSTimerWindowTest.class.st index 305d421..cca2af6 100644 --- a/DebuggingSpy-Browser-Tests/DSTimerWindowTest.class.st +++ b/DebuggingSpy-Browser-Tests/DSTimerWindowTest.class.st @@ -74,7 +74,7 @@ DSTimerWindowTest >> testGetFormattedNameFrom [ self assert: (timerWindow getFormattedNameFrom: DSBrowseRecord new) equals: 'Browse'. self assert: (timerWindow getFormattedNameFrom: (DSMouseEnterWindowRecord new toolInfo: toolInfo)) - equals: 'Enter window (DSTimerWindowTest)'. + equals: 'Enter Unknown Window (DSTimerWindowTest)'. self assert: (timerWindow getFormattedNameFrom: DSBrowseRecord new) equals: 'Browse (DSTimerWindowTest)' ] diff --git a/DebuggingSpy-Browser/DSTimerWindow.class.st b/DebuggingSpy-Browser/DSTimerWindow.class.st index d35dfab..ef28e13 100644 --- a/DebuggingSpy-Browser/DSTimerWindow.class.st +++ b/DebuggingSpy-Browser/DSTimerWindow.class.st @@ -46,7 +46,7 @@ DSTimerWindow >> currentTimeMorph [ ^ StringMorph new contents: Time now print24; - position: 335 @ 6 + position: 425 @ 6 ] { #category : 'timer' } @@ -186,14 +186,14 @@ DSTimerWindow >> recordingIcon [ ^ ImageMorph new image: (self iconNamed: #glamorousRedCircle); - position: 260 @ 7; + position: 350 @ 7; yourself ] { #category : 'accessing' } DSTimerWindow >> size [ - ^ 410 @ 30 + ^ 500 @ 30 ] { #category : 'accessing' } @@ -224,7 +224,7 @@ DSTimerWindow >> stopButton [ label: (IconicListItemMorph new icon: (self iconNamed: #stop)); model: self; actionSelector: #stopTimer; - position: 385 @ 4; + position: 475 @ 4; yourself ] @@ -241,7 +241,7 @@ DSTimerWindow >> timerMorph [ ^ StringMorph new contents: '00:00:00'; - position: 275 @ 6 + position: 365 @ 6 ] { #category : 'private - layout' } diff --git a/DebuggingSpy-Browser/DebugPointBrowserPresenter.extension.st b/DebuggingSpy-Browser/DebugPointBrowserPresenter.extension.st index 7ccb3a1..776b8fa 100644 --- a/DebuggingSpy-Browser/DebugPointBrowserPresenter.extension.st +++ b/DebuggingSpy-Browser/DebugPointBrowserPresenter.extension.st @@ -10,5 +10,5 @@ DebugPointBrowserPresenter class >> windowColor [ { #category : '*DebuggingSpy-Browser' } DebugPointBrowserPresenter class >> windowType [ - ^ 'Debug point browser' + ^ 'Debug Point Browser' ] diff --git a/DebuggingSpy-Browser/Object.extension.st b/DebuggingSpy-Browser/Object.extension.st index 62b22cf..614d4a2 100644 --- a/DebuggingSpy-Browser/Object.extension.st +++ b/DebuggingSpy-Browser/Object.extension.st @@ -12,5 +12,5 @@ Object class >> windowColor [ Object class >> windowType [ "Returns the name of the window type." - ^ 'Unknown window' + ^ DSWindowRecord unknownWindow ] diff --git a/DebuggingSpy-Browser/StCritiquePackageSelectorPresenter.extension.st b/DebuggingSpy-Browser/StCritiquePackageSelectorPresenter.extension.st index 976836d..a1667df 100644 --- a/DebuggingSpy-Browser/StCritiquePackageSelectorPresenter.extension.st +++ b/DebuggingSpy-Browser/StCritiquePackageSelectorPresenter.extension.st @@ -10,5 +10,5 @@ StCritiquePackageSelectorPresenter class >> windowColor [ { #category : '*DebuggingSpy-Browser' } StCritiquePackageSelectorPresenter class >> windowType [ - ^ 'Critique browser' + ^ 'Critique Browser' ] diff --git a/DebuggingSpy-Tests/DSMouseEnterWindowRecordTest.class.st b/DebuggingSpy-Tests/DSMouseEnterWindowRecordTest.class.st new file mode 100644 index 0000000..33f8861 --- /dev/null +++ b/DebuggingSpy-Tests/DSMouseEnterWindowRecordTest.class.st @@ -0,0 +1,18 @@ +Class { + #name : 'DSMouseEnterWindowRecordTest', + #superclass : 'TestCase', + #category : 'DebuggingSpy-Tests-Tests - model', + #package : 'DebuggingSpy-Tests', + #tag : 'Tests - model' +} + +{ #category : 'tests' } +DSMouseEnterWindowRecordTest >> testEventName [ + + | record | + record := DSMouseEnterWindowRecord new. + self assert: record eventName equals: 'Enter Unknown Window'. + + record toolInfo: (DSToolInfo new toolClass: StDebugger). + self assert: record eventName equals: 'Enter Debugger' +] diff --git a/DebuggingSpy-Tests/DSMouseLeaveWindowRecordTest.class.st b/DebuggingSpy-Tests/DSMouseLeaveWindowRecordTest.class.st new file mode 100644 index 0000000..73795d7 --- /dev/null +++ b/DebuggingSpy-Tests/DSMouseLeaveWindowRecordTest.class.st @@ -0,0 +1,18 @@ +Class { + #name : 'DSMouseLeaveWindowRecordTest', + #superclass : 'TestCase', + #category : 'DebuggingSpy-Tests-Tests - model', + #package : 'DebuggingSpy-Tests', + #tag : 'Tests - model' +} + +{ #category : 'tests' } +DSMouseLeaveWindowRecordTest >> testEventName [ + + | record | + record := DSMouseLeaveWindowRecord new. + self assert: record eventName equals: 'Leave Unknown Window'. + + record toolInfo: (DSToolInfo new toolClass: StDebugger). + self assert: record eventName equals: 'Leave Debugger' +] diff --git a/DebuggingSpy-Tests/DSWindowActivatedRecordTest.class.st b/DebuggingSpy-Tests/DSWindowActivatedRecordTest.class.st new file mode 100644 index 0000000..97a31b7 --- /dev/null +++ b/DebuggingSpy-Tests/DSWindowActivatedRecordTest.class.st @@ -0,0 +1,18 @@ +Class { + #name : 'DSWindowActivatedRecordTest', + #superclass : 'TestCase', + #category : 'DebuggingSpy-Tests-Tests - model', + #package : 'DebuggingSpy-Tests', + #tag : 'Tests - model' +} + +{ #category : 'tests' } +DSWindowActivatedRecordTest >> testEventName [ + + | record | + record := DSWindowActivatedRecord new. + self assert: record eventName equals: 'Unknown Window activated'. + + record toolInfo: (DSToolInfo new toolClass: StDebugger). + self assert: record eventName equals: 'Debugger activated' +] diff --git a/DebuggingSpy-Tests/DSWindowClosedRecordTest.class.st b/DebuggingSpy-Tests/DSWindowClosedRecordTest.class.st new file mode 100644 index 0000000..2a650bc --- /dev/null +++ b/DebuggingSpy-Tests/DSWindowClosedRecordTest.class.st @@ -0,0 +1,18 @@ +Class { + #name : 'DSWindowClosedRecordTest', + #superclass : 'TestCase', + #category : 'DebuggingSpy-Tests-Tests - model', + #package : 'DebuggingSpy-Tests', + #tag : 'Tests - model' +} + +{ #category : 'tests' } +DSWindowClosedRecordTest >> testEventName [ + + | record | + record := DSWindowClosedRecord new. + self assert: record eventName equals: 'Unknown Window closed'. + + record toolInfo: (DSToolInfo new toolClass: StDebugger). + self assert: record eventName equals: 'Debugger closed' +] diff --git a/DebuggingSpy-Tests/DSWindowOpenedRecordTest.class.st b/DebuggingSpy-Tests/DSWindowOpenedRecordTest.class.st new file mode 100644 index 0000000..bc806df --- /dev/null +++ b/DebuggingSpy-Tests/DSWindowOpenedRecordTest.class.st @@ -0,0 +1,18 @@ +Class { + #name : 'DSWindowOpenedRecordTest', + #superclass : 'TestCase', + #category : 'DebuggingSpy-Tests-Tests - model', + #package : 'DebuggingSpy-Tests', + #tag : 'Tests - model' +} + +{ #category : 'tests' } +DSWindowOpenedRecordTest >> testEventName [ + + | record | + record := DSWindowOpenedRecord new. + self assert: record eventName equals: 'Unknown Window opened'. + + record toolInfo: (DSToolInfo new toolClass: StDebugger). + self assert: record eventName equals: 'Debugger opened' +] diff --git a/DebuggingSpy-Tests/DSWindowRecordTest.class.st b/DebuggingSpy-Tests/DSWindowRecordTest.class.st index 7a0c04b..465383e 100644 --- a/DebuggingSpy-Tests/DSWindowRecordTest.class.st +++ b/DebuggingSpy-Tests/DSWindowRecordTest.class.st @@ -14,7 +14,7 @@ DSWindowRecordTest >> testBuildEvents [ eventsCollection := { (DSWindowOpenedRecord new - windowName: 'Unknown window'; + windowName: 'Unknown Window'; windowId: 42; dateTime: '2008-01-22T16:00:25' asDateAndTime). (DSMouseEnterWindowRecord new dateTime: '2008-01-22T16:00:31' asDateAndTime). @@ -29,8 +29,8 @@ DSWindowRecordTest >> testBuildEvents [ windowRecord buildEvents: eventsCollection. self assert: windowRecord events size equals: 9. - self assert: windowRecord name equals: 'Unknown window'. - self assert: windowRecord windowType equals: 'External Window'. + self assert: windowRecord name equals: 'Unknown Window'. + self assert: windowRecord windowType equals: 'Unknown Window'. self assert: windowRecord activePeriods size equals: 2. windowRecord := DSWindowRecord new toolInfo: (DSToolInfo new toolClass: StDebugger). @@ -113,11 +113,11 @@ DSWindowRecordTest >> testPrintOn [ windowRecord := DSWindowRecord new name: 'RandomName'. printed := String streamContents: [ :stream | windowRecord printOn: stream ]. - self assert: printed equals: '[External Window] RandomName'. + self assert: printed equals: '[Unknown Window] RandomName'. windowRecord := DSWindowRecord new name: DSWindowOpenedRecord. printed := String streamContents: [ :stream | windowRecord printOn: stream ]. - self assert: printed equals: '[External Window] DSWindowOpenedRecord' + self assert: printed equals: '[Unknown Window] DSWindowOpenedRecord' ] { #category : 'tests' } @@ -131,7 +131,7 @@ DSWindowRecordTest >> testPrintTypeOn [ windowRecord := DSWindowRecord new. printed := String streamContents: [ :stream | windowRecord printTypeOn: stream ]. - self assert: printed equals: 'External Window' + self assert: printed equals: 'Unknown Window' ] { #category : 'tests' } @@ -192,5 +192,5 @@ DSWindowRecordTest >> testWindowType [ self assert: windowRecord windowType equals: 'Debugger'. windowRecord toolInfo: DSToolInfo new. - self assert: windowRecord windowType equals: 'External Window' + self assert: windowRecord windowType equals: 'Unknown Window' ] diff --git a/DebuggingSpy/DSAbstractEventRecord.class.st b/DebuggingSpy/DSAbstractEventRecord.class.st index 4278a34..039db49 100644 --- a/DebuggingSpy/DSAbstractEventRecord.class.st +++ b/DebuggingSpy/DSAbstractEventRecord.class.st @@ -124,5 +124,6 @@ DSAbstractEventRecord >> windowId: aWindowId [ { #category : 'accessing' } DSAbstractEventRecord >> windowType [ - ^'Unknown Window' + + ^ DSWindowRecord unknownWindow ] diff --git a/DebuggingSpy/DSMouseEnterWindowRecord.class.st b/DebuggingSpy/DSMouseEnterWindowRecord.class.st index e44ec43..d1a8556 100644 --- a/DebuggingSpy/DSMouseEnterWindowRecord.class.st +++ b/DebuggingSpy/DSMouseEnterWindowRecord.class.st @@ -11,5 +11,7 @@ Class { { #category : 'accessing' } DSMouseEnterWindowRecord >> eventName [ - ^'Enter window' + + toolInfo ifNil: [ ^ 'Enter ' , DSWindowRecord unknownWindow ]. + ^ 'Enter ' , toolInfo windowType ] diff --git a/DebuggingSpy/DSMouseLeaveWindowRecord.class.st b/DebuggingSpy/DSMouseLeaveWindowRecord.class.st index 86ec96d..24814d2 100644 --- a/DebuggingSpy/DSMouseLeaveWindowRecord.class.st +++ b/DebuggingSpy/DSMouseLeaveWindowRecord.class.st @@ -11,5 +11,7 @@ Class { { #category : 'accessing' } DSMouseLeaveWindowRecord >> eventName [ - ^'Leave window' + + toolInfo ifNil: [ ^ 'Leave ' , DSWindowRecord unknownWindow ]. + ^ 'Leave ' , toolInfo windowType ] diff --git a/DebuggingSpy/DSToolInfo.class.st b/DebuggingSpy/DSToolInfo.class.st index 60ff75d..46c46eb 100644 --- a/DebuggingSpy/DSToolInfo.class.st +++ b/DebuggingSpy/DSToolInfo.class.st @@ -70,8 +70,8 @@ DSToolInfo >> windowIdentityHash: anObject [ { #category : 'accessing' } DSToolInfo >> windowType [ - "Returns the window type if the tool is known, and external window otherwise." + "Returns the window type if the tool is known, and unknown window otherwise." toolClass ifNotNil: [ ^ toolClass windowType ]. - ^ 'External Window' + ^ DSWindowRecord unknownWindow ] diff --git a/DebuggingSpy/DSWindowActivatedRecord.class.st b/DebuggingSpy/DSWindowActivatedRecord.class.st index dcf6a2e..8c79223 100644 --- a/DebuggingSpy/DSWindowActivatedRecord.class.st +++ b/DebuggingSpy/DSWindowActivatedRecord.class.st @@ -11,5 +11,7 @@ Class { { #category : 'accessing' } DSWindowActivatedRecord >> eventName [ - ^'Window activated' + + toolInfo ifNil: [ ^ DSWindowRecord unknownWindow , ' activated' ]. + ^ toolInfo windowType , ' activated' ] diff --git a/DebuggingSpy/DSWindowClosedRecord.class.st b/DebuggingSpy/DSWindowClosedRecord.class.st index beb366f..ec4d752 100644 --- a/DebuggingSpy/DSWindowClosedRecord.class.st +++ b/DebuggingSpy/DSWindowClosedRecord.class.st @@ -11,5 +11,7 @@ Class { { #category : 'accessing' } DSWindowClosedRecord >> eventName [ - ^'Window closed' + + toolInfo ifNil: [ ^ DSWindowRecord unknownWindow , ' closed' ]. + ^ toolInfo windowType , ' closed' ] diff --git a/DebuggingSpy/DSWindowEventRecord.class.st b/DebuggingSpy/DSWindowEventRecord.class.st index 8f24968..61e179f 100644 --- a/DebuggingSpy/DSWindowEventRecord.class.st +++ b/DebuggingSpy/DSWindowEventRecord.class.st @@ -31,7 +31,7 @@ DSWindowEventRecord >> recordWindowNameFromEvent: anEvent [ windowName := [ anEvent window label ] on: Error - do: [ 'Unknown window' ] + do: [ DSWindowRecord unknownWindow ] ] { #category : 'comparing' } diff --git a/DebuggingSpy/DSWindowOpenedRecord.class.st b/DebuggingSpy/DSWindowOpenedRecord.class.st index c013de7..4162ba1 100644 --- a/DebuggingSpy/DSWindowOpenedRecord.class.st +++ b/DebuggingSpy/DSWindowOpenedRecord.class.st @@ -11,5 +11,7 @@ Class { { #category : 'accessing' } DSWindowOpenedRecord >> eventName [ - ^'Window opened' + + toolInfo ifNil: [ ^ DSWindowRecord unknownWindow , ' opened' ]. + ^ toolInfo windowType , ' opened' ] diff --git a/DebuggingSpy/DSWindowRecord.class.st b/DebuggingSpy/DSWindowRecord.class.st index 1d7a2ed..835ef6f 100644 --- a/DebuggingSpy/DSWindowRecord.class.st +++ b/DebuggingSpy/DSWindowRecord.class.st @@ -23,6 +23,12 @@ DSWindowRecord class >> for: events [ ^self new buildEvents: events ] +{ #category : 'accessing' } +DSWindowRecord class >> unknownWindow [ + + ^ 'Unknown Window' +] + { #category : 'accessing' } DSWindowRecord >> activePeriods [ @@ -170,5 +176,5 @@ DSWindowRecord >> windowNameFor: aDSWindowOpeningRecord [ DSWindowRecord >> windowType [ toolInfos ifNotNil: [ ^ toolInfos windowType ]. - ^ 'External Window' + ^ self class unknownWindow ]