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 12:41:05 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Um4sgpvMTA+gpgDwB5beqtZFrb3H/7NTbyCUL8TjqJk=; b=bxE7Q8tsIE3RyoVqvktNbjcuIQCNOKKoHvYEpJtOlVqRCkeCRvpaKsmjO48Z/RE5DE2CcvVLxBzA5N86rmKGM13sCxrzaDR1/VBftsEKKLzkBlv/LECH8ezCGZEMNYvQWskxleDrVeeqjS1uXs9dF2u43FXXGdjgOkv2QWGifRuxnuZceweZe1i54v3KFzPOb0FlUX8LreXZH1Zp6+j25GVWewLXHi0jGIWBrI3Vn9loHj0XDpquqBK9L7k9CUfGM9BmmKkraRfPgCc8fvbtG5Hh70zMlyxDpXsC0ro8Y4N+HpUs2VYGBzkkRQ6JC58H3NgR/ens0qyH0S2lfNUM4g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KW3+Uxd94pFkkpfTKZ/tockG1TvR0cicjaqEeOQdO7Th46lax9lsbQpY7IfORzA3vTFgibIpVGkOA6192csia3171GtzsAiNe9sGWKBTKAgRD0TpuaXU72Fkyzum9fPGvEKXaz/N6USCIV1kBvq2HCgAREHDxQUDVkAoYOBtIHzlzXmmSwUKVam9UmPoYxM2r/vEJccpJ5HrWWuoSlG9+InAcSqvm9m5lFW39/kDWybs4t+Wj+Kiy5gSovvs9BfK1sV/mnTDMxPE2AFxRn1Xpavysv5Rw9363tmx1/DSXDxCHgCW8eK/ZNsw5ynH/+PuSp2/YzolRIAorBg91IC6Vg==
  • Delivered-to: cdt-dev@xxxxxxxxxxx
  • Dlp-product: dlpe-windows
  • Dlp-reaction: no-action
  • Dlp-version: 11.5.1.3
  • Ironport-sdr: Lsw3wJM/RRTscb2gMqGgjlrbo22RTFar7UpEYxEIjfNSDG8G5t6S52qu0qwIcvvp38TRvK9y5j 232ybkmr2gPQ==
  • Ironport-sdr: hXCqDEXIF1pOdP8I3GgCeK7E4OOp6oc2EbGByFXBLQISoMTbmMQyVT4Oq2KyMscDS8jX/MyKs2 NBK5NQ3jmu0A==
  • List-archive: <https://www.eclipse.org/mailman/private/cdt-dev>
  • List-help: <mailto:cdt-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/cdt-dev>, <mailto:cdt-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/cdt-dev>, <mailto:cdt-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AdZ9XzSG/8CHbTGNTAWIoQTrHqe1iwABv+geAIAT1ZAACvzAMA==
  • Thread-topic: [cdt-dev] Syntax highlighter always uses the language settings provider of the first build configuration.

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: cdt-dev-bounces@xxxxxxxxxxx <cdt-dev-bounces@xxxxxxxxxxx> On Behalf Of Waterlander, Erwin
Sent: Monday, August 31, 2020 09:43
To: CDT General developers list. <cdt-dev@xxxxxxxxxxx>
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: 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