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

Missing method completions within object initialization #837

Closed
vmarasow opened this issue Dec 26, 2018 · 3 comments
Closed

Missing method completions within object initialization #837

vmarasow opened this issue Dec 26, 2018 · 3 comments

Comments

@vmarasow
Copy link

vmarasow commented Dec 26, 2018

Summary

The methods are missing from the code completion drop-down when ctrl-space is clicked from within an object initialization, ex. new Object(Name= System.) the subclasses from System show up but the methods don't.
I tested this outside the scope of an object initialization and the methods are showing up in the drop down.

Steps To Reproduce:

  1. Define and initialize a new Object, any object.
  2. Within initialization, set a property to the result of a method call, ex. System.today().
  3. Use code completion to populate the today() method.

Expected result

image

Actual result

image

Additional information

VS Code Version: 1.30.1

SFDX CLI Version: sfdx-cli/6.44.0-dead729fb5 (windows-x64) node-v8.9.4

OS and version: Windows 10

@ruthemmanuelle
Copy link
Contributor

Hi @vmarasow . Can you check out the "Enable Code Smartness for SObjects" section of this documentation and see if it solves your problem? https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-vscode-apex

@vmarasow
Copy link
Author

I tried that and it didn't fix this issue

@allileong
Copy link
Contributor

Hi @vmarasow, thanks for bringing this to our attention. I was able to reproduce this locally, and it seems that the special syntax available for sobject initialization is an edge case that is not currently supported by our language server. A new work item has been filed to implement support for this case.

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