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

StInspectorThisContextNode should not be subclass of StInspectorSelfNode #586

Merged
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
4 changes: 2 additions & 2 deletions src/NewTools-Inspector/Object.extension.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : #Object }
Extension { #name : 'Object' }

{ #category : #'*NewTools-Inspector' }
{ #category : '*NewTools-Inspector' }
Object >> evaluatorInitialText: aStObjectContextPresenter [
^ '{1}' format: { aStObjectContextPresenter model codeSnippet }
]
4 changes: 2 additions & 2 deletions src/NewTools-Inspector/SpOutputPortProxy.extension.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : #SpOutputPortProxy }
Extension { #name : 'SpOutputPortProxy' }

{ #category : #'*NewTools-Inspector' }
{ #category : '*NewTools-Inspector' }
SpOutputPortProxy >> asInspection [

^ StPresenterInspectionPresenter for: self
Expand Down
4 changes: 2 additions & 2 deletions src/NewTools-Inspector/SpPresenter.extension.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : #SpPresenter }
Extension { #name : 'SpPresenter' }

{ #category : #'*NewTools-Inspector' }
{ #category : '*NewTools-Inspector' }
SpPresenter >> asInspection [

^ StPresenterInspectionPresenter for: self
Expand Down
16 changes: 9 additions & 7 deletions src/NewTools-Inspector/StErrorContext.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,35 @@ I arrive when an inspector context fails with an exception.
In that case, I force the inspection presenter to be a debug inspection presenter.
"
Class {
#name : #StErrorContext,
#superclass : #StInspectionContext,
#name : 'StErrorContext',
#superclass : 'StInspectionContext',
#instVars : [
'error'
],
#category : #'NewTools-Inspector-Model'
#category : 'NewTools-Inspector-Model',
#package : 'NewTools-Inspector',
#tag : 'Model'
}

{ #category : #initialization }
{ #category : 'initialization' }
StErrorContext >> basicNewInspectionPresenter [

^ self debugInspectorPresenter
]

{ #category : #initialization }
{ #category : 'initialization' }
StErrorContext >> getError [

^ error
]

{ #category : #testing }
{ #category : 'testing' }
StErrorContext >> isErrorContext [

^ true
]

{ #category : #initialization }
{ #category : 'initialization' }
StErrorContext >> setError: anError [

error := anError
Expand Down
20 changes: 11 additions & 9 deletions src/NewTools-Inspector/StEvaluateCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,46 @@ A command to ""evaluate and go"" the content of a selection (evaluate the select

"
Class {
#name : #StEvaluateCommand,
#superclass : #SpToolCommand,
#category : #'NewTools-Inspector-Command'
#name : 'StEvaluateCommand',
#superclass : 'SpToolCommand',
#category : 'NewTools-Inspector-Command',
#package : 'NewTools-Inspector',
#tag : 'Command'
}

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

^ 'Evaluate selection and open an inspection column.'
]

{ #category : #default }
{ #category : 'default' }
StEvaluateCommand class >> defaultIconName [

^ #glamorousGo
]

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

^ 'Do it and go'
]

{ #category : #default }
{ #category : 'default' }
StEvaluateCommand class >> defaultShortcutKey [

^ $g command mac
| $g control win
| $g control unix
]

{ #category : #documentation }
{ #category : 'documentation' }
StEvaluateCommand class >> documentContextRequiredSelectors [

^ super documentContextRequiredSelectors, #(doEvaluateAndGo)
]

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

self context doEvaluateAndGo
Expand Down
18 changes: 10 additions & 8 deletions src/NewTools-Inspector/StEvaluatedSelectionModel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,43 @@ A selection container to simulate a selection object (the object that is sent wh
This is used so we can trigger `activation` events outside lists tables and trees (for example, in a playground or an inpector evaluator).
"
Class {
#name : #StEvaluatedSelectionModel,
#superclass : #Object,
#name : 'StEvaluatedSelectionModel',
#superclass : 'Object',
#instVars : [
'value'
],
#category : #'NewTools-Inspector-View'
#category : 'NewTools-Inspector-View',
#package : 'NewTools-Inspector',
#tag : 'View'
}

{ #category : #'instance creation' }
{ #category : 'instance creation' }
StEvaluatedSelectionModel class >> newValue: anObject [

^ self new
value: anObject;
yourself
]

{ #category : #'api - selection' }
{ #category : 'api - selection' }
StEvaluatedSelectionModel >> selectedItem [

^ self value
]

{ #category : #accessing }
{ #category : 'accessing' }
StEvaluatedSelectionModel >> transmission [

^ self value
]

{ #category : #accessing }
{ #category : 'accessing' }
StEvaluatedSelectionModel >> value [

^ value
]

{ #category : #accessing }
{ #category : 'accessing' }
StEvaluatedSelectionModel >> value: anObject [

value := anObject
Expand Down
10 changes: 6 additions & 4 deletions src/NewTools-Inspector/StInspection.class.st
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
Class {
#name : #StInspection,
#superclass : #StInspectionPresenter,
#category : #'NewTools-Inspector-Deprecated'
#name : 'StInspection',
#superclass : 'StInspectionPresenter',
#category : 'NewTools-Inspector-Deprecated',
#package : 'NewTools-Inspector',
#tag : 'Deprecated'
}

{ #category : #testing }
{ #category : 'testing' }
StInspection class >> isDeprecated [
^ true
]
28 changes: 15 additions & 13 deletions src/NewTools-Inspector/StInspectionCollector.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,31 @@ The arguments of the pragmas are required because the tabs are calculated lazily
is required before.
"
Class {
#name : #StInspectionCollector,
#superclass : #Object,
#name : 'StInspectionCollector',
#superclass : 'Object',
#instVars : [
'inspectedObject'
],
#category : #'NewTools-Inspector-Model'
#category : 'NewTools-Inspector-Model',
#package : 'NewTools-Inspector',
#tag : 'Model'
}

{ #category : #defaults }
{ #category : 'defaults' }
StInspectionCollector class >> defaultExtensionPragmas [

^ #(inspectorPresentationOrder:title:)
]

{ #category : #'instance creation' }
{ #category : 'instance creation' }
StInspectionCollector class >> on: anObject [

^ self new
inspectedObject: anObject;
yourself
]

{ #category : #private }
{ #category : 'private' }
StInspectionCollector >> basicContextFromPragma: aPragma [
"Get the context for a pragma or fail if an error happens"
| context |
Expand All @@ -53,7 +55,7 @@ StInspectionCollector >> basicContextFromPragma: aPragma [
^ context
]

{ #category : #accessing }
{ #category : 'accessing' }
StInspectionCollector >> collectInspectionContexts [
| pragmas |

Expand All @@ -67,7 +69,7 @@ StInspectionCollector >> collectInspectionContexts [
sorted: #order ascending
]

{ #category : #private }
{ #category : 'private' }
StInspectionCollector >> collectPragmas: aPragmaName [

^ Pragma
Expand All @@ -76,7 +78,7 @@ StInspectionCollector >> collectPragmas: aPragmaName [
to: ProtoObject
]

{ #category : #private }
{ #category : 'private' }
StInspectionCollector >> contextFromPragma: aPragma [
"Return the inspection context for a pragma.
Safe version: Return an error context if the context cannot be obtained"
Expand All @@ -89,23 +91,23 @@ StInspectionCollector >> contextFromPragma: aPragma [
yourself ]
]

{ #category : #private }
{ #category : 'private' }
StInspectionCollector >> extensionPragmas [

^ self class defaultExtensionPragmas
]

{ #category : #accessing }
{ #category : 'accessing' }
StInspectionCollector >> inspectedObject [
^ inspectedObject
]

{ #category : #accessing }
{ #category : 'accessing' }
StInspectionCollector >> inspectedObject: anObject [
inspectedObject := anObject
]

{ #category : #private }
{ #category : 'private' }
StInspectionCollector >> uniquePragmas: aCollection [
| unique |

Expand Down
Loading
Loading