Lexer madness and other things

CodeLite installation/troubleshooting forum
atari_eric
CodeLite Curious
Posts: 1
Joined: Sat Sep 04, 2010 5:47 am
Genuine User: Yes
IDE Question: C++
Contact:

Lexer madness and other things

Post by atari_eric » Sat Sep 04, 2010 5:58 am

First, what type of organization requires I enter unposted insider information in order to register on their public forums? So much for "open source"...

Second, and most important, CodeLite switched how it handles lexers, and now there is no way to switch lexers outside of the Default and Dark versions, even though there are multiple (I assume outdated) posts/wiki pages stating otherwise. I spent considerable time setting up my syntax highlighting just how I want it, and your update just threw all that away. Why do the developers do that? Don't they use the product, too? Doesn't it annoy them when it breaks?

User avatar
eranif
CodeLite Plugin
Posts: 6089
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Lexer madness and other things

Post by eranif » Sat Sep 04, 2010 9:40 am

atari_eric wrote:First, what type of organization requires I enter unposted insider information in order to register on their public forums?
http://codelite.org/forum/viewtopic.php ... ster#p3892
atari_eric wrote:So much for "open source"...
No one said that the forum is "Open Sourced" only codelite's source code is, which you can obtain and modify without registering the forum
atari_eric wrote:Why do the developers do that?
There were reasons for that
atari_eric wrote:just threw all that away
It is still there, it was not thrown away
atari_eric wrote:Don't they use the product, too?
ofc I do ;)
atari_eric wrote:Doesn't it annoy them when it breaks?
Not really, since I know how to copy my changes to the new setup.

Now, allow me to explain what changed and how you can copy back your changes:

- The previous method was directory based.
- The new method is on file base - which is a lot faster and easier to maintain (development wise)
- In the previous method each theme had had a directory (e.g. 'BlackTheme') which contained about ~15 XML files, each XML file represents a single lexer.
In the new methods, the entire theme is contained in a single XML file. The XML format of each lexer was kept, the only thing modified is this:

New XML structure:

Code: Select all

<Lexers Theme="Dark Theme">
<Lexer Name="Diff" Id="16">
</Lexer>
</Lexers>
So, the part between <Lexer></Lexer> is equal to the content of a single old lexer's file.
So if you defined a new theme, you can create your own XML file and copy the contents of all your lexers into it.

Copy this file to codelite's installation directory (since you failed to specify your OS, I will assume that you are using Windows) C:\Program Files\CodeLite\lexers and restart codelite.

To get an idea of how the new XML file should look like, open one of the existing ones lexers_default.xml or the lexers_black.xml

Eran
Make sure you have read the HOW TO POST thread

fanhe0513
CodeLite Enthusiast
Posts: 39
Joined: Sat Aug 21, 2010 7:32 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Lexer madness and other things

Post by fanhe0513 » Tue Sep 07, 2010 9:36 am

I spent considerable time setting up my syntax highlighting just how I want it, and your update just threw all that away. Why do the developers do that? Don't they use the product, too? Doesn't it annoy them when it breaks?
me too.
Now I am afraid of updating!

User avatar
eranif
CodeLite Plugin
Posts: 6089
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Lexer madness and other things

Post by eranif » Tue Sep 07, 2010 10:46 am

Restoring your syntax highlight (without redefining everything again) is an easy task, if you wish to do so, please let me know.
Eran
Make sure you have read the HOW TO POST thread

timbuctoo
CodeLite Curious
Posts: 1
Joined: Sat Sep 18, 2010 9:27 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Lexer madness and other things

Post by timbuctoo » Sat Sep 18, 2010 9:42 pm

Eran, it's easy for you to say/do this being the developer. :D

I just lost my syntax highlight settings after upgradation, and it's really frustrating to go through this everytime! :cry:

Why can't the process of re-using the syntax highlight settings be properly documented?

Here's what happened (yet again) with the CodeLite installation on Windows XP

1. Backed up the lexer files under the installation directory 'C:\Program Files\CodeLite\lexers\Default'
2. Upgraded to v2.7.0.4375 (installed over) from an earlier version I don't remember now
3. Overwrote the files under the same path in Step 1 with the backed up files

My old syntax highlight settings did not take effect. What do I do now? I don't want to go through hell again! :evil:

Should all configuration files not ideally be under 'C:\Documents and Settings\jayenj\Application Data\CodeLite'? As far as I know, this is the standard way Windows programs work - Keeping program files in 'C:\Program Files' and the configuration under the former path.

User avatar
eranif
CodeLite Plugin
Posts: 6089
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Lexer madness and other things

Post by eranif » Sat Sep 18, 2010 10:37 pm

timbuctoo wrote:I just lost my syntax highlight settings after upgradation, and it's really frustrating to go through this everytime!
this is simply not true. the syntax highlight settings were not modified by codelite for a long time (up until this revision)
timbuctoo wrote:Should all configuration files not ideally be under 'C:\Documents and Settings\jayenj\Application Data\CodeLite'? As far as I know, this is the standard way Windows programs work - Keeping program files in 'C:\Program Files' and the configuration under the former path
this is one of the changes done in 2.7.0 version (it is clearly stated in the release notes)

To restore your settings try to follow these instructions:
http://codelite.org/forum/posting.php?m ... 080#pr4860

Eran
-
Make sure you have read the HOW TO POST thread

Post Reply