eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Tools::BreakpointService':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: BreakpointService (in Tools)


Inheritance:

   Object
   |
   +--Tools::CodeViewService
      |
      +--Tools::BreakpointService

Package:
stx:libtool
Category:
Interface-CodeView
Version:
rev: 1.113 date: 2024/01/30 14:10:01
user: stefan
file: Tools__BreakpointService.st directory: libtool
module: stx stc-classLibrary: libtool

Description:


somewhat badly designed for non-reusability:
   I should not care for recompiling methods here,
   but instead delegate this task to a breakPointInstaller.
   The way it is currently designed makes it hard to reuse this
   component in non-smalltalk setups (i.e. groovy-, node- or C editors).

Fiddling around here breaks it almost for sure, as this is highly obfuscated code.   

copyright

COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague All Rights Reserved Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Class protocol:

accessing
o  failedToSetBreakpointNotification

o  label
Answers a short label - for UI

testing
o  isUsefulFor: aCodeView
this filters useful services.
Redefined to return true for myself - not for subclasses


Instance protocol:

accessing
o  breakpointAtLine: line
return the breakpoint at line (may be disabled) or nil, if there is none

o  breakpoints

o  firstBreakpointAtLine: line
return the breakpoint at line (may be disabled) or nil, if there is none

o  removeAllBreakpoints

o  setBreakpointAtLine: line
unconditionally set a breakpoint (called via double click)

o  setOrToggleBreakpointAtLine: line
toggle a breakpoint (called via single click)

o  setOrToggleBreakpointAtLine: line toggle: doToggleBoolean
set (via double click) or toggle (via single click) a breakpoint

change & update
o  update: aspect with: param from: sender
ATTENTION: I thought that fetching the methodHolder once in initialize would

o  updateBreakPointsFor: aMethod
Transcript show:'update breakpoints for method: '; showCR:aMethod.

o  updateCurrentMethod
codeView methodHolder class == BlockValue ifTrue:[self breakPoint:#cg].

event handling
o  buttonMultiPress: button x: x y: y in: view
cg:huch - why that?

o  buttonPress: button 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
by the view or other services.
Notice, that this is called both for events in the gutter AND for events in the text.

o  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
by the view.

o  linesDeletedFrom: start to: end

o  linesInsertedFrom: start to: end

o  setBreakpointAtX: x y: y

o  setOrToggleBreakpointAtX: x y: y

help
o  basicHelpTextAtLine: ignoredLineNr

o  helpTextAtLine: ignoredLineNr

initialization
o  fetchMethodHolder
redefinable in subclasses, which do not have a codeView2/methodHolder

o  initialize
(comment from inherited method)
just to ignore initialize to objects which do not need it

private
o  fixupBreakpointPositions
computes the character positions of all line breakpoints

o  moveBreakpointsAfterLine: line by: delta
self assert:(breakpoints anySatisfy:[:b | b line < 0]) not.

o  recompile
recompile the current method for changed breakpoints

o  recompileMethod: oldMethod
recompile oldMethod for changed breakpoints

o  setBreakpoints: aCollection
ensure that breakpoints is a list and that I depend on it

o  sortBreakpoints
breakpoints are sorted by line
(or even by position within a line, but those are currently not supported by the GUI)

queries
o  canCreateOrToggleBreakpointAtLine: lineOrNilForAnywhere
is it possible to place a breakpoint here and now?

o  hasBreakpoints

o  singleClickToToggle
not yet working correctly: must ignore double clicks then,

redrawing
o  drawLine: lineNo in: view atX: x y: yBaseline width: w height: hFont ascent: aFont from: startCol to: endColOrNil with: fg and: bg
Called by both gutterView and textView (well, not yet) to
allow services to draw custom things on text view.
Ask JV what the args means if unsure (I'm lazy to document
them, now it is just an experiment...)

registering
o  registerIn: aCodeView
(comment from inherited method)
Installs myself in aCodeView

testing
o  isBreakpointService


Private classes:

    FailedToSetBreakpointNotification


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 06:46:36 GMT