|Re: [cdt-dev] Syntax highlighter always uses the language settings provider of the first build configuration.|
Hi Nate, This is a pity. I'm using two configurations which use a different compiler with their own internal macros and include paths. I was hoping that switching the active build configuration would reflect that in the editor via the configuration's language settings provider. Is there another way out of here, besides checking out two source repositories and using a single configuration in each of them? -- Erwin -----Original Message----- From: cdt-dev-bounces@xxxxxxxxxxx <cdt-dev-bounces@xxxxxxxxxxx> On Behalf Of Nathan Ridge Sent: Friday, August 28, 2020 20:09 To: cdt-dev@xxxxxxxxxxx Subject: Re: [cdt-dev] Syntax highlighter always uses the language settings provider of the first build configuration. Hi Erwin, I suspect you are running into this long-standing issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=313944 Regards, Nate ________________________________________ From: cdt-dev-bounces@xxxxxxxxxxx <cdt-dev-bounces@xxxxxxxxxxx> on behalf of Waterlander, Erwin <erwin.waterlander@xxxxxxxxx> Sent: August 28, 2020 5:42 PM To: cdt-dev@xxxxxxxxxxx Subject: [cdt-dev] Syntax highlighter always uses the language settings provider of the first build configuration. Hi, I noticed that the syntax highlighter in the editor always uses the language settings provider of the first configuration, independent of the active build configuration. This can easily be shown by creating a standard C hello world project: 1. Add a macro to the CDT User Setting Entries provider for both the Debug and the Release build configuration for the GNU C language. 2. Make the value different for Debug and Release. 3. Use the macro in the source code. 4. Hover with the mouse pointer above the macro to see the expansion. 5. The editor will use the value of the first build configuration (Debug). Also if you switch the active build configuration to Release. You may need to run Project>Clean to see the macro expansion in the editor. Compilation may fail if gcc doesn't know the macro definition. After a failed compilation the expansion is not visible anymore. Run clean again. This problem is there for all language settings providers. Also for the ones I created myself. Because each build configuration runs its own instance of the language settings provider (not a global one), I would expect that the language settings provider used by the editor would switch if I switch active build configuration. Is there a solution for this problem? best regards, -- Erwin Waterlander --------------------------------------------------------------------- Intel Benelux B.V. Registered in The Netherlands under number 24134020 Statutory seat: Rotterdam Registered address: Capronilaan 37, 1119NG Schiphol-Rijk This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Back to the top