Syntax highlighter always uses the language settings provider of the first build configuration.

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Syntax highlighter always uses the language settings provider of the first build configuration.

Waterlander, Erwin
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.

_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Syntax highlighter always uses the language settings provider of the first build configuration.

Nathan Ridge
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: [hidden email] <[hidden email]> on behalf of Waterlander, Erwin <[hidden email]>
Sent: August 28, 2020 5:42 PM
To: [hidden email]
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.

_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Syntax highlighter always uses the language settings provider of the first build configuration.

15 knots
In reply to this post by Waterlander, Erwin
Am Fr., 28. Aug. 2020 um 19:43 Uhr schrieb Waterlander, Erwin
<[hidden email]>:
>
> 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.

Have a look at https://groups.google.com/g/cmake4eclipse-users/c/_wSDzirhJpI/m/mEOewOO1BQAJ

/Martin
_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Syntax highlighter always uses the language settings provider of the first build configuration.

Waterlander, Erwin

>> 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.
>
>Have a look at https://groups.google.com/g/cmake4eclipse-users/c/_wSDzirhJpI/m/mEOewOO1BQAJ

This link brings me to a google login screen. Do you have an alternative link?

>/Martin
---------------------------------------------------------------------
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.

_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Syntax highlighter always uses the language settings provider of the first build configuration.

Nathan Ridge
>>Have a look at https://groups.google.com/g/cmake4eclipse-users/c/_wSDzirhJpI/m/mEOewOO1BQAJ

> This link brings me to a google login screen. Do you have an alternative link?

Here you go:

https://groups.google.com/forum/#!msg/cmake4eclipse-users/_wSDzirhJpI/mEOewOO1BQAJ

(Google Groups is *terrible* about this. It does make the content available without login, but you have to try hard to find the right link for that. A dark pattern if I ever saw one...)

Regards,
Nate
_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Syntax highlighter always uses the language settings provider of the first build configuration.

Waterlander, Erwin
In reply to this post by Nathan Ridge
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: [hidden email] <[hidden email]> On Behalf Of Nathan Ridge
Sent: Friday, August 28, 2020 20:09
To: [hidden email]
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: [hidden email] <[hidden email]> on behalf of Waterlander, Erwin <[hidden email]>
Sent: August 28, 2020 5:42 PM
To: [hidden email]
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.

_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Syntax highlighter always uses the language settings provider of the first build configuration.

Waterlander, Erwin
Hi,

I have learned now that the behaviour can be changed via workspace settings (C/C++>Indexer) and project settings (C/C++ General >Indexer).

Thanks Martin and Nate.

The project settings are lost due to an even older bug (reported in 2007) https://bugs.eclipse.org/bugs/show_bug.cgi?id=205299

I would have found it more logical is the default setting was to follow the active build configuration instead of a fixed configuration.

best regards,

--
Erwin

-----Original Message-----
From: [hidden email] <[hidden email]> On Behalf Of Waterlander, Erwin
Sent: Monday, August 31, 2020 09:43
To: CDT General developers list. <[hidden email]>
Subject: 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: [hidden email] <[hidden email]> On Behalf Of Nathan Ridge
Sent: Friday, August 28, 2020 20:09
To: [hidden email]
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: [hidden email] <[hidden email]> on behalf of Waterlander, Erwin <[hidden email]>
Sent: August 28, 2020 5:42 PM
To: [hidden email]
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.

_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev