eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Tools::LintService':

Home

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

Class: LintService (in Tools)


Inheritance:

   Object
   |
   +--Tools::CodeViewService
      |
      +--Tools::LintService

Package:
stx:libtool
Category:
Interface-Lint
Version:
rev: 1.20 date: 2019/03/02 12:10:22
user: cg
file: Tools__LintService.st directory: libtool
module: stx stc-classLibrary: libtool

Description:


cg:

This service framework is a bit confusing; there is so much code duplication.
The distinction between LintService and Smallsense::SmalltalkLintService is
unclear to me.

If I understand this correctly, this is used to highlight the
output of the static analyzer (debug-button in browser), whereas Smallsense::SmalltalkLintService
displays the output from the just-in-time analysis in the codeview
Is this correct?
Why not merge those two - most of the functionality is the same.     


Class protocol:

accessing
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  annotationAtLine: lineNo
(comment from inherited method)
return the annotation for a given line - if any

o  annotations
code duplication with SmalltalkLintService >> annotations

o  syntaxHighlighter
(comment from inherited method)
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

aspects
o  ruleHolderFromApp
return/create the 'ruleHolderFromApp' value holder (automatically generated)

usage example(s):

ruleHolderFromApp := ValueHolder new.

usage example(s):

ruleHolderFromApp addDependent:self.

o  ruleHolderFromApp: something
set the 'ruleHolderFromApp' value holder (automatically generated)

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

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

private
o  syntaxHighlight: delayed

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  fetchLintRuleHolder
bad design; better idea would be to pass the lintRuleHolder back from the

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

testing
o  isLintService



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Fri, 29 Mar 2024 10:44:36 GMT