Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: dmoore on September 07, 2008, 05:41:32 pm

Title: lexer list
Post by: dmoore on September 07, 2008, 05:41:32 pm
does someone know the easiest way to programatically obtain a complete list of available lexers (name and id) from a plugin? I'm working on a syntax checking plugin and need to be able to set up a custom command for each lexer (I'd prefer not to hard code the list).

btw, you can see the current state of the plugin by checking out the source (works for python and maybe php if they are in your path):

svn checkout http://svn.berlios.de/svnroot/repos/cbilplugin/trunk/codecheck

(rick: i realize this is prob not what you had in mind)
Title: Re: lexer list
Post by: danselmi on September 17, 2008, 10:21:24 pm
Hi

To find all HighlightLanguages I used:
Code
EditorColourSet::GetAllHighlightLanguages 
PS: One lexer is used from different HighlightLanguages. So I recommend you to
check for the HighlightLanguage and not the lexer.
(for example the CPP lexer is also used for script languages)



regards daniel