Open wahler opened 11 years ago
Do you mean typing MageCatalog[CTRL+SPACE HERE] is not showing Mage_Catalog_Model_Product for example? and that Mage_Catalog_Model_Product::[CTRL+SPACE HERE] is not showing ENTITY, etc? Please try those examples, they are working fine to me, also try with another project, and lastly try disabling or uninstalling Magicento to see if that's the problem. It looks like an index problem, you could also try to reindex your project: File > Invalidate Caches (and restart phpstorm)
That's exactly what I meant. Indeed in another project it is working. Maybe it is because of an older Magento version? It is not working in a store using Enterprise 1.11, which should be comparable to Community 1.4 I think
No, the problem must be related with some index, if it's working in another projects then it's not a conflict with Magicento (anyway if you are afraid of that you can try uninstalling, checking, installing and checking again). If you use Ctrl+N and type the name of the class, does PhpStorm find it?
Clearing the cache did not help with this problem. WHen I deactivate Magicento PHP autocompletion is working perfect immediately. When I then hit Ctrl + M and click Enable Magicento the problem is back
@wahler I think I will need more information to solve that: Is that happening with all your constants? (any class or just My_Module_Model_Something?) Is that happening only when you are in $collection->addFieldToFilter('status', or everyhere? Is that happening inside other files too? If you type CTRL+N and type the problematic class, does PhpStorm find it? Do you see any error? (bottom right corner, you should see a red icon) What PhpStorm version are you using?
Thanks, I appreciate your help a lot! Yes, it is happening with all constants. It is not only constants, also Method and variable autocompletion isn't working. I think this is happening when I am trying toc call a function on the return values of functions like Mage::getModel and Mage::getSingleton. When trying to call a function on the return of these functions. Within the brackets autocompletion is not working. Yes, also happening in other files. Is Ctrl+N equal to Cmd+N on a Mac Os X? If so it does not find it. In the bottom right I see an event log symbol in red complaining about a malformed config.xml. But this has been there before. PHPStorm version is 6.0.3
Ctrl+N is the shortcut for navigating to any class by name (Ctrl+Shift+N is for files, you should be using this, really (y) http://www.jetbrains.com/phpstorm/webhelp/navigating-to-class-file-or-symbol-by-name.html ). Could you put here the trace of the config.xml error? also try removing .idea/magicento folder and try again, it's a bit weird if this is working in another projects and you are not getting any error... do you have any other plugins installed? (beside the official one)
Ah, sure I am. It's normally Cmd + O on Mac. Yes, it is finding these classes. When I move the cursor out of the function call brackets Same completion is working fine. Just found Magicento is offering class name completions
Mage::getModel('catalog/product')->setSomeAttribute({{cursor position}})
When hitting Ctrl + Space to start completion a popover says "Write at least one character to get code completion for factories"
Yes, there are two other plugins which I think are not from Phpstorm. It's "NodeJS" and "Handlebars/Mustache". Also this is just happening in one of my projects. The are two differences to all my other magento projects. It is a Enterprise version, and a version which has not been updates for a long time. Not sure if this is relevant
I'm not sure how to get a trace. The Event log is just saying: "17:17:11 Magicento Notification: The node: /config/admin/routers/adminhtml/args/modules/giftcardaccount in your config.xml is malformed"
There was no difference after deleting the folder .idea/magicento/
Since the last update the default autocompletion provided by PHPstorm is not working when the cursor is inside the brackets of specific functions. For example:
Autocompletion for the Class Name and the constants in the second param are not working for me.