PHPStorm phpdoc namespace autocomplete

There was a version of phpStorm where i was able to use namespace autocomplete in phpdoc (similar to usual autocomplete in code),
i.e. i typed '/** @return ActiveReco...' and autocomplete popup appears allowing me to either add whole class name with namespace or add 'use ...' at the top of the file. Generally speaking it had the same behavior as a normal autocmplete in the code.

Now though (v 9.0.2) i can't get this feature working. It's really annoying to type namespace manually.
How can i enable this feature again, maybe there is some setting for such thing?

5 comments
Comment actions Permalink

Hi there,

Does invoking code completion manually via Ctrl+Space (or whatever you may have there for "Code | Completion | Basic") works?

and autocomplete popup appears allowing  me to either add whole class name with namespace or add 'use ...' at the  top of the file. enerally speaking it had the same behavior as a normal autocmplete in the code.

Can you please show a screenshot of such code completion where it would offer those 2 choices: how to complete the same class? I do not remember such "one fo these" for the same class in code completion...

AFAIK: if you already have "use someclass" then that class will always be completed using short form. If there is no "use" for this class then it will be handled accordingly to your auto import settings.

0
Comment actions Permalink

Hi,

Can you please show a screenshot of such code completion where it would offer those 2 choices: how to complete the same class? I do not remember such "one fo these" for the same class in code completion...

Sorry, i meant that autocompletion will do it's job as you described here:
if you already have "use someclass" then that class will always be completed using short form. If there is no "use" for this class then it will be handled accordingly to your auto import settings.


About manually completion: yes, it works.
0
Comment actions Permalink

So .. completion works properly. And the issue is that code completion popup does not appear automatically?

If that's so .. then I believe (although not 100% sure) it was tweaked in recent versions because it was triggering in wrong places way too often for no actual reason and there was too little time to have proper fix (that's my understanding; I guess it was better to have automatic popup disabled than having such annoying behaviour; plus you still can invoke it manually at any time).

I may suggest to try 9.5 EAP build to see if it will be working better there.

0
Comment actions Permalink

Good possible explanation, I thought about that too. Though completion popup DOES appear during the normal code editing, so I'm not sure why to not use the same behavior for phpdoc.

But thanks, I'll update

0
Comment actions Permalink

Feel free to create new ticket at Issue Tracker if you think that it's broken and autopopup must be working there.

0

Please sign in to leave a comment.