|
Class: CodeViewService (in Tools)
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>
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:]
accessing
-
availableServices
-
Tools::CodeViewService availableServices
-
label
-
Answers a short label - for UI
-
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
-
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
-
new
-
return an initialized instance
queries
-
allRequiredServicesAvailable
-
-
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
-
registerIn: aCodeView
-
testing
-
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.
-
isAvailable
-
-
isAvailableFor: applicationClass
-
Returns true if given service may be used in
given application class.
accessing
-
annotationAtLine: lineNr
-
return the annotation for a given line - if any
-
annotations
-
return my annotations - if any
-
application
-
-
enabled
-
-
enabled: aBoolean
-
-
label
-
-
service: serviceClassName
-
-
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
-
update: aspect with: param from: sender
-
Get updated whenever something changes in the code view.
Subclasses may override this
event handling
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
linesDeletedFrom: start to: end
-
-
linesInsertedFrom: start to: end
-
-
linesModifiedFrom: start to: end
-
-
viewRealized
-
Sent when a code view has been realized. May be overriden
by subclasses
help
-
helpTextAtLine: aLineNr
-
misc
-
highlightClassVariable: name
-
intentionally a noop here - redefine in concrete services
-
highlightInstanceVariable: name
-
intentionally a noop here - redefine in concrete services
-
showInfo: aString
-
redrawing
-
drawAnnotationIcon: icon atX: x y: y width: w height: h ascent: fontAscent
-
-
drawAnnotationInLine: lineNo in: view atX: x y: yBaseline width: w height: hFont ascent: fontAscent from: startCol to: endColOrNil with: fg and: bg
-
common code
-
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...)
-
redrawLine: line
-
registering
-
registerIn: aCodeView
-
Installs myself in aCodeView
-
unregister
-
Uninstall myself from my codeView
testing
-
isBreakpointService
-
-
isEnabled
-
-
isLintService
-
|