Skip to content
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

[CLOSED] After extension is updated/removed, reload Brackets instead of quitting #5895

Open
core-ai-bot opened this issue Aug 30, 2021 · 16 comments

Comments

@core-ai-bot
Copy link
Member

Issue by lkcampbell
Sunday Jan 12, 2014 at 01:16 GMT
Originally opened as adobe/brackets#6487


This PR is a fix for issue #6350. After extension is updated/removed, Brackets will automatically reload with the new extension changes in place.


lkcampbell included the following code: https://github.com/adobe/brackets/pull/6487/commits

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Sunday Jan 12, 2014 at 01:18 GMT


@dangoor and@njx, let me know what you want to do with those string constants. Keep them as is or change them.

@core-ai-bot
Copy link
Member Author

Comment by TomMalbran
Sunday Jan 12, 2014 at 01:32 GMT


There is one issue with this. If you remove the Debug extension, then it will not work, and in Edge Code there is no Debug extension. Maybe it could be time to move the reload commands to the core code.

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Sunday Jan 12, 2014 at 01:37 GMT


@TomMalbran, good point and your solution is the only one that makes sense.

Bleh, I was hoping this one was going to be really easy. Oh well...back to the drawing board.

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Sunday Jan 12, 2014 at 01:47 GMT


@TomMalbran, since you are around tonight, any suggestions on where to move the Reload code?

@core-ai-bot
Copy link
Member Author

Comment by TomMalbran
Sunday Jan 12, 2014 at 02:11 GMT


The menu items could probably stay in the Debug menu, just the code would need to be moved, but not sure where to move the code.

Moving the reload code would mean that we could also move the change language menu to Help or View.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Sunday Jan 12, 2014 at 17:18 GMT


All of the "quit" commands are handled in DocumentCommandHandlers, so I think that's the best place to put the "reload" commands.

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Sunday Jan 12, 2014 at 19:07 GMT


@redmunds, also, what do you think about changing the name from browserReload to appReload or applicationReload (seems a little long). Since we (hopefully) reload everything in the brackets-shell along with the browser window at this point, we are really reloading more than the browser when in native mode.

I also considered keeping the concept of browserReload around as well, but that makes the functionality platform-dependent. A browserReload in HTML mode is not the same as a browserReload in native mode. We should probably abstract up a level and call the whole thing appReload. The behavior is the same as closing and opening the application without the user having to do anything. Same on all platforms.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Sunday Jan 12, 2014 at 19:16 GMT


what do you think about changing the name from browserReload to appReload

If you create a second window using Debug > New Brackets Window, the calling browserReload only reloads the current window, not entire app. So, I think browserReload is probably more accurate.

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Sunday Jan 12, 2014 at 19:49 GMT


@redmunds, DocumentCommandHandlers does not currently have a public API. Do you want me to keep it this way and register Reload and Reload Without Extensions through the CommandManager, or do you want me to add a new reloadAPI method to the module?

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Sunday Jan 12, 2014 at 20:46 GMT


Yes, register Reload and Reload Without Extensions through the CommandManager.

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Sunday Jan 12, 2014 at 23:48 GMT


@redmunds, updates committed.

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Monday Jan 13, 2014 at 02:22 GMT


@redmunds, incorrect changes rolled back.

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Monday Jan 13, 2014 at 13:03 GMT


@redmunds, code review changes committed.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Tuesday Jan 14, 2014 at 00:21 GMT


There are 2 ExtensionManager unit tests that no longer pass:

  • should remove extensions and quit if the user hits Remove and Quit on the removal confirmation dialog
  • should update extensions and quit if the user hits Update and Quit on the removal confirmation dialog

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Tuesday Jan 14, 2014 at 03:24 GMT


@redmunds, code review changes committed.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Tuesday Jan 14, 2014 at 16:45 GMT


Looks good. Merging.

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

1 participant