*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Fri, 21 Feb 2003 18:17:22 +0100
changeset 1684 34b35b8ae80f
parent 1683 f95658463570
child 1685 85559494e8aa
*** empty log message ***
UIPainter.st
--- a/UIPainter.st	Fri Feb 21 16:26:07 2003 +0100
+++ b/UIPainter.st	Fri Feb 21 18:17:22 2003 +0100
@@ -3381,7 +3381,9 @@
         self warn:'No aspect methods found !!'.
         ^ self.
     ].
-    UserPreferences systemBrowserClass browseMethods:methods title:'Aspect methods'.
+    UserPreferences systemBrowserClass 
+        browseMethods:methods 
+        title:'Aspect methods'.
 !
 
 doBrowseClass
@@ -3493,7 +3495,8 @@
 !
 
 doGenerateAspectMethodFor
-    |cls code aspectList displayedList selectorsToGenerateCode|
+    |cls code aspectList displayedList selectorsToGenerateCode 
+     doBrowse methods|
 
     self askForSectionModification.
 
@@ -3518,17 +3521,39 @@
     displayedList := aspectList collect:[:entry | (((entry first) paddedTo:25) contractTo:25) , ' -> ' , entry second ].
     aspectList := aspectList collect:[:each | each first].
 
+    doBrowse := false.    
     selectorsToGenerateCode := Dialog
-        chooseMultiple:'Select aspect(s) for which code shall be generated:' 
+        choose:'Select aspect(s) for which code shall be generated:' 
         fromList:displayedList 
         values:aspectList 
-        initialSelection:nil 
-        lines:15.
+        initialSelection:nil
+        buttons:nil 
+        values:nil 
+        lines:15 
+        cancel:nil 
+        multiple:true
+        postBuildBlock:[:dialog | 
+                            |b|
+
+                            b := Button label:'Generate & Browse'.
+                            b action:[doBrowse := true. dialog okPressed].
+                            b := dialog addButton:b before:dialog okButton.
+                       ].
 
     selectorsToGenerateCode isEmptyOrNil ifTrue:[^ self].
 
     code := self painter generateAspectMethodCodeFiltering:selectorsToGenerateCode.
     code readStream fileIn.
+
+    doBrowse ifTrue:[
+        methods := selectorsToGenerateCode 
+                        collect:[:sel | cls compiledMethodAt:sel]
+                        thenSelect:[:m | m notNil].
+
+        UserPreferences systemBrowserClass 
+            browseMethods:methods 
+            title:'Some Aspect methods'.
+    ].
 !
 
 doGenerateAspectMethods