-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Fix #2902: Externalize debug menu as an extension #2942
Conversation
@@ -36815,7 +36815,7 @@ define('editor/EditorCommandHandlers',['require','exports','module','command/Com | |||
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert this file. This is only for performance testing and we need this snapshot to stay intact. Thanks!
Initial review complete |
@jasonsanjose Thanks for the fast review! I addressed all the comments, although I am not sure if moving |
There is a problem with the dependencies now by moving _handleWindowGoingAway to Global.js. Global.js requires ProjectManager.js to be loaded first to be able to register the trigger handler, but PreojectManager loads PrefUtils.js that requires Global.js to be defined first. So by requiring ProjectManager.js before Global.js brackets loads, but the tests don't (and maybe something else). A solution would be what I mentioned first or make other file trigger the "beforeAppClose" event. |
Ah, should have seen that coming. Ok, let's back those changes out of Global.js. How about in DebugCommands/main.js...forgive any early morning copy paste errors:
|
Need to merge with master again to kick off a new build on travis. JSHint dependencies were updated, causing the build to fail...see #2956. |
@jasonsanjose Now is everything working after backing the changes on Global.js and using your code in main.js! Should we move the commands ids from Commands.js to the extension? |
@@ -23,7 +23,7 @@ | |||
|
|||
|
|||
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ | |||
/*global define */ | |||
/*global define, $ */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there are some leftover edits in this file Global.js. It should be completely clean.
Yes to moving the Commands. Just a few minor comments and this should be ready to go. |
@jasonsanjose Done! |
Looks good. Merging. |
Fix #2902: Externalize debug menu as an extension
@jasonsanjose I just noticed that this change may break extensions adding menu items to the debug menu since On the other hand, should we discourage developers to add items to the debug menu, or even prevent it somehow? |
I noticed that this breaks the menu add in your extension. I don't think developers should add items to the debug menu since it might or not be present. Up until now it was available only in Brackets and not in Edge Code, so the extension would only work in Brackets. It seems harder now to add to the debug menu since you need to look for the id and it will fail to add if your extension loads before the debug extension. |
@TomMalbran I totally agree (I guess I put my extension there because I couldn't figure out where it fit ;)). The wiki page for extensions says:
Just by reading that, I'd say people probably won't be trying to add items to the debug menu anymore, but maybe a explicit note in there about this wouldn't hurt in case someone goes looking for it. |
Added to release notes https://github.com/adobe/brackets/wiki/Release-Notes:-Sprint-21 |
This request fixes #2902 by moving the
DebugCommandHandlers
,NodeDebugUtils
and all the Debug menu creation to a newDebugCommands
extension.