How to create temporary (red-framed) ranges in text editor
this feature is available for example in the xml editor after code completion. Several ranges in the newly created element are framed with a red line, and navigation in the editor is somehow constrained by these ranges.
Does anyone know how to produce these special ranges?
Please sign in to leave a comment.
Hello Dan,
Editor.getMarkupModel().addRangeHighlighter() with TextAttributes.effectType
= EFFECT_BORDER
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Great! Thanks!
Dmitry Jemerov wrote:
>> this feature is available for example in the xml editor after code
>> completion. Several ranges in the newly created element are framed
>> with a red line, and navigation in the editor is somehow constrained
>> by these ranges.
>>
>> Does anyone know how to produce these special ranges?
From what I remember when I coded up the SyncEdit plugin, this only
provides the graphical behaviour. I had to override the existing cursor
movement actions to implement the constraints you mention.
Of course there may be a better way to implement these constraints...
N.