Open njx opened 12 years ago
Hmm, (3) is a good point. Menu items can't be added until their command ID exists (i.e. is registered with CommandManager), so we almost need to ensure that Menus.js is loaded after everything else. It's probably working partially through luck right now...
One fix would be to make Menus.js depend on every module whose command is being referenced (which sort of makes sense but seems a pain to maintain). Or we could add menu items where the command is registered (like an extension does), but then our menu structure is much less declarative.
We should at least move the actual instantiations of the built-in menus out of Menus.js (which should just be the menu manager code) and into an app-specific module. That module can require whatever it references.
Reviewed assigned tio NJ
The dependencies in brackets.js need some cleanup.