Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird syntax highlighting after file editing #6

Closed
mmazi opened this issue Nov 11, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@mmazi
Copy link
Contributor

commented Nov 11, 2013

This happens especially often with some comments.

There are also some exceptions int the highlighter (see below).

I suspect the current CeylonLexerAdapter might not support incremental invocation; see http://confluence.jetbrains.com/display/IDEADEV/Developing+Custom+Language+Plugins+for+IntelliJ+IDEA#DevelopingCustomLanguagePluginsforIntelliJIDEA-ImplementingaLexer :

   The lexer used for syntax highlighting can be invoked incrementally to process only the changed part of a file, whereas lexers used in other contexts are always called to process an entire file, or a complete language construction embedded in a file in a different language.

image

[ 72620] ERROR - pi.editor.ex.util.SegmentArray - Error shifting segments: myStarts[218] = -2, myEnds[218] = 3
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:113)
at com.intellij.openapi.editor.ex.util.SegmentArray.shiftSegments(SegmentArray.java:140)
at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.documentChanged(LexerEditorHighlighter.java:259)

@ghost ghost assigned mmazi Nov 11, 2013

@mmazi

This comment has been minimized.

Copy link
Contributor Author

commented Nov 11, 2013

I'll try to use a Flex-based lexer just for syntax highlighting.

mmazi added a commit to mmazi/ceylon-ide-intellij that referenced this issue Nov 11, 2013

@mmazi

This comment has been minimized.

Copy link
Contributor Author

commented Nov 11, 2013

Using a JFlex lexer here was easier than I'd thought.

The lexer needs to be updated to support the backtick syntax though - #7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.