|
Class: LintService (in Tools)
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
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.
copyrightCOPYRIGHT (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.
accessing
-
label
-
Answers a short label - for UI
testing
-
isUsefulFor: aCodeView
-
this filters useful services.
Redefined to return true for myself - not for subclasses
accessing
-
annotationAtLine: lineNo
-
(comment from inherited method)
return the annotation for a given line - if any
-
annotations
-
code duplication with SmalltalkLintService >> annotations
-
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
-
ruleHolderFromApp
-
return/create the 'ruleHolderFromApp' value holder (automatically generated)
Usage example(s):
ruleHolderFromApp := ValueHolder new.
|
Usage example(s):
ruleHolderFromApp addDependent:self.
|
-
ruleHolderFromApp: something
-
set the 'ruleHolderFromApp' value holder (automatically generated)
change & update
-
update: aspect with: param from: sender
-
(comment from inherited method)
Get updated whenever something changes in the code view.
Subclasses may override this
initialization
-
initialize
-
(comment from inherited method)
just to ignore initialize to objects which do not need it
private
-
syntaxHighlight: delayed
-
redrawing
-
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
-
fetchLintRuleHolder
-
bad design; better idea would be to pass the lintRuleHolder back from the
-
registerIn: aCodeView
-
(comment from inherited method)
Installs myself in aCodeView
testing
-
isLintService
-
|