From ba2a07919849330e4a671666276b6f26edad2de2 Mon Sep 17 00:00:00 2001 From: Marcus Denker Date: Thu, 21 Sep 2023 13:16:13 +0200 Subject: [PATCH] #StInspectorThisContextNode should not be subclass of StInspectorSelfNode --- src/NewTools-Inspector/Object.extension.st | 4 +- .../SpOutputPortProxy.extension.st | 4 +- .../SpPresenter.extension.st | 4 +- .../StErrorContext.class.st | 16 +-- .../StEvaluateCommand.class.st | 20 ++-- .../StEvaluatedSelectionModel.class.st | 18 ++-- src/NewTools-Inspector/StInspection.class.st | 10 +- .../StInspectionCollector.class.st | 28 +++--- .../StInspectionContext.class.st | 60 ++++++------ .../StInspectionPresenter.class.st | 30 +++--- src/NewTools-Inspector/StInspector.class.st | 10 +- .../StInspectorAssociationNode.class.st | 18 ++-- .../StInspectorBrowseSelectedCommand.class.st | 20 ++-- .../StInspectorCommand.class.st | 36 +++---- .../StInspectorDynamicNode.class.st | 24 ++--- .../StInspectorIndexedNode.class.st | 28 +++--- ...StInspectorInspectSelectedCommand.class.st | 20 ++-- .../StInspectorModel.class.st | 40 ++++---- .../StInspectorNode.class.st | 44 +++++---- .../StInspectorPresenter.class.st | 96 +++++++++--------- .../StInspectorRefreshCommand.class.st | 18 ++-- .../StInspectorRefreshService.class.st | 22 +++-- .../StInspectorSelfNode.class.st | 14 +-- .../StInspectorSlotNode.class.st | 30 +++--- .../StInspectorStackTopNode.class.st | 14 +-- .../StInspectorTempNode.class.st | 24 ++--- .../StInspectorThisContextNode.class.st | 22 +++-- .../StInspectorTransmissionNode.class.st | 18 ++-- .../StInspectorWrapperNode.class.st | 20 ++-- src/NewTools-Inspector/StMetaBrowser.class.st | 10 +- .../StMetaBrowserPresenter.class.st | 32 +++--- .../StNodeCollector.class.st | 22 +++-- .../StObjectContextModel.class.st | 38 +++---- .../StObjectContextPresenter.class.st | 42 ++++---- .../StObjectInspectorPresenter.class.st | 98 ++++++++++--------- .../StObjectPrinter.class.st | 24 ++--- .../StPresenterInspection.class.st | 10 +- .../StPresenterInspectionPresenter.class.st | 26 ++--- .../StRawInspection.class.st | 10 +- .../StRawInspectionPresenter.class.st | 56 ++++++----- .../StSimpleInspectorBuilder.class.st | 18 ++-- src/NewTools-Inspector/package.st | 2 +- 42 files changed, 588 insertions(+), 512 deletions(-) diff --git a/src/NewTools-Inspector/Object.extension.st b/src/NewTools-Inspector/Object.extension.st index 4c3ce1ebc..08d61d3b5 100644 --- a/src/NewTools-Inspector/Object.extension.st +++ b/src/NewTools-Inspector/Object.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #Object } +Extension { #name : 'Object' } -{ #category : #'*NewTools-Inspector' } +{ #category : '*NewTools-Inspector' } Object >> evaluatorInitialText: aStObjectContextPresenter [ ^ '{1}' format: { aStObjectContextPresenter model codeSnippet } ] diff --git a/src/NewTools-Inspector/SpOutputPortProxy.extension.st b/src/NewTools-Inspector/SpOutputPortProxy.extension.st index 70eee6a7b..1c95ad2ab 100644 --- a/src/NewTools-Inspector/SpOutputPortProxy.extension.st +++ b/src/NewTools-Inspector/SpOutputPortProxy.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #SpOutputPortProxy } +Extension { #name : 'SpOutputPortProxy' } -{ #category : #'*NewTools-Inspector' } +{ #category : '*NewTools-Inspector' } SpOutputPortProxy >> asInspection [ ^ StPresenterInspectionPresenter for: self diff --git a/src/NewTools-Inspector/SpPresenter.extension.st b/src/NewTools-Inspector/SpPresenter.extension.st index f62f76109..d36a464dc 100644 --- a/src/NewTools-Inspector/SpPresenter.extension.st +++ b/src/NewTools-Inspector/SpPresenter.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #SpPresenter } +Extension { #name : 'SpPresenter' } -{ #category : #'*NewTools-Inspector' } +{ #category : '*NewTools-Inspector' } SpPresenter >> asInspection [ ^ StPresenterInspectionPresenter for: self diff --git a/src/NewTools-Inspector/StErrorContext.class.st b/src/NewTools-Inspector/StErrorContext.class.st index 0d7da2a0e..7944c7da0 100644 --- a/src/NewTools-Inspector/StErrorContext.class.st +++ b/src/NewTools-Inspector/StErrorContext.class.st @@ -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 diff --git a/src/NewTools-Inspector/StEvaluateCommand.class.st b/src/NewTools-Inspector/StEvaluateCommand.class.st index abeb79061..50be9ecb7 100644 --- a/src/NewTools-Inspector/StEvaluateCommand.class.st +++ b/src/NewTools-Inspector/StEvaluateCommand.class.st @@ -3,30 +3,32 @@ 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 @@ -34,13 +36,13 @@ StEvaluateCommand class >> defaultShortcutKey [ | $g control unix ] -{ #category : #documentation } +{ #category : 'documentation' } StEvaluateCommand class >> documentContextRequiredSelectors [ ^ super documentContextRequiredSelectors, #(doEvaluateAndGo) ] -{ #category : #executing } +{ #category : 'executing' } StEvaluateCommand >> execute [ self context doEvaluateAndGo diff --git a/src/NewTools-Inspector/StEvaluatedSelectionModel.class.st b/src/NewTools-Inspector/StEvaluatedSelectionModel.class.st index 1b341796e..096098a9e 100644 --- a/src/NewTools-Inspector/StEvaluatedSelectionModel.class.st +++ b/src/NewTools-Inspector/StEvaluatedSelectionModel.class.st @@ -3,15 +3,17 @@ 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 @@ -19,25 +21,25 @@ StEvaluatedSelectionModel class >> newValue: 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 diff --git a/src/NewTools-Inspector/StInspection.class.st b/src/NewTools-Inspector/StInspection.class.st index 427d2c02d..097b65300 100644 --- a/src/NewTools-Inspector/StInspection.class.st +++ b/src/NewTools-Inspector/StInspection.class.st @@ -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 ] diff --git a/src/NewTools-Inspector/StInspectionCollector.class.st b/src/NewTools-Inspector/StInspectionCollector.class.st index 7b9bda7ee..50d612406 100644 --- a/src/NewTools-Inspector/StInspectionCollector.class.st +++ b/src/NewTools-Inspector/StInspectionCollector.class.st @@ -15,21 +15,23 @@ 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 @@ -37,7 +39,7 @@ StInspectionCollector class >> on: anObject [ yourself ] -{ #category : #private } +{ #category : 'private' } StInspectionCollector >> basicContextFromPragma: aPragma [ "Get the context for a pragma or fail if an error happens" | context | @@ -53,7 +55,7 @@ StInspectionCollector >> basicContextFromPragma: aPragma [ ^ context ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectionCollector >> collectInspectionContexts [ | pragmas | @@ -67,7 +69,7 @@ StInspectionCollector >> collectInspectionContexts [ sorted: #order ascending ] -{ #category : #private } +{ #category : 'private' } StInspectionCollector >> collectPragmas: aPragmaName [ ^ Pragma @@ -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" @@ -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 | diff --git a/src/NewTools-Inspector/StInspectionContext.class.st b/src/NewTools-Inspector/StInspectionContext.class.st index b80a8025d..f7b6b58ce 100644 --- a/src/NewTools-Inspector/StInspectionContext.class.st +++ b/src/NewTools-Inspector/StInspectionContext.class.st @@ -8,8 +8,8 @@ If I fail to create a presentation, I provide a debug presentation instead. If you define a method `Object>>#inspectionMeta`, you can define a context method `Object>>#inspectionMetaContext:`. " Class { - #name : #StInspectionContext, - #superclass : #Object, + #name : 'StInspectionContext', + #superclass : 'Object', #instVars : [ 'inspectedObject', 'active', @@ -18,10 +18,12 @@ Class { 'methodSelector', 'evaluator' ], - #category : #'NewTools-Inspector-Model' + #category : 'NewTools-Inspector-Model', + #package : 'NewTools-Inspector', + #tag : 'Model' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } StInspectionContext class >> fromPragma: aPragma [ ^ self new @@ -29,13 +31,13 @@ StInspectionContext class >> fromPragma: aPragma [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectionContext >> active: aBoolean [ active := aBoolean ] -{ #category : #'private - factory' } +{ #category : 'private - factory' } StInspectionContext >> basicNewInspectionPresenter [ ^ self methodSelectorNeedsBuilder @@ -47,19 +49,19 @@ StInspectionContext >> basicNewInspectionPresenter [ self inspectedObject inspectorPerform: self methodSelector ] ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectionContext >> beActive [ self active: true ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectionContext >> beInactive [ self active: false ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectionContext >> contextMethodSelector [ | selector | @@ -69,7 +71,7 @@ StInspectionContext >> contextMethodSelector [ ^ (selector, 'Context:') asSymbol ] -{ #category : #initialization } +{ #category : 'initialization' } StInspectionContext >> debugInspectorPresenter [ "Create a debug inspector presenter. @@ -100,13 +102,13 @@ StInspectionContext >> debugInspectorPresenter [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectionContext >> evaluator: aBoolean [ evaluator := aBoolean ] -{ #category : #initialization } +{ #category : 'initialization' } StInspectionContext >> fromPragma: aPragma [ self @@ -115,13 +117,13 @@ StInspectionContext >> fromPragma: aPragma [ methodSelector: aPragma methodSelector ] -{ #category : #testing } +{ #category : 'testing' } StInspectionContext >> hasEvaluator [ ^ evaluator ] -{ #category : #initialization } +{ #category : 'initialization' } StInspectionContext >> initialize [ super initialize. @@ -129,43 +131,43 @@ StInspectionContext >> initialize [ evaluator := true ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectionContext >> inspectedObject [ ^ inspectedObject ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectionContext >> inspectedObject: anObject [ inspectedObject := anObject ] -{ #category : #testing } +{ #category : 'testing' } StInspectionContext >> isActive [ ^ active ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectionContext >> methodSelector [ ^ methodSelector ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectionContext >> methodSelector: aSelector [ methodSelector := aSelector ] -{ #category : #'private - testing' } +{ #category : 'private - testing' } StInspectionContext >> methodSelectorNeedsBuilder [ ^ self methodSelector last = $: ] -{ #category : #'private - factory' } +{ #category : 'private - factory' } StInspectionContext >> newInspectionPresenter [ "Create an inspection presenter for the current object and pragma. @@ -175,7 +177,7 @@ StInspectionContext >> newInspectionPresenter [ self debugInspectorPresenter ] ] -{ #category : #factory } +{ #category : 'factory' } StInspectionContext >> newInspectionView [ | presenter | @@ -185,40 +187,40 @@ StInspectionContext >> newInspectionView [ yourself ] -{ #category : #'private - factory' } +{ #category : 'private - factory' } StInspectionContext >> newPresenterBuilder [ ^ SpPresenterBuilder new ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectionContext >> order [ ^ order ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectionContext >> order: aNumber [ order := aNumber ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectionContext >> title [ ^ title ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectionContext >> title: anObject [ title := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectionContext >> withEvaluator [ self evaluator: true ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectionContext >> withoutEvaluator [ self evaluator: false diff --git a/src/NewTools-Inspector/StInspectionPresenter.class.st b/src/NewTools-Inspector/StInspectionPresenter.class.st index ade4b00fa..ac98b4615 100644 --- a/src/NewTools-Inspector/StInspectionPresenter.class.st +++ b/src/NewTools-Inspector/StInspectionPresenter.class.st @@ -4,71 +4,73 @@ Inspections are ways to see/inspect an object. They are the pages seen in the basic inspector. " Class { - #name : #StInspectionPresenter, - #superclass : #SpPresenter, + #name : 'StInspectionPresenter', + #superclass : 'SpPresenter', #instVars : [ 'model', 'context' ], - #category : #'NewTools-Inspector-View' + #category : 'NewTools-Inspector-View', + #package : 'NewTools-Inspector', + #tag : 'View' } -{ #category : #api } +{ #category : 'api' } StInspectionPresenter >> activateOnDoubleClick [ ] -{ #category : #api } +{ #category : 'api' } StInspectionPresenter >> activateOnSingleClick [ ] -{ #category : #converting } +{ #category : 'converting' } StInspectionPresenter >> asInspection [ ^ self ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectionPresenter >> context [ ^ context ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectionPresenter >> context: aContext [ context := aContext ] -{ #category : #testing } +{ #category : 'testing' } StInspectionPresenter >> enableSlotMenuEntries [ ^false ] -{ #category : #testing } +{ #category : 'testing' } StInspectionPresenter >> hasOutputActivationPort [ ^ false ] -{ #category : #'accessing - model' } +{ #category : 'accessing - model' } StInspectionPresenter >> model [ ^ model ] -{ #category : #'accessing - model' } +{ #category : 'accessing - model' } StInspectionPresenter >> model: anInspectionModel [ model := anInspectionModel ] -{ #category : #'accessing - model' } +{ #category : 'accessing - model' } StInspectionPresenter >> setModelBeforeInitialization: anInspectionModel [ model := anInspectionModel ] -{ #category : #stepping } +{ #category : 'stepping' } StInspectionPresenter >> step [ "do nothing, it depends on my children" ] diff --git a/src/NewTools-Inspector/StInspector.class.st b/src/NewTools-Inspector/StInspector.class.st index 0799877c8..3b270f243 100644 --- a/src/NewTools-Inspector/StInspector.class.st +++ b/src/NewTools-Inspector/StInspector.class.st @@ -1,10 +1,12 @@ Class { - #name : #StInspector, - #superclass : #StInspectorPresenter, - #category : #'NewTools-Inspector-Deprecated' + #name : 'StInspector', + #superclass : 'StInspectorPresenter', + #category : 'NewTools-Inspector-Deprecated', + #package : 'NewTools-Inspector', + #tag : 'Deprecated' } -{ #category : #testing } +{ #category : 'testing' } StInspector class >> isDeprecated [ ^ true diff --git a/src/NewTools-Inspector/StInspectorAssociationNode.class.st b/src/NewTools-Inspector/StInspectorAssociationNode.class.st index fecd9cb78..4a05e95b0 100644 --- a/src/NewTools-Inspector/StInspectorAssociationNode.class.st +++ b/src/NewTools-Inspector/StInspectorAssociationNode.class.st @@ -1,34 +1,36 @@ Class { - #name : #StInspectorAssociationNode, - #superclass : #StInspectorNode, - #category : #'NewTools-Inspector-Model' + #name : 'StInspectorAssociationNode', + #superclass : 'StInspectorNode', + #category : 'NewTools-Inspector-Model', + #package : 'NewTools-Inspector', + #tag : 'Model' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } StInspectorAssociationNode class >> hostObject: anObject index: index [ ^ (self hostObject: anObject) index: index; yourself ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorAssociationNode >> key [ ^ self hostObject key ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorAssociationNode >> rawValue [ ^ self hostObject value ] -{ #category : #actions } +{ #category : 'actions' } StInspectorAssociationNode >> save: aValue [ self hostObject put: aValue ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorAssociationNode >> variableTag [ ^ 'association' ] diff --git a/src/NewTools-Inspector/StInspectorBrowseSelectedCommand.class.st b/src/NewTools-Inspector/StInspectorBrowseSelectedCommand.class.st index 5be8acfff..556f24baf 100644 --- a/src/NewTools-Inspector/StInspectorBrowseSelectedCommand.class.st +++ b/src/NewTools-Inspector/StInspectorBrowseSelectedCommand.class.st @@ -2,43 +2,45 @@ Browse current selected object. " Class { - #name : #StInspectorBrowseSelectedCommand, - #superclass : #StInspectorCommand, - #category : #'NewTools-Inspector-Command' + #name : 'StInspectorBrowseSelectedCommand', + #superclass : 'StInspectorCommand', + #category : 'NewTools-Inspector-Command', + #package : 'NewTools-Inspector', + #tag : 'Command' } -{ #category : #default } +{ #category : 'default' } StInspectorBrowseSelectedCommand class >> defaultDescription [ ^ 'Browse this instance class definition' ] -{ #category : #initialization } +{ #category : 'initialization' } StInspectorBrowseSelectedCommand class >> defaultIconName [ ^ #smallSystemBrowser ] -{ #category : #default } +{ #category : 'default' } StInspectorBrowseSelectedCommand class >> defaultName [ ^ 'Browse' ] -{ #category : #documentation } +{ #category : 'documentation' } StInspectorBrowseSelectedCommand class >> documentContextRequiredSelectors [ ^ super documentContextRequiredSelectors, #(selectedObject) ] -{ #category : #execution } +{ #category : 'execution' } StInspectorBrowseSelectedCommand >> execute [ self context systemNavigation browse: self interestingObject ] -{ #category : #execution } +{ #category : 'execution' } StInspectorBrowseSelectedCommand >> interestingObject [ ^ self context selectedObject diff --git a/src/NewTools-Inspector/StInspectorCommand.class.st b/src/NewTools-Inspector/StInspectorCommand.class.st index 4b9aa6e01..a5260b116 100644 --- a/src/NewTools-Inspector/StInspectorCommand.class.st +++ b/src/NewTools-Inspector/StInspectorCommand.class.st @@ -2,12 +2,14 @@ A base for inspector toolbar commands. " Class { - #name : #StInspectorCommand, - #superclass : #CmCommand, - #category : #'NewTools-Inspector-Command' + #name : 'StInspectorCommand', + #superclass : 'CmCommand', + #category : 'NewTools-Inspector-Command', + #package : 'NewTools-Inspector', + #tag : 'Command' } -{ #category : #documentation } +{ #category : 'documentation' } StInspectorCommand class >> addDocumentContextRequiredSelectors: aBuilder [ | requiredSelectors | @@ -27,32 +29,32 @@ StInspectorCommand class >> addDocumentContextRequiredSelectors: aBuilder [ aBuilder text: '(No required API is defined)' ] ] -{ #category : #documentation } +{ #category : 'documentation' } StInspectorCommand class >> buildMicroDownUsing: aBuilder withComment: aString [ super buildMicroDownUsing: aBuilder withComment: aString. self addDocumentContextRequiredSelectors: aBuilder ] -{ #category : #initialization } +{ #category : 'initialization' } StInspectorCommand class >> defaultIconName [ ^ nil ] -{ #category : #default } +{ #category : 'default' } StInspectorCommand class >> defaultShortcutKey [ ^ nil ] -{ #category : #documentation } +{ #category : 'documentation' } StInspectorCommand class >> documentContextRequiredSelectors [ ^ #() ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } StInspectorCommand class >> toolbarCommandsFor: inspector [ ^ self @@ -60,13 +62,13 @@ StInspectorCommand class >> toolbarCommandsFor: inspector [ for: inspector ] -{ #category : #testing } +{ #category : 'testing' } StInspectorCommand >> appliesTo: anInspector [ ^ true ] -{ #category : #converting } +{ #category : 'converting' } StInspectorCommand >> asSpecCommand [ | command | @@ -80,13 +82,13 @@ StInspectorCommand >> asSpecCommand [ ^ command ] -{ #category : #converting } +{ #category : 'converting' } StInspectorCommand >> defaultIconName [ ^ self class defaultIconName ] -{ #category : #initialization } +{ #category : 'initialization' } StInspectorCommand >> initialize [ super initialize. @@ -97,25 +99,25 @@ StInspectorCommand >> initialize [ << self class defaultDescription ]) ] -{ #category : #execution } +{ #category : 'execution' } StInspectorCommand >> interestingObject [ ^ self model inspectedObject ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorCommand >> model [ ^ self context model ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorCommand >> owner [ ^ self context owner ] -{ #category : #converting } +{ #category : 'converting' } StInspectorCommand >> shortcutKey [ ^ self class defaultShortcutKey diff --git a/src/NewTools-Inspector/StInspectorDynamicNode.class.st b/src/NewTools-Inspector/StInspectorDynamicNode.class.st index 4fb443b79..7fe9b3dc0 100644 --- a/src/NewTools-Inspector/StInspectorDynamicNode.class.st +++ b/src/NewTools-Inspector/StInspectorDynamicNode.class.st @@ -3,17 +3,19 @@ I am a variable node for representing any dynamically computed attribute that sh I should not be used for slots or indexed variables. " Class { - #name : #StInspectorDynamicNode, - #superclass : #StInspectorNode, + #name : 'StInspectorDynamicNode', + #superclass : 'StInspectorNode', #instVars : [ 'label', 'value', 'tag' ], - #category : #'NewTools-Inspector-Model' + #category : 'NewTools-Inspector-Model', + #package : 'NewTools-Inspector', + #tag : 'Model' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } StInspectorDynamicNode class >> hostObject: anObject label: aString value: anotherObject [ ^ (self hostObject: anObject) label: aString; @@ -21,38 +23,38 @@ StInspectorDynamicNode class >> hostObject: anObject label: aString value: anoth yourself ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorDynamicNode >> key [ ^ label ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorDynamicNode >> label [ ^ label ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorDynamicNode >> label: aString [ label := aString ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorDynamicNode >> rawValue [ ^ value ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorDynamicNode >> rawValue: anObject [ value := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorDynamicNode >> variableTag [ ^ tag ifNil: [ super variableTag ] ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorDynamicNode >> variableTag: aTag [ tag := aTag ] diff --git a/src/NewTools-Inspector/StInspectorIndexedNode.class.st b/src/NewTools-Inspector/StInspectorIndexedNode.class.st index 89347c5ec..e0ec6cbdc 100644 --- a/src/NewTools-Inspector/StInspectorIndexedNode.class.st +++ b/src/NewTools-Inspector/StInspectorIndexedNode.class.st @@ -4,65 +4,67 @@ I used the index of a variable as a key. I extract the value from the host object every time #rawValue is called " Class { - #name : #StInspectorIndexedNode, - #superclass : #StInspectorNode, + #name : 'StInspectorIndexedNode', + #superclass : 'StInspectorNode', #instVars : [ 'index' ], - #category : #'NewTools-Inspector-Model' + #category : 'NewTools-Inspector-Model', + #package : 'NewTools-Inspector', + #tag : 'Model' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } StInspectorIndexedNode class >> hostObject: anObject index: index [ ^ (self hostObject: anObject) index: index; yourself ] -{ #category : #comparing } +{ #category : 'comparing' } StInspectorIndexedNode >> = anObject [ ^ super = anObject and: [ index = anObject index ] ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorIndexedNode >> errorMessage [ ^ 'error obtaining indexed variable value' ] -{ #category : #comparing } +{ #category : 'comparing' } StInspectorIndexedNode >> hash [ ^ index hash ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorIndexedNode >> index [ ^ index ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorIndexedNode >> index: anInteger [ index := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorIndexedNode >> key [ ^ self index ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorIndexedNode >> rawValue [ ^ self hostObject basicAt: index ] -{ #category : #actions } +{ #category : 'actions' } StInspectorIndexedNode >> save: aValue [ self hostObject at: self index put: aValue ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorIndexedNode >> variableTag [ ^ 'inst. var' ] diff --git a/src/NewTools-Inspector/StInspectorInspectSelectedCommand.class.st b/src/NewTools-Inspector/StInspectorInspectSelectedCommand.class.st index a526e0f8b..f03e4a81c 100644 --- a/src/NewTools-Inspector/StInspectorInspectSelectedCommand.class.st +++ b/src/NewTools-Inspector/StInspectorInspectSelectedCommand.class.st @@ -2,44 +2,46 @@ Open an inspector on current selected object. " Class { - #name : #StInspectorInspectSelectedCommand, - #superclass : #StInspectorCommand, - #category : #'NewTools-Inspector-Command' + #name : 'StInspectorInspectSelectedCommand', + #superclass : 'StInspectorCommand', + #category : 'NewTools-Inspector-Command', + #package : 'NewTools-Inspector', + #tag : 'Command' } -{ #category : #default } +{ #category : 'default' } StInspectorInspectSelectedCommand class >> defaultDescription [ ^ 'Inspect this instance' ] -{ #category : #initialization } +{ #category : 'initialization' } StInspectorInspectSelectedCommand class >> defaultIconName [ ^ #smallInspectIt ] -{ #category : #default } +{ #category : 'default' } StInspectorInspectSelectedCommand class >> defaultName [ ^ 'Inspect' ] -{ #category : #documentation } +{ #category : 'documentation' } StInspectorInspectSelectedCommand class >> documentContextRequiredSelectors [ ^ super documentContextRequiredSelectors, #(selectedObject) ] -{ #category : #execution } +{ #category : 'execution' } StInspectorInspectSelectedCommand >> execute [ self context systemNavigation inspect: self interestingObject ] -{ #category : #execution } +{ #category : 'execution' } StInspectorInspectSelectedCommand >> interestingObject [ ^ self context selectedObject diff --git a/src/NewTools-Inspector/StInspectorModel.class.st b/src/NewTools-Inspector/StInspectorModel.class.st index 55f301e1f..729755ce3 100644 --- a/src/NewTools-Inspector/StInspectorModel.class.st +++ b/src/NewTools-Inspector/StInspectorModel.class.st @@ -3,57 +3,59 @@ An model to provide inspector data on an inspected object. The inspector wraps all inspected objects with this to being able to display values. " Class { - #name : #StInspectorModel, - #superclass : #Object, + #name : 'StInspectorModel', + #superclass : 'Object', #instVars : [ 'inspectedObject' ], - #category : #'NewTools-Inspector-Model' + #category : 'NewTools-Inspector-Model', + #package : 'NewTools-Inspector', + #tag : 'Model' } -{ #category : #accessing } +{ #category : 'accessing' } StInspectorModel class >> maxTitleLength [ ^ 40 ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } StInspectorModel class >> new [ self error: 'Use #on:' ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } StInspectorModel class >> on: anObject [ ^ super new inspectedObject: anObject ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorModel >> allInspectorNodes [ ^ self inspectedObject allInspectorNodes ] -{ #category : #converting } +{ #category : 'converting' } StInspectorModel >> asInspectorModel [ ^ self ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorModel >> behavior [ ^ self inspectedObject class ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorModel >> descriptionString [ ^ self descriptionStringFor: self inspectedObject ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorModel >> descriptionStringFor: object [ | header printString | @@ -70,31 +72,31 @@ StInspectorModel >> descriptionStringFor: object [ out << header; << ' ('; << printString; << ')' ] ]) ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorModel >> inspectedObject [ ^ inspectedObject ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorModel >> inspectedObject: anObject [ inspectedObject := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorModel >> labelString [ ^ self descriptionString truncateWithElipsisTo: 30 ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorModel >> objectInspectionContexts [ ^ self inspectedObject inspectionContexts ] -{ #category : #printing } +{ #category : 'printing' } StInspectorModel >> printOn: stream [ super printOn: stream. @@ -103,19 +105,19 @@ StInspectorModel >> printOn: stream [ stream << ')' ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorModel >> smallDescriptionString [ ^ (StObjectPrinter asTruncatedTextFrom: self inspectedObject) asString ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorModel >> smallDescriptionStringFor: anObject [ ^ (StObjectPrinter asTruncatedTextFrom: anObject) asString ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorModel >> windowTitle [ ^ 'Inspector on {1}' format: diff --git a/src/NewTools-Inspector/StInspectorNode.class.st b/src/NewTools-Inspector/StInspectorNode.class.st index 39fcf2f9a..5482b843e 100644 --- a/src/NewTools-Inspector/StInspectorNode.class.st +++ b/src/NewTools-Inspector/StInspectorNode.class.st @@ -11,22 +11,24 @@ Public API and Key Messages " Class { - #name : #StInspectorNode, - #superclass : #Object, + #name : 'StInspectorNode', + #superclass : 'Object', #instVars : [ 'hostObject' ], - #category : #'NewTools-Inspector-Model' + #category : 'NewTools-Inspector-Model', + #package : 'NewTools-Inspector', + #tag : 'Model' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } StInspectorNode class >> hostObject: anObject [ ^ self new hostObject: anObject; yourself ] -{ #category : #comparing } +{ #category : 'comparing' } StInspectorNode >> = anObject [ self == anObject ifTrue: [ ^ true ]. @@ -34,35 +36,35 @@ StInspectorNode >> = anObject [ ^ hostObject == anObject hostObject ] -{ #category : #converting } +{ #category : 'converting' } StInspectorNode >> asInspectorModel [ ^ StInspectorModel on: self rawValue ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorNode >> children [ ^ self value allInspectorNodes ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorNode >> errorMessage [ ^ 'error obtaining value' ] -{ #category : #comparing } +{ #category : 'comparing' } StInspectorNode >> hash [ ^ hostObject hash ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorNode >> hostObject [ ^ hostObject ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorNode >> hostObject: anObject [ " @@ -78,13 +80,13 @@ StInspectorNode >> hostObject: anObject [ hostObject := anObject ] -{ #category : #private } +{ #category : 'private' } StInspectorNode >> iconError: error [ ^ #smallWarning ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorNode >> iconName [ ^ [ self value inspectorIconName ifNil: [ self value class systemIconName ] ] @@ -92,48 +94,48 @@ StInspectorNode >> iconName [ do: [ :error | self iconError: error ] ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorNode >> key [ "Answer the key of this object variable (slot, indexed attribute, computed value)." ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorNode >> label [ "Answer the label of this object variable (slot, indexed attribute, computed value)." ^ self key asString ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorNode >> mementoValue [ ^ self value ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorNode >> rawValue [ "Answer the object value of this object variable (slot, indexed attribute, computed value)." ^ self subclassResponsibility ] -{ #category : #actions } +{ #category : 'actions' } StInspectorNode >> save: aValue [ ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorNode >> stringValue [ ^ self value stDisplayString ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorNode >> value [ "Answer the object value of this object variable (slot, indexed attribute, computed value). Return nil in case there is an error obtaining the value" ^ [ self rawValue ] on: Exception do: [ nil ] ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorNode >> variableTag [ ^ 'implicit' ] diff --git a/src/NewTools-Inspector/StInspectorPresenter.class.st b/src/NewTools-Inspector/StInspectorPresenter.class.st index 793667e2c..c852ea39d 100644 --- a/src/NewTools-Inspector/StInspectorPresenter.class.st +++ b/src/NewTools-Inspector/StInspectorPresenter.class.st @@ -12,8 +12,8 @@ Register it as a replacement for inspector: self registerToolsOn: Smalltalk tools. " Class { - #name : #StInspectorPresenter, - #superclass : #StPresenter, + #name : 'StInspectorPresenter', + #superclass : 'StPresenter', #instVars : [ 'millerList', 'model', @@ -27,16 +27,18 @@ Class { #classInstVars : [ 'preferredExtent' ], - #category : #'NewTools-Inspector-View' + #category : 'NewTools-Inspector-View', + #package : 'NewTools-Inspector', + #tag : 'View' } -{ #category : #settings } +{ #category : 'settings' } StInspectorPresenter class >> defaultInspectorDiveOnSingleClick [ ^ true ] -{ #category : #layout } +{ #category : 'layout' } StInspectorPresenter class >> defaultLayout [ ^ SpBoxLayout newTopToBottom @@ -44,50 +46,50 @@ StInspectorPresenter class >> defaultLayout [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorPresenter class >> defaultPreferredExtent [ ^ (700@500) scaledByDisplayScaleFactor ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorPresenter class >> defaultSpacing [ ^ 3 ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } StInspectorPresenter class >> explore: anObject [ self openOn: anObject. ^ anObject ] -{ #category : #settings } +{ #category : 'settings' } StInspectorPresenter class >> indexableDisplayLimit [ ^ IndexableDisplayLimit ifNil: [ 5000 ] ] -{ #category : #settings } +{ #category : 'settings' } StInspectorPresenter class >> indexableDisplayLimit: aNumber [ IndexableDisplayLimit := aNumber ] -{ #category : #'class initialization' } +{ #category : 'class initialization' } StInspectorPresenter class >> initialize [ self register ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } StInspectorPresenter class >> inspect: anObject [ ^ self openOn: anObject ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } StInspectorPresenter class >> inspect: anObject label: aString [ (self openOn: anObject) title: aString. @@ -95,7 +97,7 @@ StInspectorPresenter class >> inspect: anObject label: aString [ ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } StInspectorPresenter class >> inspector: anObject [ self @@ -106,58 +108,58 @@ StInspectorPresenter class >> inspector: anObject [ ^ self openOn: anObject ] -{ #category : #settings } +{ #category : 'settings' } StInspectorPresenter class >> inspectorDiveOnSingleClick [ ^ InspectorDiveOnSingleClick ifNil: [ InspectorDiveOnSingleClick := self defaultInspectorDiveOnSingleClick ] ] -{ #category : #settings } +{ #category : 'settings' } StInspectorPresenter class >> inspectorDiveOnSingleClick: aBoolean [ InspectorDiveOnSingleClick := aBoolean ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } StInspectorPresenter class >> onObject: anObject [ ^ self on: (StInspectorModel on: anObject) ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } StInspectorPresenter class >> openOn: anObject [ ^ (self onObject: anObject) open ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorPresenter class >> preferredExtent [ ^ preferredExtent ifNil: [ preferredExtent := self defaultPreferredExtent ] ] -{ #category : #accessing } +{ #category : 'accessing' } StInspectorPresenter class >> preferredExtent: aPoint [ preferredExtent := aPoint ] -{ #category : #'tools registry' } +{ #category : 'tools registry' } StInspectorPresenter class >> register [