moved decompilation into codeObject (alien code); decompile into codeView
authorClaus Gittinger <cg@exept.de>
Tue, 16 Apr 1996 20:45:52 +0200
changeset 481 7a550399e2aa
parent 480 c1b167926f12
child 482 6017d64e8e4b
moved decompilation into codeObject (alien code); decompile into codeView
BrowserView.st
BrwsrView.st
--- a/BrowserView.st	Tue Apr 16 20:18:27 1996 +0200
+++ b/BrowserView.st	Tue Apr 16 20:45:52 1996 +0200
@@ -4628,24 +4628,21 @@
      The Decompiler is delivered as an extra, and not normally
      avaliable with the system."
 
+    |s|
+
     self checkMethodSelected ifFalse:[^ self].
-    Decompiler notNil ifTrue:[
-	Autoload autoloadFailedSignal handle:[:ex |
-	    ex return
-	] do:[
-	    Decompiler autoload.
-	].
-    ].
-    Decompiler isLoaded ifFalse:[
-	Smalltalk 
-	    fileIn:'/phys/clam/claus/work/libcomp/not_delivered/Decomp.st'
-	    logged:false.
-    ].
-    Decompiler isLoaded ifFalse:[
-	^ self warn:'No decompiler available'.
-    ].
-
-    Decompiler decompile:currentMethod.
+    self checkSelectionChangeAllowed ifFalse:[^ self].
+
+    s := '' writeStream.
+    (currentMethod decompileTo:s) ifFalse:[
+        self warn:'No decompiler available'.
+    ].
+    codeView contents:s contents.
+    codeView modified:false.
+    codeView acceptAction:nil.
+    codeView explainAction:nil.
+
+    "Modified: 16.4.1996 / 20:35:05 / cg"
 !
 
 methodFileOut
@@ -6989,6 +6986,6 @@
 !BrowserView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.124 1996-04-16 18:18:27 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.125 1996-04-16 18:45:52 cg Exp $'
 ! !
 BrowserView initialize!
--- a/BrwsrView.st	Tue Apr 16 20:18:27 1996 +0200
+++ b/BrwsrView.st	Tue Apr 16 20:45:52 1996 +0200
@@ -4628,24 +4628,21 @@
      The Decompiler is delivered as an extra, and not normally
      avaliable with the system."
 
+    |s|
+
     self checkMethodSelected ifFalse:[^ self].
-    Decompiler notNil ifTrue:[
-	Autoload autoloadFailedSignal handle:[:ex |
-	    ex return
-	] do:[
-	    Decompiler autoload.
-	].
-    ].
-    Decompiler isLoaded ifFalse:[
-	Smalltalk 
-	    fileIn:'/phys/clam/claus/work/libcomp/not_delivered/Decomp.st'
-	    logged:false.
-    ].
-    Decompiler isLoaded ifFalse:[
-	^ self warn:'No decompiler available'.
-    ].
-
-    Decompiler decompile:currentMethod.
+    self checkSelectionChangeAllowed ifFalse:[^ self].
+
+    s := '' writeStream.
+    (currentMethod decompileTo:s) ifFalse:[
+        self warn:'No decompiler available'.
+    ].
+    codeView contents:s contents.
+    codeView modified:false.
+    codeView acceptAction:nil.
+    codeView explainAction:nil.
+
+    "Modified: 16.4.1996 / 20:35:05 / cg"
 !
 
 methodFileOut
@@ -6989,6 +6986,6 @@
 !BrowserView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Attic/BrwsrView.st,v 1.124 1996-04-16 18:18:27 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Attic/BrwsrView.st,v 1.125 1996-04-16 18:45:52 cg Exp $'
 ! !
 BrowserView initialize!