PHP-Namespace-Resolver icon indicating copy to clipboard operation
PHP-Namespace-Resolver copied to clipboard

[Bug] When importing reformat the line by collapse it

Open Yivan opened this issue 6 years ago • 2 comments

Hello,

First of all thanks for this very nice extension and made it available for us.

I would like to propose a litle improvment which will make life more easier for coders.

When typing in vscode \Symfony\Component\Console\Helper\SymfonyQuestionHelper, right click on the part SymfonyQuestionHelper and choosing "Import namespace" should import \Symfony\Component\Console\Helper\SymfonyQuestionHelper and reduce the line to SymfonyQuestionHelper. If importing \Symfony\Component\Console\Helper, it should reduce it to Helper\SymfonyQuestionHelper. You get the idea i think ; )

Actually we need to reduce it manually, it would be great if after import, line is reformated/collapsed. Same with "Import all", it could parse the file, import all namespace and reduce/collapse everywhere they are called.

I hope it is a good idea.

Thanks.

Yivan avatar Oct 19 '19 15:10 Yivan

I have noticed this too, but reading the code it looks like it should be collapsing the line, but it's not.

Should be marked as a bug

warrickhill avatar Apr 08 '20 09:04 warrickhill

@warrickhill I changed the title to bug, thanks!

Yivan avatar Apr 08 '20 09:04 Yivan