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

Autocomplete does not work all the time #935

Closed
kvor opened this issue Feb 22, 2018 · 7 comments
Closed

Autocomplete does not work all the time #935

kvor opened this issue Feb 22, 2018 · 7 comments

Comments

@kvor
Copy link

kvor commented Feb 22, 2018

Summary

Autocomplete even in Salesforce Apex class is not available.

Steps To Reproduce:

  1. Type Http http = new Http();
  2. Start typing http.se

Expected result

It should autocomplete with send() method

Actual result

Does not autocomplete any method of Http class

Additional information

It does not happen all the time. Can not reproduce when it is happening.
It is a frequent problem.

screen shot 2018-02-22 at 3 52 51 pm

VS Code Version:
1.20.1

SFDX CLI Version:
sfdx-cli/6.3.0-7600a88 (darwin-x64) node-v8.9.4

OS and version:
Mac OS 10.13.3

@vazexqi
Copy link
Contributor

vazexqi commented Feb 22, 2018

@kvor
Copy link
Author

kvor commented Feb 22, 2018

@vazexqi No. Output is clean.

@vazexqi
Copy link
Contributor

vazexqi commented Feb 22, 2018

Does this happen when you have a type (custom object, standard object) that it doesn't understand?

Have you fetched the sobjects using https://github.com/forcedotcom/salesforcedx-vscode/tree/develop/packages/salesforcedx-vscode-apex#enable-code-smartness-for-sobjects?

@kvor
Copy link
Author

kvor commented Feb 23, 2018

In any object. After restarting VCS, it works perfectly.

Yes, if I have an issue with autocomplete, I try to repeat the fetch process as described but with no luck.

When it happens, it is usually fixed after VCS is restarted

@vazexqi
Copy link
Contributor

vazexqi commented Feb 23, 2018

@kvor - What restarting does is that it clears out the database (you can find it under .sfdx/tools/apex.db). That seems to imply somewhere that we have gotten into a weird state with the analysis. However, the fact that no error shows up in the Apex Language Server output window is weird though.

Some things to check:

  1. Are you running multiple copies of VS Code on the same project? Or could you be running the old Force.com IDE 2?
  2. Is this an SFDX project (or did you do the trick in Support for Change Set Based Development #123 to enable the language server)?
  3. Were you switching Git branches when you were coding?

Sorry, this is a bit hard to get a repro so thanks for your patience.

@kvor
Copy link
Author

kvor commented Feb 26, 2018

@vazexqi

  1. No. One instance/copy of VSCode. Old IDE is not even installed.

  2. Yes it is an sfdx project.

  3. Yes switching git branches is a quite frequent action. Any chance that connection to apex.db is lost? .sfdx folder is on .gitignore

@ntotten ntotten transferred this issue from forcedotcom/salesforcedx-vscode Jan 28, 2019
@ntotten ntotten transferred this issue from another repository Jan 28, 2019
@ntotten ntotten added this to the Spring 19 milestone Jan 28, 2019
@ntotten ntotten removed this from the Spring 19 milestone Mar 21, 2019
@lcampos
Copy link
Contributor

lcampos commented Jan 9, 2020

Closing this since it was addressed on release v47.5.0, feel free to reopen if needed.

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

4 participants