Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Syntax highlighter always uses the language settings provider of the first build configuration.
  • From: "Waterlander, Erwin" <erwin.waterlander@xxxxxxxxx>
  • Date: Mon, 31 Aug 2020 07:42:30 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; 1; spf=pass; dmarc=pass action=none; dkim=pass; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed;; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A6KH1MlZDI5DLZDCRPnH6GyOh9EsUBsj/l+9nic0VCw=; b=EO0Y+OQuN1Jvt7m1AxfeOj8TwmnJ1wNB+yhEati1vsySP1o28vzl2qKgmow4cm8IdJUhm4mXCb7uSMQUn5r3ms33wOHxgx2CxcPkTk3eDYDP/7dQbuqY+O3axmH35XcRrscCAw6DBRcOUpfLwNrmLkC2aEytLE4IKIZbiV84G4hXXmH9ZBvNilAE1c8vllh1XPPEqCDUsupTUkU6tcWX+1s0gjODiAy2qpYdl9jiv2GKq6kGdkaH4KC2SN6LYnPuvbYdZfV8CIK5kQY0DPIs4o3Yl+s+Dsu04J2WhdaiaOLHgJi+Z20msNBBMZjVyORRQTVuCZ2def1K6ftBNyIojw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901;; cv=none; b=Rw6YqVj0CripWCliFbPaT8WBGUb7Idxeug9YUJsYKwsfbbOYrricQ1gzsSPx5r/x1QBIkWpFstunIZjIN164j5ZRPaqP+PntpzmP5QX3BPiQSgGnsH2/iRj/aESGyygTxHQnAHj0ZehPa68yGwA1uCqZAmjn6qFgyUE/XKpDRgqRRZtLifjU1beYf2BAS40OhqOMiWQpt5OQrs4+MlQ9Zk/heNH/WabTYxpe4b0sY9RI/QQe+ORyNsP7s7i5fEAAfoa02spVwioGEb/p6AZATvJg3jMTAhlcf0mxfBMfB9BP1cqyxtlODXQqXbze4TMPyn8/u8FkrtMrO+lNS2jGMg==
  • Delivered-to: cdt-dev@xxxxxxxxxxx
  • Dlp-product: dlpe-windows
  • Dlp-reaction: no-action
  • Dlp-version:
  • Ironport-sdr: 2mGDAgJhyazIJ2MraCti+Lxt6eOA0TsuqNtVoOoKDySeQbvzUXEgp1rTXLtgsKxIyUcyNFQUfy +RckgOfcuB4Q==
  • Ironport-sdr: 7e72ytr4NTxgdGmJfLJzbShxINqtMJLSX4sTIoktBWAt9HGP6dWZvHYY4oyDce/x6Cc+TKkeFl Gev5aWkx93uQ==
  • List-archive: <>
  • List-help: <>
  • List-subscribe: <>, <>
  • List-unsubscribe: <>, <>
  • Thread-index: AdZ9XzSG/8CHbTGNTAWIoQTrHqe1iwABv+geAIAT1ZA=
  • Thread-topic: [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?


-----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:


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.


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