From 305a8b59b0688d857d15af44711369d6c5a0b198 Mon Sep 17 00:00:00 2001 From: Marcus Denker Date: Tue, 5 Dec 2023 16:06:15 +0100 Subject: [PATCH 1/4] enable accepting class definitons in the browser, self is bound so that evaluating class vars for inspecting and assign works fixes #248 --- .../Class.extension.st | 4 ++-- .../Package.extension.st | 12 ++++++++++++ .../RPackage.extension.st | 19 ------------------- 3 files changed, 14 insertions(+), 21 deletions(-) create mode 100644 src/NewTools-Inspector-Extensions/Package.extension.st diff --git a/src/NewTools-Inspector-Extensions/Class.extension.st b/src/NewTools-Inspector-Extensions/Class.extension.st index 0446c5803..0e88d1780 100644 --- a/src/NewTools-Inspector-Extensions/Class.extension.st +++ b/src/NewTools-Inspector-Extensions/Class.extension.st @@ -46,7 +46,7 @@ Class >> inspectionClassDefinition [ ^ SpCodePresenter new - beForScripting; + beForObject: self; text: self definitionString; - beNotEditable + whenSubmitDo: [ :code | (Smalltalk compiler evaluate: code) fluidInstall ] ] diff --git a/src/NewTools-Inspector-Extensions/Package.extension.st b/src/NewTools-Inspector-Extensions/Package.extension.st new file mode 100644 index 000000000..9b4ec78d6 --- /dev/null +++ b/src/NewTools-Inspector-Extensions/Package.extension.st @@ -0,0 +1,12 @@ +Extension { #name : 'Package' } + +{ #category : '*NewTools-Inspector-Extensions' } +Package >> baselineInspector [ + + + | items | + items := BaselineOf allSubclasses select: [ :e | e allPackageNames includes: self name ]. + ^ SpListPresenter new + items: items; + yourself +] diff --git a/src/NewTools-Inspector-Extensions/RPackage.extension.st b/src/NewTools-Inspector-Extensions/RPackage.extension.st index 42d411a91..f4a7353b2 100644 --- a/src/NewTools-Inspector-Extensions/RPackage.extension.st +++ b/src/NewTools-Inspector-Extensions/RPackage.extension.st @@ -10,22 +10,3 @@ RPackage >> baselineInspector [ items: items; yourself ] - -{ #category : '*NewTools-Inspector-Extensions' } -RPackage >> overwiew [ - - - | items | - items :={ 'Classes' -> self classes . 'Defined classes' -> self definedClasses . 'Methods' -> self methods }. - items := items collect: [ :e | StInspectorAssociationNode hostObject: e ]. - ^ SpTablePresenter new - alternateRowsColor; - items: items; - addColumn: (SpStringTableColumn - title: 'Title' - evaluated: [ :e | e key ] ); - addColumn: (SpStringTableColumn - title: 'Value' - evaluated: [ :e | e value size ] ); - yourself -] From 03a9c13e5fc9b4a1ee8a779cc1afa5c68416ba17 Mon Sep 17 00:00:00 2001 From: Marcus Denker Date: Tue, 5 Dec 2023 16:07:31 +0100 Subject: [PATCH 2/4] add overviw to RPacakge --- .../Package.extension.st | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/NewTools-Inspector-Extensions/Package.extension.st b/src/NewTools-Inspector-Extensions/Package.extension.st index 9b4ec78d6..5bfa2dcd3 100644 --- a/src/NewTools-Inspector-Extensions/Package.extension.st +++ b/src/NewTools-Inspector-Extensions/Package.extension.st @@ -10,3 +10,22 @@ Package >> baselineInspector [ items: items; yourself ] + +{ #category : '*NewTools-Inspector-Extensions' } +Package >> overwiew [ + + + | items | + items :={ 'Classes' -> self classes . 'Defined classes' -> self definedClasses . 'Methods' -> self methods }. + items := items collect: [ :e | StInspectorAssociationNode hostObject: e ]. + ^ SpTablePresenter new + alternateRowsColor; + items: items; + addColumn: (SpStringTableColumn + title: 'Title' + evaluated: [ :e | e key ] ); + addColumn: (SpStringTableColumn + title: 'Value' + evaluated: [ :e | e value size ] ); + yourself +] From 8554046038e332ebcdadb0740b83e96a6c940351 Mon Sep 17 00:00:00 2001 From: Marcus Denker Date: Tue, 5 Dec 2023 16:07:55 +0100 Subject: [PATCH 3/4] remove baselineinspector From 9ad516ec27c040683a7ea1ced4c773eb48466dab Mon Sep 17 00:00:00 2001 From: Marcus Denker Date: Tue, 5 Dec 2023 16:08:28 +0100 Subject: [PATCH 4/4] fix --- .../RPackage.extension.st | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 src/NewTools-Inspector-Extensions/RPackage.extension.st diff --git a/src/NewTools-Inspector-Extensions/RPackage.extension.st b/src/NewTools-Inspector-Extensions/RPackage.extension.st deleted file mode 100644 index f4a7353b2..000000000 --- a/src/NewTools-Inspector-Extensions/RPackage.extension.st +++ /dev/null @@ -1,12 +0,0 @@ -Extension { #name : 'RPackage' } - -{ #category : '*NewTools-Inspector-Extensions' } -RPackage >> baselineInspector [ - - - | items | - items := BaselineOf allSubclasses select: [ :e | e allPackageNames includes: self name ]. - ^ SpListPresenter new - items: items; - yourself -]