BrowserView.st
changeset 1957 a57c8c39ce2c
parent 1949 d6eb2a4f5e29
child 1958 669fa8984867
--- a/BrowserView.st	Sat Nov 07 16:29:56 1998 +0100
+++ b/BrowserView.st	Wed Nov 11 15:40:21 1998 +0100
@@ -8055,6 +8055,17 @@
     self normalLabel.
 !
 
+methodFlushCode
+
+    self checkMethodSelected ifFalse:[^ self].
+    self checkSelectionChangeAllowed ifFalse:[^ self].
+
+    currentMethod checked:false.
+    currentMethod code:nil.
+
+    "Created: / 10.11.1998 / 18:30:14 / cg"
+!
+
 methodGlobalReferends
     "launch an enterBox for global symbol to search for"
 
@@ -8258,34 +8269,45 @@
             ]
         ].
 
-        Method methodPrivacySupported ifTrue:[
-            items := #(
-                            ('inspect method'            methodInspect        )
-                            ('stc-compile' " 'compile to machine code' "  methodSTCCompile     )
-                            ('decompile'                 methodDecompile      )
-                            ('-'                         nil                  )
-                            ('make public'               methodMakePublic     )
-                            ('make private'              methodMakePrivate    )
-                            ('make protected'            methodMakeProtected  )
-                            ('make ignored'              methodMakeIgnored    )
-                       ).
-        ] ifFalse:[
+        currentMethod isJavaMethod ifTrue:[
             items := #(
                             ('inspect method'            methodInspect        )
-                            ('compile to machine code'   methodSTCCompile     )
                             ('decompile'                 methodDecompile      )
+                            ('-'                         nil                  )
+                            ('flush code'                methodFlushCode      )
                        ).
-        ].
-
-        actualClass isMeta ifTrue:[
-            items := #(
-                          ('invoke method' methodInvoke )
-                          ('-'             nil          )
-                      )
-                      , items.
-        ].
-
-        items := items , brkItems.
+
+        ] ifFalse:[
+
+            Method methodPrivacySupported ifTrue:[
+                items := #(
+                                ('inspect method'            methodInspect        )
+                                ('stc-compile' " 'compile to machine code' "  methodSTCCompile     )
+                                ('decompile'                 methodDecompile      )
+                                ('-'                         nil                  )
+                                ('make public'               methodMakePublic     )
+                                ('make private'              methodMakePrivate    )
+                                ('make protected'            methodMakeProtected  )
+                                ('make ignored'              methodMakeIgnored    )
+                           ).
+            ] ifFalse:[
+                items := #(
+                                ('inspect method'            methodInspect        )
+                                ('compile to machine code'   methodSTCCompile     )
+                                ('decompile'                 methodDecompile      )
+                           ).
+            ].
+
+            actualClass isMeta ifTrue:[
+                items := #(
+                              ('invoke method' methodInvoke )
+                              ('-'             nil          )
+                          )
+                          , items.
+            ].
+
+            items := items , brkItems.
+        ].
 
         specialMenu := PopUpMenu itemList:items resources:resources.
 
@@ -8302,7 +8324,8 @@
             specialMenu disable:#methodMakeIgnored
         ].
         ((currentMethod code notNil and:[currentMethod isDynamic not])
-        or:[Compiler canCreateMachineCode not]) ifTrue:[
+        or:[currentMethod isJavaMethod
+        or:[Compiler canCreateMachineCode not]]) ifTrue:[
             specialMenu disable:#methodSTCCompile
         ].
         currentMethod byteCode isNil ifTrue:[
@@ -8440,7 +8463,7 @@
     "Created: / 23.11.1995 / 12:02:29 / cg"
     "Modified: / 18.12.1995 / 16:20:07 / stefan"
     "Modified: / 29.4.1997 / 11:20:59 / dq"
-    "Modified: / 7.8.1998 / 17:14:10 / cg"
+    "Modified: / 10.11.1998 / 18:29:26 / cg"
 !
 
 methodMove
@@ -12586,6 +12609,6 @@
 !BrowserView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.460 1998-10-27 18:34:07 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.461 1998-11-11 14:40:21 cg Exp $'
 ! !
 BrowserView initialize!