Magicento icon indicating copy to clipboard operation
Magicento copied to clipboard

Find "Symbol" out of Magento XMLs

Open ScreamingDev opened this issue 12 years ago • 3 comments

The XML have many definitions. Like layout.xml saying as="foo". phpStorm has the capability to find "Symbols" (see Menu "Navigate" > "Symbol").

Is it possible to have those definitons there too?

When being in a template you just see something like getChild('foo') but do not know where it could be defined. Would be great to choose from a list instead of "find"/search it in the whole code.

ScreamingDev avatar Nov 10 '13 13:11 ScreamingDev

Hi @sourcerer-mike, have you tried with Ctrl+B (Ctrl+Click or Middle Click, or any other shortcut you are using for the native GoTo functionality)? Check this: http://magicento.com/#feature7 http://magicento.com/#feature8 http://magicento.com/#feature9 Also if you have too many references (because you have too many packages and themes for example) you can limit the search to the desired packages and themes going to File > Settings > Magicento

Lastly take into account this feature is not working sometimes (for example sometimes you are inside a .phtml but that template is assigned a .php file, or the updates from the database, not using the layout.xml, so Magicento doesn't know which block is related with that template.

Is that what you need? goto-getchild

enriquepiatti avatar Nov 10 '13 16:11 enriquepiatti

Yee, you can click them when you're inside. But imagine every file is closed and you know the name "foo.bar" for it. In that case opening "Navigate -> Symbol" and enter "foo.bar" could find the layout definitions.

ScreamingDev avatar Nov 21 '13 08:11 ScreamingDev

OK, I will try to do it on the next release, but first I need to be sure it doesn't consume a lot of resources (is not the same inspect something only when you need it that inspecting everything to get a complete list of references). Currently what I'm doing when I need to know where is "foo.bar" in my layout is just using Ctrl+Shift+F (find in path) and search for foo.bar, if you want to run it faster you can search only inside app/design, filter by xml, and maybe search with double quotes: "foo.bar" to get better results, maybe that tip works for you too in the meantime

enriquepiatti avatar Nov 21 '13 23:11 enriquepiatti