Well, for a few days now i'm trying to acomplish this:

http://wiki.lazarus.freepascal.org/IDE_Development#Translated_compiler_messages

I already have a new TOutputFilter working, but unfortunatly just tested on win32.
I will need some help to test this in other plataforms.
Some problems appeared during this modification that i want to share.
Any comments and suggestions are welcomed.

- Using TBaseCompilerOptions.CompilerMessages to locate messages by its number.
 Problems:
- Loading Errors and Fatal errors from compiler message file (errore.msg).
      Needed to change CompilerOptions.pp to load 'E' and 'F' types.
- The default message table is a problem. It is hardcoded and it need the types 'E' and 'F' of
messages.
The compiler messages file is growing, so its a matter to update this code every time we have new compiler messages. IMHO, the default messages should be loaded from disk
(errore.msg).
    - Now on CompilerOptions must be valid to TOutputFilter work.
- The Project Options->Compiler Options->Messages should be tunned to not present 'E'
and 'F' types.

- Compiler.pp should include "-vq" option in cmdline.

Other problem is regarding to build lazarus from IDE. Since BuildLazDialog uses external tools to create Lazarus, no CompilerOptions is assigned at that time. So TOutputFilter not
work properly. As a work around, its displaying all messages.

At this point, i didn´t touched the QuickFixItems.

If anyone wants the code to test or evaluate, please just ask and I´ll send it.
Of course, if anyone has more ideas in this subject, feel free to argue.


Marcelo.


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to