eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Tools::CodeViewService':

Home

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

Class: CodeViewService (in Tools)


Inheritance:

   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

Description:


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:]

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  availableServices
Tools::CodeViewService availableServices

o  label
Answers a short label - for UI

o  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

o  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
o  new
return an initialized instance

queries
o  allRequiredServicesAvailable

o  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
o  registerIn: aCodeView

testing
o  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.

o  isAvailable
answer true, if this service is available and should be installed by default.

o  isAvailableFor: applicationClass
Returns true if given service may be used in
given application class.


Instance protocol:

accessing
o  annotationAtLine: lineNr
return the annotation for a given line - if any

o  annotations
return my annotations - if any

o  application

o  enabled

o  enabled: aBoolean

o  label

o  resources

o  service: serviceClassName

o  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
o  update: aspect with: param from: sender
Get updated whenever something changes in the code view.
Subclasses may override this

event handling
o  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.

o  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.

o  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.

o  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.

o  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.

o  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.

o  linesDeletedFrom: start to: end

o  linesInsertedFrom: start to: end

o  linesModifiedFrom: start to: end

o  viewRealized
Sent when a code view has been realized. May be overriden
by subclasses

help
o  helpTextAtLine: aLineNr

misc
o  highlightClassVariable: name
intentionally a noop here - redefine in concrete services

o  highlightInstanceVariable: name
intentionally a noop here - redefine in concrete services

o  highlightVariableNamed: name
intentionally a noop here - redefine in concrete services

o  showInfo: aString

redrawing
o  drawAnnotationIcon: icon atX: x y: y width: w height: h ascent: fontAscent

o  drawAnnotationInLine: lineNo in: view atX: x y: yBaseline width: w height: hFont ascent: fontAscent from: startCol to: endColOrNil with: fg and: bg
common code

o  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...)

o  redrawLine: line

registering
o  registerIn: aCodeView
Installs myself in aCodeView

o  unregister
Uninstall myself from my codeView

testing
o  isBreakpointService

o  isCodeCompletionService

o  isCodeHighlightingService

o  isCodeNavigationService

o  isEditService

o  isEnabled

o  isLintService

o  isMergeService



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 04:24:18 GMT