Intellisense for declaring variables of classses with a namespace '.' in them doesn't work
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.
Comments (6)
-
repo owner -
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.
-
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.
-
repo owner Okay, that completion use case is fixed. I'll include the fix in the next release.
-
repo owner - changed component to Completion
- changed version to 1.3.0
Fix will be in 1.3.0.
-
repo owner - changed status to resolved
- Log in to comment
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.