Skip to content

autocomplete for Magento #96

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

Open
alexdrupal opened this issue Jan 8, 2017 · 2 comments
Open

autocomplete for Magento #96

alexdrupal opened this issue Jan 8, 2017 · 2 comments

Comments

@alexdrupal
Copy link

Hello

In Magento 1 there is a static method to create classes. For example

Mage::getModel('core/layout') is actually new Mage_Core_Model_Layout()

Your plugin does not autocomplete magento classes yet, but do you think it is possible to make autocompletion to work with Magento's getModel calls?

Thank you

@complex857
Copy link
Collaborator

Hmm... it sounds like this can't be arranged with the usual docblock comments (you only get one slot for any number of classes). Unfortunately the code doesn't support any plug-in / custom patterns to be added which would allow this to work without adding some hard-coded exception to support this case.

So in short: Yes, it's possible, the most simple thing that could possibly work not even that hard, but I wouldn't like to add it to the codebase like that.

The best option would probably to add some extension point to allow you to add / configure these kind of stuff without blowing up the unfortunately already quite bloated code more.

@alexdrupal
Copy link
Author

Thanks!

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

No branches or pull requests

2 participants