Allow opening of a GUI Painter for a subSpecification.
authorStefan Vogel <sv@exept.de>
Fri, 06 Feb 1998 15:05:49 +0100
changeset 609 60f89fba074a
parent 608 8610ea5b501d
child 610 c6dc33689c6a
Allow opening of a GUI Painter for a subSpecification.
UIPainter.st
--- a/UIPainter.st	Fri Feb 06 03:46:07 1998 +0100
+++ b/UIPainter.st	Fri Feb 06 15:05:49 1998 +0100
@@ -2197,6 +2197,31 @@
     ]
 !
 
+openSubSpecGuiPainter
+    "opens a GUI Painter on the current subspecification"
+
+    |spec cls meta sel|
+
+    spec := self specTool specification.
+    cls := spec majorKey.
+    cls isNil ifTrue:[
+        cls := self specClass.
+    ].
+    (cls isNil or:[(cls := self resolveName:specClass) isNil]) ifTrue:[
+        ^ self warn:'Cannot find class'.
+    ].
+    sel := spec minorKey.
+    meta := cls class whichClassIncludesSelector:sel.
+    meta isNil ifTrue:[
+        ^ self warn:'Cannot find ''', sel, ''' in class ''', cls name, ''''
+    ].
+
+    self class openOnClass:meta soleInstance andSelector:spec minorKey.
+
+    "Created: / 6.2.1998 / 13:03:59 / stefan"
+    "Modified: / 6.2.1998 / 13:59:30 / stefan"
+!
+
 openTabItemEditor
     "opens a column editor
     "