eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Tools::CodeViewService':

Home

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

Class: CodeViewService (in Tools)


Inheritance:

   Object
   |
   +--Tools::CodeViewService
      |
      +--Tools::BackgroundSourceProcessingService
      |
      +--Tools::BreakpointService
      |
      +--Tools::CodeCompletionService
      |
      +--Tools::CodeNavigationService
      |
      +--Tools::LintService
      |
      +--Tools::TextDiff3Tool::MergeService

Package:
stx:libtool
Category:
Interface-CodeView
Version:
rev: 1.26 date: 2019/07/31 15:48:39
user: cg
file: Tools__CodeViewService.st directory: libtool
module: stx stc-classLibrary: libtool
Author:
Jan Vrany <jan.vrany@fit.cvut.cz>

Description:


A base class for CodeView2 services. A 'service' is an extension
mechanism for CodeView2. Once plugged in, service gets informed 
about changes in the text and it also may intercept events.

See concrete subclasses how to use and implement code services.


[instance variables:]

[class variables:]


Related information:



Class protocol:

accessing
o  availableServices
Tools::CodeViewService availableServices

o  label
Answers a short label - for UI

o  priority
Answers a priority of the service. Services with higher priority
will get the event notification before ones with lower priority.
Therefore, a lower-priority service might not get the event if high
priority service processes it

o  requiredServices
Returns a list of services required for myself to work
correctly. A list should contain class names of the services
(as not all services may be loaded in)

instance creation
o  new
return an initialized instance

queries
o  allRequiredServicesAvailable

o  isUsefulFor: aCodeView
this filters useful services.
must be redefined to return true in subclasses (but each class must do it only
for itself - not for subclasses

registering
o  registerIn: aCodeView

testing
o  isAbstract
(comment from inherited method)
Return if this class is an abstract class.
True is returned for Object here; false for subclasses.
Abstract subclasses must redefine this again.

o  isAvailable

o  isAvailableFor: applicationClass
Returns true if given service may be used in
given application class.


Instance protocol:

accessing
o  annotationAtLine: lineNr
return the annotation for a given line - if any

o  annotations
return my annotations - if any

o  application

o  enabled

o  enabled: aBoolean

o  label

o  service: serviceClassName

o  syntaxHighlighter
Returns a syntax highligter class or nil. The highlighting
process gather all syntaxHighlighterClasses from all services
and then use them one by one to highlight the text. Individual
services may override this method to provide additional
highliging of the source code

change & update
o  update: aspect with: param from: sender
Get updated whenever something changes in the code view.
Subclasses may override this

event handling
o  buttonMotion: 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.

o  buttonMultiPress: 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.

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.

o  buttonRelease: 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.

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  keyRelease: 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  linesModifiedFrom: start to: end

o  viewRealized
Sent when a code view has been realized. May be overriden
by subclasses

help
o  helpTextAtLine: aLineNr

misc
o  highlightClassVariable: name
intentionally a noop here - redefine in concrete services

o  highlightInstanceVariable: name
intentionally a noop here - redefine in concrete services

o  showInfo: aString

redrawing
o  drawAnnotationIcon: icon atX: x y: y width: w height: h ascent: fontAscent

o  drawAnnotationInLine: lineNo in: view atX: x y: yBaseline width: w height: hFont ascent: fontAscent from: startCol to: endColOrNil with: fg and: bg
common code

o  drawLine: lineNo in: view atX: x y: y width: w height: hFont ascent: fontAscent 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...)

o  redrawLine: line

registering
o  registerIn: aCodeView
Installs myself in aCodeView

o  unregister
Uninstall myself from my codeView

testing
o  isBreakpointService

o  isEnabled

o  isLintService



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Wed, 24 Apr 2024 12:18:54 GMT