Intellisense for declaring variables of classses with a namespace '.' in them doesn't work

Issue #81 resolved
Nathen Drees created an issue

It looks like when you are declaring a variable or instantiating a new class whos name has a namespace and a '.' in it, the intellisense gets lost and doesn't have any suggestions. See screenshot below.

I've rebuilt the OST, did a Invalidate Caches / Restart and it didn't help.

Note that the intellisense for instantiated variables works fine - i'm able to see all of the fields and methods I should. Just declaring variables doesn't.

2015-08-04_11-28-29.png

Comments (6)

  1. Scott Wells repo owner

    Nathen, I designed the type completion so that you don't have to worry about namespaces. Try typing:

    TSI<TAB> t<TAB> = new TSI<TAB>

    You should end up with:

    ConnectApi.TextSegmentInput textSegmentInput = new ConnectApi.TextSegmentInput()

    with the caret inside the constructor arg parentheses.

    Nonetheless, I'll look into this particular completion and see why it's not working. I also tried to accommodate the <namespace>.<type> use case, but perhaps it's not working properly in a new expression.

  2. Nathen Drees reporter

    Interesting, I didn't know I could do that. It does work properly if I use the type completion, so not sure why it doesn't work if I explicitly type it out.

  3. Scott Wells repo owner

    Yeah, that's what I'm going to investigate for the next release (which will also include Anonymous Apex by the way). This is a gross oversimplification of how it works, but IC's completion uses a rules-based state machine. My guess is that I'm missing a rule for that particular situation since I've been primarily taking advantage of the "don't worry about namespaces" feature. Should be quite easy to remedy, though.

  4. Log in to comment