Community
Participate
Working Groups
Build Identifier: Version 0.3M1 The syntax highlighting for Javascript, Java and CSS which is implemented by examples.textview.TextStyler in textStyles.js provides a style "line_caret" for highlighting the line of the caret. It would be nice if the orion.editor.TextMateStyler (textMateStyler.js) would also support this feature to have consistent behavior for all text types. Additionally it would be great to (optionally) show the line caret style not only in the text document but also in the ruler columns. Reproducible: Always
(In reply to comment #0) > Build Identifier: Version 0.3M1 > > The syntax highlighting for Javascript, Java and CSS which is implemented by > examples.textview.TextStyler in textStyles.js provides a style "line_caret" for > highlighting the line of the caret. > It would be nice if the orion.editor.TextMateStyler (textMateStyler.js) would > also support this feature to have consistent behavior for all text types. IMO the we should move the caret line styler out of examples.textview.TextStyler so we can be consumed by the editor independently of the syntax highlight that is used. > Additionally it would be great to (optionally) show the line caret style not > only in the text document but also in the ruler columns. This is a different question, this should be easy to implement using annotation.
I am implementing this support in editor.js and making it a annotation so that it could show in the overview ruler.
Fixed http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=437ba88ca7edf7841f5deedb2037f9ded972927b This patch includes fixes to somewhat unrelated problems we found while turning the caret line indicator into an annotation. The main problem is that the binary search done in annotation model cannot be used to find annotations that intersect with a given range because the annotation ranges can overlap. For now, we are doing a linear search in those cases. We will investigate interval search trees.
Mihai, note that we turn off the caret line indicator done by the sample text styler (textStyler.js). We did not remove the support from the styler. You can still enable it by calling TextStyler.setHighlightCaretLine(true). You might need this if you are not using editor.js.
(In reply to comment #4) > Mihai, note that we turn off the caret line indicator done by the sample text > styler (textStyler.js). We did not remove the support from the styler. You can > still enable it by calling TextStyler.setHighlightCaretLine(true). You might > need this if you are not using editor.js. Thanks for your notification and especially thank you for not removing the code from the textStyler.js! I still haven't added editor.js to our integration, because it seems the updating the existing code is sufficiently involved (wrt. regressions, test failures, etc). We still need more stabilization before we can move to the editor.js integration.