|
Class: CodeView2 (in Tools)
Object
|
+--GraphicsMedium
|
+--DisplaySurface
|
+--SimpleView
|
+--Tools::CodeView2
- Package:
- stx:libtool
- Category:
- Interface-CodeView
- Version:
- rev:
1.253
date: 2019/08/11 09:50:51
- user: cg
- file: Tools__CodeView2.st directory: libtool
- module: stx stc-classLibrary: libtool
debugging
-
trace: aSelector
-
-
untrace: aSelector
-
-
untraceAll
-
examples
-
example1
-
initialization
-
initialize
-
Invoked at system start or when the class is dynamically loaded.
menu specs
-
debugMenu
-
This resource specification was automatically generated
by the MenuEditor of ST/X.
-
editMenu
-
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
MenuEditor new openOnClass:Tools::CodeView2 andSelector:#editMenu
(Menu new fromLiteralArrayEncoding:(Tools::CodeView2 editMenu)) startUp
|
-
editMenu_eclipseStyle
-
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
MenuEditor new openOnClass:Tools::CodeView2 andSelector:#editMenu_eclipseStyle
(Menu new fromLiteralArrayEncoding:(Tools::CodeView2 editMenu_eclipseStyle)) startUp
|
-
editMenu_stxStyle
-
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
MenuEditor new openOnClass:Tools::CodeView2 andSelector:#editMenu_stxStyle
(Menu new fromLiteralArrayEncoding:(Tools::CodeView2 editMenu_stxStyle)) startUp
|
accessing
-
acceptAction: aBlock
-
-
acceptEnabled: aBoolean
-
-
breakpoints
-
-
browser
-
-
codeAspect
-
-
codeAspect: aSymbol
-
tell the textView what is shown, so it can adjust the
syntaxhighlighter.
See SyntaxHighlighter codeAspectXXX for possible aspects.
-
compareAction: aBlock
-
-
compilerClass
-
-
compilerClass: aClass
-
-
contents
-
-
contents: aStringOrStringCollection
-
self update:#value with: aStringOrStringCollection from: textView model
-
contents: aStringOrStringCollection clear: clearPrevious
-
Set the contents. If clearPrevous is true, then
previous original text is cleared and set to given one.
(so the text is considered not modified)
-
currentParseNode
-
-
delegate: anObject
-
I want to see the events of the text and gutter view
-
diffMode
-
-
diffMode: aBoolean
-
-
editedLanguage: aProgrammingLanguage
-
-
editedMethodOrClass: aMethodOrClass
-
Sets the edited method or class (for code completion and highlighting)
-
font
-
(comment from inherited method)
return the current drawing font
-
font: aFont
-
(comment from inherited method)
set the font for drawing if it has changed.
This should be redefined in some widget to perform an automatic
redraw. See also: #basicFont:
-
mode
-
-
mode: aSymbol
-
is this the same as codeAspect ?
-
model
-
(comment from inherited method)
return nil - simpleViews have no model (only providing geometric)
-
model: newModel
-
-
modified
-
return true if text was modified
-
modified: aBoolean
-
set/clear the modified flag
-
services
-
-
services: aCollectionOfServices
-
allow setting of the services (instances);
this is needed for FileBrowser, to setup a codeView2 without Smalltalk-specific
services
-
servicesFromClient
-
-
showAcceptCancelBar
-
-
showGutter
-
-
simulatedSelf
-
-
synchronizeWith: aCodeView
-
-
unsynchronizeWith: aCodeView
-
accessing-behavior
-
expandTabsWhenUpdating
-
return the tab expansion behavior.
If true (the default), the list of lines as given via #list: or
due to a model update is processed and lines are replaced by lines with
tabs expanded.
This behavior is ok in 99.99% of all applications.
However, you may turn this off iff:
- you are certain, that no tabs are in the passed in list
- it is very expensive to process the list (for example, because the list
is defined by a virtual array, which computes the lines dynamically, on the fly).
One use where this flag should be turned off is in the hex-memory display,
which is able to simulate texts with millions of lines, but they are actually
simulated by generating the presented lines dynamically, as they are displayed.
Notice, that to totally prevent scanning og the whole text, you may have to turn off
other flags, such as checkineEndConventionWhenUpdating
-
expandTabsWhenUpdating: aBoolean
-
define the tab expansion behavior.
If true (the default), the list of lines as given via #list: or
due to a model update is processed and lines are replaced by lines with
tabs expanded.
This behavior is ok in 99.99% of all applications.
However, you may turn this off iff:
- you are certain, that no tabs are in the passed in list
- it is very expensive to process the list (for example, because the list
is defined by a virtual array, which computes the lines dynamically, on the fly).
One use where this flag should be turned off is in the hex-memory display,
which is able to simulate texts with millions of lines, but they are actually
simulated by generating the presented lines dynamically, as they are displayed.
Notice, that to totally prevent scanning og the whole text, you may have to turn off
other flags, such as checkineEndConventionWhenUpdating
-
readOnly: aBoolean
-
ignored here; present for compatibility with some textView subclasses,
so that UIPainter can handle it in its TextView spec (which contains a
readOnly field)
accessing-code component
-
klass
-
the class or the class of the method being shown.
-
klass: aClass
-
the class or the class of the method being shown
-
language
-
return the value in 'languageHolder', the programmingLanguage of the class
or method being shown.
BAD name: confusion with the national language.
why not call this 'programmingLanguage' ?
usage example(s):
No, no default language, please (for workspaces, etc.).
|
-
language: newValue
-
set the value in 'languageHolder', the programmingLanguage of the class
or method being shown.
BAD name: confusion with the national language.
why not call this 'programmingLanguage' ?
-
method
-
the method being shown, or nil
-
method: aMethod
-
the method being shown, or nil
accessing-look
-
backgroundColor: aColor
-
-
viewBackground: aColor
-
Modified (format): / 12-02-2017 / 12:58:44 / cg
aspects
-
browserHolder
-
-
browserHolder: aValueModel
-
-
classHolder
-
return/create the 'classHolder' value holder (automatically generated)
-
classHolder: aValueModel
-
set the 'classHolder' value holder (automatically generated)
-
currentBlockNodeHolder
-
return/create the 'currentBlockNodeHolder' value holder (automatically generated)
-
currentBlockNodeHolder: something
-
set the 'currentBlockNodeHolder' value holder (automatically generated)
-
currentParseNodeHolder
-
return/create the 'currentParseNodeHolder' value holder (automatically generated)
-
currentParseNodeHolder: something
-
set the 'currentParseNodeHolder' value holder (automatically generated)
-
languageHolder
-
cg: I don't like the smalltalk default here, because everyone who is not showing ST-code (expecco, filebrowser etc.)
-
languageHolder: aValueModel
-
set the 'languageHolder' value holder (automatically generated)
-
methodHolder
-
return/create the 'methodHolder' value holder (automatically generated)
-
methodHolder: aValueModel
-
set the 'methodHolder' value holder (automatically generated)
-
modeHolder
-
return/create the 'modeHolder' value holder (automatically generated)
-
modeHolder: something
-
set the 'modeHolder' value holder (automatically generated)
change & update
-
update: aspect with: param from: sender
-
languageHolder value class == Workflow::ExecutionEditorShellScript::Shell_Language ifTrue:[self halt].
-
updateGutter
-
-
updateGutterVisibility
-
-
updateScrollersViewBackground
-
this changes the scroller's background, to show the positions of
warnings, for easy location of interesting spots
channels
-
modifiedChannel
-
return the valueHolder holding true if text was modified
usage example(s):
-
modifiedChannel: aValueHolder
-
set the valueHolder holding true if text was modified
-
reallyModifiedChannel
-
return the valueHolder holding true if text was modified
-
reallyModifiedChannel: aValueModel
-
-
showAcceptCancelBarChannel
-
-
showAcceptCancelBarChannel: aValueHolder
-
set the valueHolder holding true if text was modified
-
showGutterChannel
-
-
showGutterChannel: aValueHolder
-
set the valueHolder holding true if text was modified
code services
-
browseMethod: method
-
-
browseMethod: method label: label
-
-
browseMethods: methods label: label
-
-
extractSelectorAndSelectedTextFrom: givenSelectedText
-
self windowGroup withWaitCursorDo:[
-
implementorsOf: selector
-
-
sendersOf: selector
-
not exact, but much faster (looks for symbol only, does not parse code for real send)
delegation
-
doesNotUnderstand: aMessage
-
(comment from inherited method)
this message is sent by the runtime system (VM) when
a message is not understood by some object (i.e. there
is no method for that selector). The original message has
been packed into aMessage (i.e. the receiver, selector and
any arguments) and the original receiver is then sent the
#doesNotUnderstand: message.
Here, we raise another signal which usually enters the debugger.
You can of course redefine #doesNotUnderstand: in your classes
to implement message delegation,
or handle the MessageNotUnderstood exception gracefully.
-
hasSelection
-
true if there us a text selection
delegation-drawing
-
drawLine: lineNo in: view atX: x y: yBaseline width: w height: hFont ascent: aFont from: startCol to: endColOrNil with: fg and: bg
-
See the comment in
CodeViewService>>drawLine:in:atX...
-
redrawVisibleLine: visLineNr
-
-
redrawVisibleLine: visLine col: colNr
-
-
redrawVisibleLine: visLine from: startCol
-
-
redrawVisibleLine: visLine from: startCol to: endCol
-
delegation-events
-
buttonMotion: button x: x y: y in: view
-
Delegates events to services. Answers true iff at least
one service handler method returns true. In that case,
the event is is NOT processes by the view.
-
buttonMultiPress: button x: x y: y in: view
-
Delegates events to services. Answers true iff at least
one service handler method returns true. In that case,
the event is is NOT processes by the view.
-
buttonPress: button x: x y: y in: view
-
Delegates events to services. Answers true iff at least
one service handler method returns true. In that case,
the event is is NOT processes by the view.
-
buttonRelease: button x: x y: y in: view
-
Delegates events to services. Answers true iff at least
one service handler method returns true. In that case,
the event is is NOT processes by the view.
-
highlightClassVariable: name
-
interface from browser (when a class var is selected)
-
highlightInstanceVariable: name
-
interface from browser (when an inst var is selected)
-
keyPress: key x: x y: y in: view
-
Delegates events to services. Answers true iff at least
one service handler method returns true. In that case,
the event is is NOT processes by the view.
-
keyRelease: key x: x y: y in: view
-
Delegates events to services. Answers true iff at least
one service handler method returns true. In that case,
the event is is NOT processes by the view.
-
linesDeletedFrom: start to: end
-
-
linesInsertedFrom: start to: end
-
-
linesModifiedFrom: start to: end
-
-
scrollDown: nLines in: view
-
my text view scrolled...
-
scrollTo: origin redraw: doRedraw in: view
-
my text view scrolled...
-
scrollUp: nLines in: view
-
my text view scrolled...
diff mode
-
recomputeDiff: view
-
initialize & release
-
defaultServices
-
used to call "CodeViewService availableServices",
-
initialize
-
Invoked when a new instance is created.
usage example(s):
usage example(s):
usage example(s):
-
initializeGutterView
-
-
initializeServices
-
only do it, if the services have not yet been defined by the user of this view
-
initializeTextView
-
Initialize textView. gutterView has to be already initialized!
-
release
-
(comment from inherited method)
remove all dependencies from the receiver
menu actions
-
accept
-
-
again
-
-
browseImplementorsOfIt
-
-
browseSendersOfIt
-
-
copySelection
-
-
copySelectionBox
-
-
cut
-
-
doIt
-
-
inspectIt
-
-
inspectSelectedSelector
-
-
inspectSyntaxElements
-
-
inspectView
-
-
pasteOrReplace
-
-
pasteOrReplaceFromHistory
-
-
printIt
-
-
profileIt
-
-
undo
-
menus-dynamic
-
debugMenu
-
-
editMenu
-
install the standard 'more' menu into my own menu
-
implementorsMenu
-
self windowGroup withWaitCursorDo:[
-
implementorsMenu: implementors selector: selector
-
implementors
-
sendersMenu
-
self windowGroup withWaitCursorDo:[
-
sendersMenu: senders selector: selector
-
-
servicesMenu
-
disabled, because this menu is now on the gutter,
private
-
codeCompletion
-
I found this code 3 times (CodeView2, NewSystemBrowser and DebugView) - smell?
-
reallyModified
-
check for modified code by comparing the source against
the codeView's contents.
That's the true modified value
(in case user undid his changes, and the displayed text is actually original)
-
showInfo: message
-
private-accessing
-
gutterView
-
-
syntaxElementSelection
-
-
syntaxElementSelection: anElement
-
anElement isNil ifTrue:[
-
syntaxElements
-
-
syntaxElements: aCollection
-
-
textView
-
-
textViewScroller
-
realization
-
disableAllServices
-
-
enableAllServices
-
-
postRealize
-
(comment from inherited method)
invoked after a view was realized.
Can be redefined in subclasses to perform delayed actions.
redrawing
-
flash
-
(comment from inherited method)
flash the view - fill it black, then white, finally
redraw completely.
Can be used to wakeup the user :-)
when problem or warning conditions arise.
Someone may redefine this to flash its contents (instead of black/white).
-
flash: aString
-
flash the view and show aString for a moment.
-
flash: messageOrNil withColor: flashColor
-
delegated to my textview
services
-
breakpointService
-
that one or nil
-
breakpointService: newServiceOrNil
-
set the breakpoint service
-
hasBreakpointService
-
-
hasBreakpoints
-
-
inspectBreakpoints
-
-
lintService
-
prefers the smallsense-lint service over others
-
registerService: aCodeViewService
-
-
servicesDo: aBlock
-
-
syntaxHighlightingService
-
that one or nil
-
unregisterAllServices
-
-
unregisterService: aCodeViewService
-
testing
-
hasOwnScrollbars
-
a hack for codeView2, which behaves like a TextView, but has its own
scrollbars embedded - sigh (an extra load one).
This allows for the UIBuilder to avoid creating an extra set around such
a view (as is the case with TextSpec with scrollbars when using CodeView2)
-
isCodeView2
-
(comment from inherited method)
codeview2 seems to require some extra hacks
-
isReadOnly
-
-
isTextView
-
(comment from inherited method)
Returns true, if the view displays text
AnnotationShowingScrollerBackground
GutterView
TextView
|