Auto-complete config: don't include the namespace prefix if it is optional

Issue #266 resolved
Chris Peterson created an issue

When working in a dev org on a managed package IC will always include the namespace prefix when auto-completing SObject types and fields. I don't want this, since the namespace will always be implied for me and having the namespace blocks deploying to orgs with another namespace or no namesapce at all.

In other words, add an option somewhere so that auto-completing myNs__MyObject__c would actually give me MyObject__c and suppress myNs__.

Comments (4)

  1. Scott Wells repo owner

    Crap...I had a long detailed comment here and just lost it! I'll try for a quick recap.

    Chris, IC actually goes out of its way to include namespace prefixes only when they're absolutely necessary, in particular when you're making a cross-package boundary reference or using a system class from a namespace that's not implicit (namespaces such as System and Schema are implicit). However, a bit of configuration is required to tell IC when it should and shouldn't do this.

    First off, take a look at this high-level overview from the IC Web site about how you can configure it for development of multiple managed packages in a single dev org:

    http://www.illuminatedcloud.com/home/connections

    What's important there are the notions of the Organization Namespace and the Namespace values associated with the Development Packages rows. In the example configuration on that page, completions for source in the base_package module will never auto-prefix the base namespace for classes/SObjects/fields that are also in that module. Completions for source code in the extension_package module will similarly never auto-prefix the ext namespace for source in the same module, but they will auto-prefix the base namespace when making references across "package boundaries".

    So let's make sure things are configured correctly for your project and modules in this regard and then see whether completions are behaving as you'd expect/want.

  2. Chris Peterson reporter

    Aha, that did the trick. I had to update my development packages section on the connection to check the managed box and manually enter the namespace under the non-default entry, but once I did that all worked as you claim.

    Awesome!

  3. Scott Wells repo owner

    Glad that did it for you! You might want to rebuild caches & indices when you get a chance since there may still be some info cached from before the configuration change and therefore some incorrect completions and such.

  4. Log in to comment