From f57b842c339e9efa5795e0cdd9020f33e90cde8d Mon Sep 17 00:00:00 2001 From: Sean DeNigris Date: Mon, 12 Oct 2020 15:00:12 -0400 Subject: [PATCH] Coder Stencil Customization Allows you to e.g. open a Coder on a particular package: ```smalltalk coderStencil := GtCoderStencil new coder: (GtCoder forPackage: (RPackageOrganizer default packageNamed: 'MyPackage-Core')); yourself. self showSpaceWithTitle: 'Coder' with: coderStencil create from: card ``` --- src/GToolkit-World/GtCoderStencil.class.st | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/GToolkit-World/GtCoderStencil.class.st b/src/GToolkit-World/GtCoderStencil.class.st index d2723e3ae..b79a7a132 100644 --- a/src/GToolkit-World/GtCoderStencil.class.st +++ b/src/GToolkit-World/GtCoderStencil.class.st @@ -1,6 +1,9 @@ Class { #name : #GtCoderStencil, #superclass : #GtToolStencil, + #instVars : [ + 'coder' + ], #category : #'GToolkit-World-Stencils' } @@ -9,9 +12,19 @@ GtCoderStencil >> asPreviewElement [ ^ GtCoder new asElement ] +{ #category : #accessing } +GtCoderStencil >> coder [ + ^ coder ifNil: [ coder := GtCoder new ] +] + +{ #category : #accessing } +GtCoderStencil >> coder: aCoder [ + coder := aCoder +] + { #category : #'api - instantiation' } GtCoderStencil >> create [ - ^ GtCoder new createInPager maximized. + ^ self coder createInPager maximized ] { #category : #accessing }