adobe/brackets — pull request #1353 by redmunds (2012-08-08 23:23:03+00:00)
Title: handle same command in multiple menus

This is for issue #1293. The main fix is to get the correct MenuItem associated with the Command id for the target Menu.

The designed behavior is to add MenuItem to end of target menu if the correct position cannot be determined (so that it just doesn't disappear into the ether). But, we were not logging any info to the console in some cases, so I added some messages. There should now be a console message for any case where the correct MenuItem position cannot be determined.

I also added an 8th test case to the description of bug.

I wrote an extension to test all of these cases. The main.js file can be found here:
https://gist.github.com/3299639