FaqCPlusPlusLocalizedToolset

How can I configure the NetBeans IDE to work correctly with localized tools?

Here are some steps to fix NetBeans IDE to work with localized GNU toolset. This requires NetBeans 6.7.

  1. Make NetBeans to create shadow copies of existing toolchain descriptions as described in Using the C/C++ Tool Collection Descriptor.
  2. If you want preserve old toolchain description then create a copy of it's file (for example GNU_ru.xml).
  3. Open description file with editor and change 'display' attribute value ("GNU Compiler Collection Rus") and 'name' attribute value("GNU_ru") - this one will be displayed in c/c++ options dialog during default toolchain selection.
  4. Move on to the 'scanner' tag - it hosts regex patterns to match make and gcc output - change these correspondingly to your environment keeping in mind that char classes as
    [AZaZ]
    should be changed to something more suitable for unicode chars (e.g. {\w}).
  5. Save the file, restart NetBeans IDE and choose newly created toolchain description from c/c++ options dialog.

Everything should work now - you can check this by compiling something with errors or warnings and see that these lines rendered as code references.

Example:

Initial description:

<error language="c,cpp,fortran,assembler" pattern="^([[AZAZ | a-zA-Z]]:[[^:$ | ^:$]]*|[[^:$ | ^:$]]*):([[09 | 0-9]]+)[[\.: | \.:]]([[^:$ | ^:$]]*):([^$]*)"/>
<error language="c,cpp,fortran,assembler" pattern="^([[^:$ | ^:$]]*):([[09 | 0-9]]+): ([AZAZ]*):*.*"/>
<error language="c,cpp,fortran,assembler" pattern="^([[^\($ | ^\($]]*)\(([[09 | 0-9]]+)\): ([[^:$ | ^:$]]*): ([^$]*)"/>
<error language="c,cpp,fortran,assembler" pattern="^([[^\($ | ^\($]]*)\(([[09 | 0-9]]+)\) : ([[^:$ | ^:$]]*):([^$]*)"/>
<stack_header pattern="^In file included from ([[AZ | A-Z]]:[[^:$ | ^:$]]*|[[^:$ | ^:$]]*):([^:^,]*)"/>
<stack_next pattern="^                 from ([[AZ | A-Z]]:[[^:$ | ^:$]]*|[[^:$ | ^:$]]*):([^:^,]*)"/>
<enter_directory pattern="[[Gd | gd]]?make(?:\.exe)?(?:\[[([09 | ([0-9]]+)\])?: Entering[[\w+\s+ | \w+\s+]]+`([^]*)'"/>
<change_directory pattern="cd\s+([[\S | \S]]+)[\s;]"/>
<leave_directory pattern="[[Gd | gd]]?make(?:\.exe)?(?:\[[([09 | ([0-9]]+)\])?: Leaving[[\w+\s+ | \w+\s+]]+`([^]*)'"/>

Russian variant:

<error language="c,cpp,fortran,assembler" pattern="^([[AZAZ | a-zA-Z]]:[[^:$ | ^:$]]*|[[^:$ | ^:$]]*):([[09 | 0-9]]+)[[\.: | \.:]]([[^:$ | ^:$]]*):([^$]*)"/>
<error language="c,cpp,fortran,assembler" pattern="^([[^:$ | ^:$]]*):([[09 | 0-9]]+): ([\w]*):*.*"/>
<error language="c,cpp,fortran,assembler" pattern="^([[^\($ | ^\($]]*)\(([[09 | 0-9]]+)\): ([[^:$ | ^:$]]*): ([^$]*)"/>
<error language="c,cpp,fortran,assembler" pattern="^([[^\($ | ^\($]]*)\(([[09 | 0-9]]+)\) : ([[^:$ | ^:$]]*):([^$]*)"/>
<stack_header pattern="^In file included from ([[AZ | A-Z]]:[[^:$ | ^:$]]*|[[^:$ | ^:$]]*):([^:^,]*)"/>
<stack_next pattern="^                 from ([[AZ | A-Z]]:[[^:$ | ^:$]]*|[[^:$ | ^:$]]*):([^:^,]*)"/>
<enter_directory pattern="[[Gd | gd]]?make(?:\.exe)?(?:\[[([09 | ([0-9]]+)\])?: Вход[[^`$ | ^`$]]+`([^]*)'"/>
<change_directory pattern="cd\s+([[\S | \S]]+)[\s;]"/>
<leave_directory pattern="[[Gd | gd]]?make(?:\.exe)?(?:\[[([09 | ([0-9]]+)\])?: Выход[[^`$ | ^`$]]+`([^]*)'"/>
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo