-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix autocomplete on mock objects #92
base: master
Are you sure you want to change the base?
Conversation
|
||
@Override | ||
public char getKey() { | ||
return '\u0102'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your custom signature key, i.e. "Я"
https://confluence.jetbrains.com/display/PhpStorm/PHP+Open+API
I checked other projects, like here https://github.com/Haehnchen/idea-php-symfony2-plugin/blob/a3fa7ef7c3d5a57be2a7130cf831d44d7760ea1e/src/fr/adrienbrault/idea/symfony2plugin/doctrine/ObjectManagerFindTypeProvider.java and they seems to use random unicode character.
I used Ă
( 'A' for atoum and it looks like the atoum logo with the horns 😛 )
|
||
if (ref != null && ref.getFQN() != null && ref.getFQN().startsWith("\\mock\\")) { | ||
return new PhpType().add(ref.getFQN().substring("\\mock".length())); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the element which need type resolution is a class with FQN like \mock\xxxxxx
we return the class \xxxxxx
@agallou Je viens d'ajouter un commit 291615d pour ce qu'on s'était dis ( http://docs.atoum.org/fr/latest/mocking_systems.html#generer-un-mock-avec-newmockinstance ) |
@vdechenaux j'ai commencé à tester la PR. La version avec laquelle je builde actuellement le plugin ne supporte pas le PhpTypeProvider3. Du coup je vais chercher quelle version minimum utiliser pour l'indiquer dans le fichier |
Related to #43 but it doesn't fix it 😞
Before:
After: