|
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.35
date: 2023/09/09 19:06:53
- user: stefan
- file: Tools__CodeViewService.st directory: libtool
- module: stx stc-classLibrary: libtool
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:]
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
-
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
-
answer true, if this service is available and should be installed by default.
-
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
-
-
resources
-
-
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 or other services.
Notice, that this is called both for events in the gutter AND for events in the text.
-
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
-
highlightVariableNamed: 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
-
-
isCodeCompletionService
-
-
isCodeHighlightingService
-
-
isCodeNavigationService
-
-
isEditService
-
-
isEnabled
-
-
isLintService
-
-
isMergeService
-
|