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.27 date: 2021/01/20 15:27:19
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.     

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  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.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Fri, 03 May 2024 23:24:19 GMT