I would like to try out the latest version of QCodeEdit as I am programming a source editor for some custom language.
I started with a QTextEdit, added a QSyntaxHighlighter and wanted to have line-numbers and later syntax completion and icons on the line-number-gutter. I just started a own editor based on QTextEdit and using various Qt editors as a base how to implement a gutter etc.
Sadly I cannot compile your source as the *.pro file is missing in ./src/lib/qcodeedit/ or do you have a separate SVN repository for QCodeEdit?
You could look at the Katepart language definitions. Personally I dislike some of their syntax (some XML elements start with a lowercase char, some with uppercase...; some of the rules are overdefined, e.g. matching a decimal/hex/... can be done with a regexp instead too). But what you could add support for a context stack (or isn't this needed by your definitions?) and standard colors.
I would prefer the way Katepart solves this: They define some standard colors (keyword, comment, decimal, hex, float, ...). The user (programmer) can then set the colors and styles for these. In the syntax definition file you would allow to set a color or to use one of these placeholders. Then QCodeEdit would init the associated colors with some defaults the programmer can overwrite at any point with other values.
You could also extend this to letting the syntax definition define the placeholder-names and offer a way for the programmer to get a list of names and build a config dialog for the user to set the colors.
-Jens
Bookmarks