diff --git a/src/Spec2-Code-Commands/SpCodeProfileItCommand.class.st b/src/Spec2-Code-Commands/SpCodeProfileItCommand.class.st deleted file mode 100644 index dbbd4bfc..00000000 --- a/src/Spec2-Code-Commands/SpCodeProfileItCommand.class.st +++ /dev/null @@ -1,47 +0,0 @@ -" -I'm a ""profile it"" command. -I will evalute the selection (or line) of the playground using a profiler. -" -Class { - #name : 'SpCodeProfileItCommand', - #superclass : 'SpCodeSelectionCommand', - #category : 'Spec2-Code-Commands-Base', - #package : 'Spec2-Code-Commands', - #tag : 'Base' -} - -{ #category : 'defaults' } -SpCodeProfileItCommand class >> defaultIconName [ - - ^ #smallProfile -] - -{ #category : 'defaults' } -SpCodeProfileItCommand class >> defaultName [ - - ^ 'Profile it' -] - -{ #category : 'execution' } -SpCodeProfileItCommand >> execute [ - - | selection receiver evaluationContext stream compiledMethod | - selection := self selectedTextOrLine. - selection trimBoth ifEmpty: [ ^ self ]. - - receiver := self context doItReceiver. - evaluationContext := self context doItContext. - - stream := selection readStream. - compiledMethod := self - compile: stream - for: receiver - in: evaluationContext. - compiledMethod ifNil: [ ^ self ]. - - StProfilerPresenter new - open; - profileBlock: [ - compiledMethod valueWithReceiver: receiver arguments: #( ) ] - displayCode: selection -]