--- a/Tools__BreakpointService.st Wed Nov 19 18:47:24 2014 +0100
+++ b/Tools__BreakpointService.st Wed Nov 19 18:49:40 2014 +0100
@@ -86,6 +86,8 @@
!BreakpointService methodsFor:'accessing'!
breakpointAtLine:line
+ "return the breakpoint at line (may be disabled) or nil, if there is none"
+
|pos|
breakpoints isNil ifTrue:[^ nil].
@@ -311,7 +313,7 @@
!BreakpointService methodsFor:'event handling'!
-buttonPress:button x:x y:y in:view
+buttonMultiPress:button x:x y:y in:view
|lineNr|
view == gutterView ifTrue:[
@@ -331,6 +333,29 @@
"Modified: / 19-09-2011 / 14:41:00 / cg"
!
+buttonPress:button x:x y:y in:view
+ |lineNr|
+
+ "now disabled: need a double click (like in other editors);
+ also this allows toggling breakpoints even if there are ther service-annotations"
+
+ view == gutterView ifTrue:[
+ button == 1 ifTrue:[
+"/ lineNr := textView yVisibleToLineNr:y.
+"/ lineNr notNil ifTrue:[ self setOrToggleBreakpointAtLine:lineNr ].
+ ^ true.
+ ].
+ button == 3 ifTrue:[
+ ^ true.
+ ]
+ ].
+ ^ false
+
+ "Created: / 17-06-2011 / 13:05:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 28-06-2011 / 08:31:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 19-09-2011 / 14:41:00 / cg"
+!
+
keyPress:key x:x y:y in: view
"Handles an event in given view (a subview of codeView).
If the method returns true, it has eaten the event and it will not be processed
@@ -354,6 +379,7 @@
| breakpointsToRemove |
breakpoints isEmptyOrNil ifTrue:[^self].
+
breakpointsToRemove := Set new.
start to: end do:[:line |
| breakpointToRemove |
@@ -371,6 +397,7 @@
linesInsertedFrom: start to: end
breakpoints isEmptyOrNil ifTrue:[^self].
+
self moveBreakpointsAfterLine: start - 1 by: (end - start + 1)
"Created: / 06-07-2011 / 17:16:36 / jv"
@@ -378,7 +405,7 @@
!BreakpointService methodsFor:'help'!
-flyByHelpText
+flyByHelpTextAtLine:ignoredLineNr
|topView|
(self canCreateOrToggleBreakpointAtLine:nil) ifFalse:[
@@ -391,7 +418,7 @@
^ 'Cannot add breakpoint when modified. Please accept first.'
].
- ^ 'Click to toggle breakpoint. Shift-Click to toggle tracepoint.'
+ ^ 'Double Click to toggle breakpoint. Shift-Double-Click to toggle tracepoint.'
"Created: / 27-01-2012 / 14:04:52 / cg"
! !
@@ -671,14 +698,14 @@
!BreakpointService class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointService.st,v 1.53 2014-06-23 08:59:28 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointService.st,v 1.54 2014-11-19 17:49:40 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointService.st,v 1.53 2014-06-23 08:59:28 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointService.st,v 1.54 2014-11-19 17:49:40 cg Exp $'
!
version_SVN
- ^ '$Id: Tools__BreakpointService.st,v 1.53 2014-06-23 08:59:28 cg Exp $'
+ ^ '$Id: Tools__BreakpointService.st,v 1.54 2014-11-19 17:49:40 cg Exp $'
! !