Skip to content
This repository has been archived by the owner on Jul 22, 2019. It is now read-only.

Bad autocomplete when i use namespace class or static class #374

Open
Kcko opened this issue Jan 23, 2018 · 3 comments
Open

Bad autocomplete when i use namespace class or static class #374

Kcko opened this issue Jan 23, 2018 · 3 comments

Comments

@Kcko
Copy link

Kcko commented Jan 23, 2018

Hi @nevadascout,

I have class with namespace , see: https://goo.gl/1m6B7J
(namespace: Nette\Diagnostics , class: Debugger, method: barDump)

In another class (ProjectPreseterClass) im try to call namespaces under Nette (for our example: Nette\Diagnostics\ Debugger class)

  1. https://goo.gl/iZXJvL does not offer Diagnostic namespace but classes in namespace Nette, do not know if it's a expected behavior. My personal opinion is that should offer namespaces under Nette namespace at first and then classes in Nette namespace. Does make it sense? :)

  2. with first suggestion on $this call it show methods from actual class, its correct, see: https://goo.gl/H3ffNA, but with second call, it show only methods from parent class, see: https://goo.gl/CCxmzn (parent class: https://goo.gl/cJsC8s) , its really strange behavior, why is this happening? See video with this bug :) http://files.rjwebdesign.cz/i/20180123-163659.gif (one list is from child class and second list is from parent class, they switch randomly.

  3. Really bad suggestion for class in class with anotation see: https://goo.gl/9GgzHp (modelEshop has only 2 methods and i get some list of variables with these methods somewhere in the middle of list) see: https://goo.gl/szfJZS (getProducst and getProductsCount is only relevant 2 method in model) - again strange behavior

  4. Absolutely no suggestions for Singleton class, see: https://goo.gl/KjaAyx (this list of values is from local html classes and local variables).

Can you look at it and give me back some explanation?

PS. Of course I appreciate your work, but it would be great to improve it.

@nevadascout
Copy link
Member

nevadascout commented Jan 23, 2018

Hey, thanks for the really detailed and helpful suggestions! :)

  1. It's a known bug, the namespace suggestion is supposed to work but it's something that I will try to fix in future
  2. That's really weird behaviour that I haven't seen before! Thanks for reporting it, I will investigate
  3. Doc-comment support is coming in the next version which should improve properties and things that use @var annotations
  4. This is another limitation that I'm working to solve!

Sorry for the brief replies, thanks again for giving such great feedback!

PS. I agree! There are a lot of improvements that could be made to Crane!

@Kcko
Copy link
Author

Kcko commented Jan 23, 2018

Hi, you are welcome :)

I will be absolutely honest, im testing your extension and competitive php intellisense from Ben Mawburn.

Last 2 days, I have comparing both extensions and your seems better to me

  1. Your fail, BM fail too. (Ok, you will solve it :))
  2. Your is much better, except for reported bug. Can I help you with something? Some steps to reproduce that bug or whatever ... (its critical for use, im php developer and our project / frameworks use many and many php clasesses with many methods)
  3. Your fail, BM not (his plugin working with this point).
  4. Both fails, but it not so important point (Singleton is s***).

I will continue with testing, i find anything , i will report.

Please point 2 is the most important.

Except mentioned points your extensions behaves much better

Thx for your reply and im looking forward for future updates and fixes :)

@Kcko
Copy link
Author

Kcko commented Jan 23, 2018

At last to point 2:

Simple class without dependencies / parent / extending etc.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants