class: TabListEditor
authorClaus Gittinger <cg@exept.de>
Mon, 16 Sep 2013 10:55:42 +0200
changeset 3056 8fa6d677f726
parent 3055 db492f86c9b1
child 3057 6a88cbfa2c3c
class: TabListEditor changed: #doSave preserve method's pacakge when saving
TabListEditor.st
--- a/TabListEditor.st	Sun Sep 08 14:38:43 2013 +0200
+++ b/TabListEditor.st	Mon Sep 16 10:55:42 2013 +0200
@@ -1625,7 +1625,7 @@
 doSave
     "generate code for class and instance"
 
-    |cls code spec category mthd list|
+    |cls code spec category package mthd list|
 
     (specClass notNil and:[specSelector notNil])
     ifFalse:
@@ -1650,6 +1650,7 @@
 
     (mthd := cls class compiledMethodAt:specSelector) notNil ifTrue:[
         category := mthd category.
+        package := mthd package.
     ].
 
     code := Character excla asString 
@@ -1675,13 +1676,17 @@
             , '\'.
 
     code := code withCRs.
-    (ReadStream on:code) fileIn.
+    Class packageQuerySignal 
+        answer:package
+        do:[
+            (ReadStream on:code) fileIn.
 
-    (cls canUnderstand:specSelector) ifFalse:[
-        (YesNoBox confirm:(resources string:'Generate aspect method for tabList (#%1)?' with:specSelector)) ifTrue:[
-            self doGenerateAspectMethod
-        ]
-    ].
+            (cls canUnderstand:specSelector) ifFalse:[
+                (YesNoBox confirm:(resources string:'Generate aspect method for tabList (#%1)?' with:specSelector)) ifTrue:[
+                    self doGenerateAspectMethod
+                ]
+            ].
+        ].
 
     self addHistoryEntryForClass:cls selector:specSelector.
     self clearModified.