Custom Metadata Types completion wrong

Issue #501 resolved
Zoran Žunko created an issue

Hi Scott, instead of providing completion in the form of:

x__mdt.y__c

i get:

x__mdt.x__y__c

Comments (12)

  1. Scott Wells repo owner

    Zoran, just so I'm debugging the right things, can you describe exactly what metadata type x__mdt and y__c are? Are they an Apex class and property respectively?

  2. Zoran Žunko reporter

    Sorry was really busy last couple of weeks. Did a check on this today and it seems to be working properly.

    The thing was that the Custom Metadata type api name x was being inserted in front of the Custom Metadata field name y. Now it seems to work properly.

    thanks again and sorry once again for not providing any more details.

  3. Derek Wiers

    @RoseSilverSoftware , I just got this issue today on 1.7.8.6-idea14.

    for metadata type named "meta_name" and field named "field", I get:

    meta_name__mdt myVariable;
    // autocompleted field:
    myVariable.meta_name__field__c = someValue;
    // where it should be:
    myVariable.field__c = someValue;
    

    So it seems to be treating mdts as namespaces for some reason...

  4. Derek Wiers

    Upon further inspection, it appears that the syntax highlighter accepts both values, and the autocomplete drop down lists the correct (unprefixed) field name, and if you continue typing it correctly, it will act totally as expected. However, if you were to hit "enter" or "tab" etc to accept the autocomplete - that is where the autocompletion gets the prefix.

  5. Log in to comment