Page 1 of 1

Bugs in new compiler annotations

Posted: Fri Sep 04, 2009 11:33 am
by marfi
Hi,
I've compiled the latest SVN code (rev 2926) today and realized the way of displaying of compiler's errors and warnings has changed. It looks good but there are lot of bugs in the new system. The main problems deal with corrupted colours, fonts and texts in the annotation rectangles. Please, see attached screenshots. Moreover, In my opinion a height of the annotation frame is too big - one line height could be enough. Next problem is if the annotation frame exceeds editor's width then there is no way how to scroll it/make it fully visible. Maybe it would be nice to have also old warning/errors markers available in the CL on option.

Best regards
Michal

Re: Bugs in new compiler annotations

Posted: Fri Sep 04, 2009 11:51 am
by eranif
Yes, I am aware that there are bugs on Linux (on Windows it works flawlessly) - I am still trying to understand whether it is a problem in Scintilla itself and whether I can workaround it.
It would be best for you (for the moment) to revert to codelite prior to this change, the code is kept here:

Code: Select all

svn co https://codelite.svn.sourceforge.net/svnroot/codelite/branches/codelite_03092009/ codelite_no_annotations/
PS: I know that you are using Qt, and I wondered whether you got a chance to play with the new Qmake plugin. I wrote some docs on it here:
http://codelite.org/LiteEditor/QmakePlugin

Eran

Re: Bugs in new compiler annotations

Posted: Fri Sep 04, 2009 2:18 pm
by marfi
Hi Eran,
thank you for the advices. My most favorite toolkit is wxWidgets (and I don't want to change my preferences in the near future ;) ) but definitely I'd like to learn Qt as well so I'll try your new plugin. The main reason I didn't like Qt is need of MOC and qmake (the second reason is that an application with native OS widgets and behaviour is in my opinion better than skinned application with native look only...). I guess your plugin simplifies a build process so I'm really curious how it works... :)

Best regards
Michal

Re: Bugs in new compiler annotations

Posted: Fri Sep 04, 2009 2:27 pm
by eranif
I actually found out the reason for this 'color / strange chars' problem on Linux.

It appears that Scintilla does not deals well with non-ascii characters (and it seems that gcc produces many of them along the way) - the best solution is to "clean" the tooltip from non printable characters ("isprint()") before setting it in the annotation - I am currently testing it and it seems to fix this bug, I will let you know when I will commit it

The only problem which I dont seem to get a solution atm, is when an annotation is located at teh bottom of the file and the editor does not allow you to scroll down
I will see what can be done here as well.

Eran

Re: Bugs in new compiler annotations

Posted: Fri Sep 04, 2009 2:56 pm
by eranif
Hi Marfi,

I will appreciate if you can checkout the SVN trunk and try it again now after some modifications I made.

Thanks!
Eran

Re: Bugs in new compiler annotations

Posted: Fri Sep 04, 2009 4:26 pm
by marfi
Now (in rev 2930) it works flawlessly! Thank you! The only problem persists in a case when one warning/error is referenced from several locations. In this case the annotation frame contains as much lines with the same content as appeared in the compiler's output pane. You can see this bug/feature in the attached screenshot. You could also slightly tune used colours because it is quite difficult to read a yellow text on a pink background (in case of warning message).

Btw, I really appreciate the change marker. It is a great feature!

Best regards
Michal

Re: Bugs in new compiler annotations

Posted: Fri Sep 04, 2009 4:37 pm
by eranif
marfi wrote:You could also slightly tune used colours because it is quite difficult to read a yellow text on a pink background (in case of warning message).
The colours are configurable... and has been for a while now :)

you adjust them from:
- 'settings -> build settings -> build output appearance..'
- or from the 'build' tab, there is a vertical toolbar with colour palette which will take you to the exact dialog as above.

marfi wrote:The only problem persists in a case when one warning/error is referenced from several locations. In this case the annotation frame contains as much lines with the same content as appeared in the compiler's output pane. You can see this bug/feature in the attached screenshot
I noticed it too, and I might tune the tooltip to remove similar lines

Will let you know if it is ready
Eran

Re: Bugs in new compiler annotations

Posted: Fri Sep 04, 2009 4:54 pm
by eranif
It seems to be fixed now.

You can see the screenshot below
Eran

Re: Bugs in new compiler annotations

Posted: Fri Sep 04, 2009 5:16 pm
by marfi
Excelent! The fix works also for me. Btw, the first warning from your screenshot should be in gray as well, right? ;)
M.

Re: Bugs in new compiler annotations

Posted: Fri Sep 04, 2009 6:21 pm
by eranif
Yes, seems like a regex problem :P

Will fix it as well

Eran