Enhancement: Navigate to field from Static typed field.

Issue #1815 resolved
Justin Julicher created an issue

when you reference a field in code using e.g. ‘Contact.LastName’ and you navigate to declaration it goes to SObjectField type.

It would be more useful if it went to the definition of the field e.g. Contact LastName.

Comments (8)

  1. Scott Wells repo owner

    Hah! Yeah, this has bugged me for a long time as well. It works that way because technically Contact.LastName is of type SObjectField, so adding that type of reference just makes other features such as chained code completions, reference resolution, type agreement, etc., work properly. However, you really do expect it to resolve to that named field when you navigate through it instead of to the more generic SObjectField. I'll take a look and see if I can change just the reference navigation aspect without breaking everything else that depends on that being linked to the correct data type for compilation purposes.

  2. Scott Wells repo owner

    I'm not seeing any easy way to do this. I've put in a query with the other plugin developers to see if there's just some feature of the plugin SDK that I'm missing that allows divergent reference resolution and navigation behavior.

  3. Justin Julicher reporter

    Hi @Scott Wells

    I’ve just downloaded the latest version of IC and it seems this has been reverted? It goes to to the OST version not the field definition.

  4. Scott Wells repo owner

    Justin, I'm not aware of any changes in this area at all, but of course it could have happened as a side-effect of something else. Let me take a look and I'll see if/why it's not working.

  5. Scott Wells repo owner

    Hey, Justin. Which form isn't navigating properly for you? I have a series of tests that verify these various compile-time field constant patterns and I've just verified that they're all still navigating to the field in the OST SObject stub class which was the resolution of this bug.

  6. Log in to comment