Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting is broken for SOQL queries using System.Label #1997

Closed
joshua-nicholson opened this issue Feb 17, 2020 · 4 comments
Closed

Comments

@joshua-nicholson
Copy link

joshua-nicholson commented Feb 17, 2020

Summary

Syntax highlighting is broken after performing a "Refresh sObject Definitions" via command palette. If I open a file, the highlighting is correct for a split second and then quickly disappears.

Steps To Reproduce:

  1. Open command palette and type "Refresh sObject Definitions" and hit enter
  2. After this has finished, open a .cls file.

Expected result

Syntax highlighting should be proper.

Actual result

Syntax highlighting is no longer functional. For example, for and if highlight with the same color as any static method call. In a method declaration, key words like public and void are not highlighted at all, same with any object types like Account or List<Lead>.

image

VS Code Version:
Version: 1.42.1

SFDX CLI Version:
7.36.0-b1c4e9c7c8

OS and version:
macOS Mojave 10.14.6 (18G2022)

@joshua-nicholson
Copy link
Author

I've found the source of what I described above, I have the following line in this file

List<Contact> RefIDsNewMediaContacts = [select PC_Partner_RefID__c from Contact where Account.Name = :System.Label.New_Media_Account_Name and NM_PII__c = true];

I have a blue squiggly line under System.Label with the error External string does not exist: New_Media_Account_Name, even though I have confirmed it exists in my Sandbox. Syntax highlighting is then broken from the next line on and for the rest of the file. How can I get around this?

@lcampos lcampos changed the title Syntax highlighting is broken after performing a "Refresh sObject Definitions" via command palette Syntax highlighting is broken for SOQL queries using System.Label Aug 4, 2020
@git2gus
Copy link

git2gus bot commented Aug 4, 2020

This issue has been linked to a new work item: W-7907861

@git2gus
Copy link

git2gus bot commented Aug 4, 2020

This issue has been linked to a new work item: W-7907860

@diyer
Copy link
Collaborator

diyer commented Aug 27, 2024

Closing this old bug, tried the repro steps and does not reproduce anymore.

@diyer diyer closed this as completed Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants