ctrl-click on a method removes break/trace point
authorClaus Gittinger <cg@exept.de>
Fri, 07 Mar 1997 19:36:56 +0100
changeset 1074 346d64e1e3e3
parent 1073 a5ce4c71ab14
child 1075 f0ca720bce42
ctrl-click on a method removes break/trace point also on class-method list; fixed class-method menu & update behavior.
BrowserView.st
BrwsrView.st
--- a/BrowserView.st	Fri Mar 07 19:27:04 1997 +0100
+++ b/BrowserView.st	Fri Mar 07 19:36:56 1997 +0100
@@ -246,6 +246,12 @@
                         methodListView setSelection:oldMethodSelection.
                     ].
 
+                    classMethodListView notNil ifTrue:[
+                        oldMethodSelection := classMethodListView selection.
+                        self updateMethodCategoryListWithScroll:false.
+                        classMethodListView selection:oldMethodSelection.
+                    ].
+
                     selector == currentSelector ifTrue:[
                         "
                          special care here: the currently shown method has been
@@ -359,7 +365,7 @@
     ]
 
     "Created: 4.1.1997 / 13:54:00 / cg"
-    "Modified: 7.3.1997 / 19:21:29 / cg"
+    "Modified: 7.3.1997 / 19:29:28 / cg"
 !
 
 refetchClass
@@ -4482,7 +4488,7 @@
 classMethodMenu
     <resource: #keyboard ( #Cmds #Cmdi #Cmdg ) >
 
-    |labels selectors shorties specialMenu|
+    |labels selectors shorties m specialMenu|
 
     (currentMethod notNil
     and:[currentMethod isWrapped]) ifTrue:[
@@ -4561,6 +4567,8 @@
 "/                              'trace sender' 
                                 '-'
                                 'remove'
+                                '-'
+                                'others'
                ).
 
     shorties := #(
@@ -4583,6 +4591,8 @@
 "/                              nil
                                 nil
                                 nil
+                                nil
+                                #'Ctrl'
                ).
 
     selectors := #(
@@ -4605,14 +4615,18 @@
 "/                              methodTraceSender
                                 nil
                                 methodRemove
+                                nil
+                                othersMenu
                   ).
 
-    ^ PopUpMenu 
+    m := PopUpMenu 
         labels:(resources array:labels)
         selectors:selectors
-        accelerators:shorties
-
-    "Modified: 3.3.1997 / 14:53:36 / cg"
+        accelerators:shorties.
+    m subMenuAt:#othersMenu put:specialMenu.
+    ^ m
+
+    "Modified: 7.3.1997 / 19:33:14 / cg"
 ! !
 
 !BrowserView methodsFor:'class-method stuff'!
@@ -4637,6 +4651,17 @@
     classString := self classNameFromClassMethodString:string.
     selectorString := self selectorFromClassMethodString:string.
 
+    "/ reselected with control ?
+    self sensor ctrlDown ifTrue:[
+        selectorString = currentSelector ifTrue:[
+            "/ if there is a trace/break, remove it.
+            (currentMethod notNil and:[currentMethod isWrapped]) ifTrue:[
+                self methodRemoveBreakOrTrace.
+                ^ self
+            ]
+        ].
+    ].
+
     ((classString ~= 'Metaclass') and:[classString endsWith:' class']) ifTrue:[
         classString := classString copyWithoutLast:6 "copyTo:(classString size - 5)".
         meta := true.
@@ -4666,7 +4691,7 @@
 
     "Modified: 31.8.1995 / 11:56:02 / claus"
     "Modified: 17.6.1996 / 16:51:28 / stefan"
-    "Modified: 3.3.1997 / 15:11:44 / cg"
+    "Modified: 7.3.1997 / 19:35:22 / cg"
 !
 
 classNameFromClassMethodString:aString
@@ -9793,6 +9818,6 @@
 !BrowserView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.278 1997-03-07 18:27:04 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.279 1997-03-07 18:36:56 cg Exp $'
 ! !
 BrowserView initialize!
--- a/BrwsrView.st	Fri Mar 07 19:27:04 1997 +0100
+++ b/BrwsrView.st	Fri Mar 07 19:36:56 1997 +0100
@@ -246,6 +246,12 @@
                         methodListView setSelection:oldMethodSelection.
                     ].
 
+                    classMethodListView notNil ifTrue:[
+                        oldMethodSelection := classMethodListView selection.
+                        self updateMethodCategoryListWithScroll:false.
+                        classMethodListView selection:oldMethodSelection.
+                    ].
+
                     selector == currentSelector ifTrue:[
                         "
                          special care here: the currently shown method has been
@@ -359,7 +365,7 @@
     ]
 
     "Created: 4.1.1997 / 13:54:00 / cg"
-    "Modified: 7.3.1997 / 19:21:29 / cg"
+    "Modified: 7.3.1997 / 19:29:28 / cg"
 !
 
 refetchClass
@@ -4482,7 +4488,7 @@
 classMethodMenu
     <resource: #keyboard ( #Cmds #Cmdi #Cmdg ) >
 
-    |labels selectors shorties specialMenu|
+    |labels selectors shorties m specialMenu|
 
     (currentMethod notNil
     and:[currentMethod isWrapped]) ifTrue:[
@@ -4561,6 +4567,8 @@
 "/                              'trace sender' 
                                 '-'
                                 'remove'
+                                '-'
+                                'others'
                ).
 
     shorties := #(
@@ -4583,6 +4591,8 @@
 "/                              nil
                                 nil
                                 nil
+                                nil
+                                #'Ctrl'
                ).
 
     selectors := #(
@@ -4605,14 +4615,18 @@
 "/                              methodTraceSender
                                 nil
                                 methodRemove
+                                nil
+                                othersMenu
                   ).
 
-    ^ PopUpMenu 
+    m := PopUpMenu 
         labels:(resources array:labels)
         selectors:selectors
-        accelerators:shorties
-
-    "Modified: 3.3.1997 / 14:53:36 / cg"
+        accelerators:shorties.
+    m subMenuAt:#othersMenu put:specialMenu.
+    ^ m
+
+    "Modified: 7.3.1997 / 19:33:14 / cg"
 ! !
 
 !BrowserView methodsFor:'class-method stuff'!
@@ -4637,6 +4651,17 @@
     classString := self classNameFromClassMethodString:string.
     selectorString := self selectorFromClassMethodString:string.
 
+    "/ reselected with control ?
+    self sensor ctrlDown ifTrue:[
+        selectorString = currentSelector ifTrue:[
+            "/ if there is a trace/break, remove it.
+            (currentMethod notNil and:[currentMethod isWrapped]) ifTrue:[
+                self methodRemoveBreakOrTrace.
+                ^ self
+            ]
+        ].
+    ].
+
     ((classString ~= 'Metaclass') and:[classString endsWith:' class']) ifTrue:[
         classString := classString copyWithoutLast:6 "copyTo:(classString size - 5)".
         meta := true.
@@ -4666,7 +4691,7 @@
 
     "Modified: 31.8.1995 / 11:56:02 / claus"
     "Modified: 17.6.1996 / 16:51:28 / stefan"
-    "Modified: 3.3.1997 / 15:11:44 / cg"
+    "Modified: 7.3.1997 / 19:35:22 / cg"
 !
 
 classNameFromClassMethodString:aString
@@ -9793,6 +9818,6 @@
 !BrowserView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Attic/BrwsrView.st,v 1.278 1997-03-07 18:27:04 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Attic/BrwsrView.st,v 1.279 1997-03-07 18:36:56 cg Exp $'
 ! !
 BrowserView initialize!