Salesforcedx-vscode: Disable my own Namespace for Auto-Completion (Apex)

Created on 8 Oct 2018  路  2Comments  路  Source: forcedotcom/salesforcedx-vscode

Describe the solution you'd like
As an ISV we work with namespaces all of the time. In VS Code, if I want to use the autocomplete feature, autocompletion looks like this

completion with namespace

Is there a way to tell VS Code or the Salesforce Extension not to use namespace?

The omitted Namespace should be the one defined in the scratch project definition or scratch config file so to avoid confusion when working on a package extension.

apex namespaces feature

Most helpful comment

I agree with your analysis.

Hence I suggested to strip only(!) the namespace that is configured in one of the config json files. No way should we strip Namespaces generally.

Maybe I misunderstood something?

I changed the title of the issue to better reflect my suggestion.

All 2 comments

Just to be clear, those are not _just_ namespaces. Those are custom objects from other namespaces. So, they could be used, and referenced.

There are at least two ways we can handle this:

  1. We could move this to the bottom of the list (if there are other completion suggestions)
  2. We could do provide an option like what you suggest (hide namespace completions suggestions). However, how would you _discover_ those items then if you need to use them? I'm not sure if this is possible, but _maybe_ hitting ctrl+space twice would be the action to explicitly suggest things from other namespaces)?

Thoughts?

This is related (but not identical) to https://github.com/forcedotcom/salesforcedx-vscode/issues/399 since these are real entities that you can reference. You get them after you invoke "SFDX: Refresh SObject Definitions".

I agree with your analysis.

Hence I suggested to strip only(!) the namespace that is configured in one of the config json files. No way should we strip Namespaces generally.

Maybe I misunderstood something?

I changed the title of the issue to better reflect my suggestion.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aheber picture aheber  路  4Comments

celador picture celador  路  4Comments

ntotten picture ntotten  路  4Comments

ghost picture ghost  路  5Comments

randi274 picture randi274  路  3Comments