Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration of object-centric halt once on call breakpoint to tools #627

Merged
merged 1 commit into from
Nov 28, 2023
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Class {
#name : 'StHaltOnceOnCallCommand',
#superclass : 'StBreakpointCommand',
#category : 'NewTools-ObjectCentricBreakpoints',
#package : 'NewTools-ObjectCentricBreakpoints'
}

{ #category : 'default' }
StHaltOnceOnCallCommand class >> defaultDescription [

^ 'Halts once when this method is called'
]

{ #category : 'deafult' }
StHaltOnceOnCallCommand class >> defaultIconName [

^ #smallDebug
]

{ #category : 'default' }
StHaltOnceOnCallCommand class >> defaultName [

^ 'Halt once on call'
]

{ #category : 'testing' }
StHaltOnceOnCallCommand >> canBeExecuted [

^ self appliesTo: context
]

{ #category : 'executing' }
StHaltOnceOnCallCommand >> execute [

^ context haltOnceInspectedObjectOnCallToSelectedMethod
]
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,18 @@ StMetaBrowserPresenter >> haltInspectedObjectOnCallToSelectedMethod [
self model haltOnCallTo: method selector
]

{ #category : '*NewTools-ObjectCentricBreakpoints' }
StMetaBrowserPresenter >> haltOnceInspectedObjectOnCallToSelectedMethod [
|method|
method := self selectedMethod ifNil:[^self].
self model haltOnceOnCallTo: method selector
]

{ #category : '*NewTools-ObjectCentricBreakpoints' }
StMetaBrowserPresenter class >> objectCentricBreakpointCommandsWith: presenter forRootGroup: aRootCmCommandsGroup [
<extensionCommands>

(aRootCmCommandsGroup / 'methods')
register: StHaltOnCallCommand forSpec
register: StHaltOnCallCommand forSpec;
register: StHaltOnceOnCallCommand forSpec
]