Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions DebuggingSpy-Browser-Tests/DSRecordBrowserPresenterTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
Expand Down
2 changes: 1 addition & 1 deletion DebuggingSpy-Browser-Tests/DSTimerWindowTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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)'
]

Expand Down
10 changes: 5 additions & 5 deletions DebuggingSpy-Browser/DSTimerWindow.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ DSTimerWindow >> currentTimeMorph [

^ StringMorph new
contents: Time now print24;
position: 335 @ 6
position: 425 @ 6
]

{ #category : 'timer' }
Expand Down Expand Up @@ -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' }
Expand Down Expand Up @@ -224,7 +224,7 @@ DSTimerWindow >> stopButton [
label: (IconicListItemMorph new icon: (self iconNamed: #stop));
model: self;
actionSelector: #stopTimer;
position: 385 @ 4;
position: 475 @ 4;
yourself
]

Expand All @@ -241,7 +241,7 @@ DSTimerWindow >> timerMorph [

^ StringMorph new
contents: '00:00:00';
position: 275 @ 6
position: 365 @ 6
]

{ #category : 'private - layout' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ DebugPointBrowserPresenter class >> windowColor [
{ #category : '*DebuggingSpy-Browser' }
DebugPointBrowserPresenter class >> windowType [

^ 'Debug point browser'
^ 'Debug Point Browser'
]
2 changes: 1 addition & 1 deletion DebuggingSpy-Browser/Object.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ Object class >> windowColor [
Object class >> windowType [
"Returns the name of the window type."

^ 'Unknown window'
^ DSWindowRecord unknownWindow
]
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ StCritiquePackageSelectorPresenter class >> windowColor [
{ #category : '*DebuggingSpy-Browser' }
StCritiquePackageSelectorPresenter class >> windowType [

^ 'Critique browser'
^ 'Critique Browser'
]
18 changes: 18 additions & 0 deletions DebuggingSpy-Tests/DSMouseEnterWindowRecordTest.class.st
Original file line number Diff line number Diff line change
@@ -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'
]
18 changes: 18 additions & 0 deletions DebuggingSpy-Tests/DSMouseLeaveWindowRecordTest.class.st
Original file line number Diff line number Diff line change
@@ -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'
]
18 changes: 18 additions & 0 deletions DebuggingSpy-Tests/DSWindowActivatedRecordTest.class.st
Original file line number Diff line number Diff line change
@@ -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'
]
18 changes: 18 additions & 0 deletions DebuggingSpy-Tests/DSWindowClosedRecordTest.class.st
Original file line number Diff line number Diff line change
@@ -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'
]
18 changes: 18 additions & 0 deletions DebuggingSpy-Tests/DSWindowOpenedRecordTest.class.st
Original file line number Diff line number Diff line change
@@ -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'
]
14 changes: 7 additions & 7 deletions DebuggingSpy-Tests/DSWindowRecordTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -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).
Expand Down Expand Up @@ -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' }
Expand All @@ -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' }
Expand Down Expand Up @@ -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'
]
3 changes: 2 additions & 1 deletion DebuggingSpy/DSAbstractEventRecord.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,6 @@ DSAbstractEventRecord >> windowId: aWindowId [

{ #category : 'accessing' }
DSAbstractEventRecord >> windowType [
^'Unknown Window'

^ DSWindowRecord unknownWindow
]
4 changes: 3 additions & 1 deletion DebuggingSpy/DSMouseEnterWindowRecord.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ Class {

{ #category : 'accessing' }
DSMouseEnterWindowRecord >> eventName [
^'Enter window'

toolInfo ifNil: [ ^ 'Enter ' , DSWindowRecord unknownWindow ].
^ 'Enter ' , toolInfo windowType
]
4 changes: 3 additions & 1 deletion DebuggingSpy/DSMouseLeaveWindowRecord.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ Class {

{ #category : 'accessing' }
DSMouseLeaveWindowRecord >> eventName [
^'Leave window'

toolInfo ifNil: [ ^ 'Leave ' , DSWindowRecord unknownWindow ].
^ 'Leave ' , toolInfo windowType
]
4 changes: 2 additions & 2 deletions DebuggingSpy/DSToolInfo.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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
]
4 changes: 3 additions & 1 deletion DebuggingSpy/DSWindowActivatedRecord.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ Class {

{ #category : 'accessing' }
DSWindowActivatedRecord >> eventName [
^'Window activated'

toolInfo ifNil: [ ^ DSWindowRecord unknownWindow , ' activated' ].
^ toolInfo windowType , ' activated'
]
4 changes: 3 additions & 1 deletion DebuggingSpy/DSWindowClosedRecord.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ Class {

{ #category : 'accessing' }
DSWindowClosedRecord >> eventName [
^'Window closed'

toolInfo ifNil: [ ^ DSWindowRecord unknownWindow , ' closed' ].
^ toolInfo windowType , ' closed'
]
2 changes: 1 addition & 1 deletion DebuggingSpy/DSWindowEventRecord.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ DSWindowEventRecord >> recordWindowNameFromEvent: anEvent [

windowName := [ anEvent window label ]
on: Error
do: [ 'Unknown window' ]
do: [ DSWindowRecord unknownWindow ]
]

{ #category : 'comparing' }
Expand Down
4 changes: 3 additions & 1 deletion DebuggingSpy/DSWindowOpenedRecord.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ Class {

{ #category : 'accessing' }
DSWindowOpenedRecord >> eventName [
^'Window opened'

toolInfo ifNil: [ ^ DSWindowRecord unknownWindow , ' opened' ].
^ toolInfo windowType , ' opened'
]
8 changes: 7 additions & 1 deletion DebuggingSpy/DSWindowRecord.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ DSWindowRecord class >> for: events [
^self new buildEvents: events
]

{ #category : 'accessing' }
DSWindowRecord class >> unknownWindow [

^ 'Unknown Window'
]

{ #category : 'accessing' }
DSWindowRecord >> activePeriods [

Expand Down Expand Up @@ -170,5 +176,5 @@ DSWindowRecord >> windowNameFor: aDSWindowOpeningRecord [
DSWindowRecord >> windowType [

toolInfos ifNotNil: [ ^ toolInfos windowType ].
^ 'External Window'
^ self class unknownWindow
]