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] Adds a refresh menu item #3167

Open
core-ai-bot opened this issue Aug 29, 2021 · 9 comments
Open

[CLOSED] Adds a refresh menu item #3167

core-ai-bot opened this issue Aug 29, 2021 · 9 comments

Comments

@core-ai-bot
Copy link
Member

Issue by njx
Sunday Apr 07, 2013 at 17:25 GMT
Originally opened as adobe/brackets#3370


This is a continuation of@victorgama's pull request #2786 to add manual refresh to the project tree (addresses #3124).

Changes since that pull:

  • null out _lastSelected when refreshing (avoids an exception)
  • restore selection after refreshing
  • more accurately determine when tree is done refreshing (this is the tricky bit)
  • move the "Refresh" context menu item to the bottom below a divider, since it's not specific to the currently selected file/folder as the other items are

Not urgent, but would be nice to get this functionality in so extensions can request the tree to manually refresh as well (e.g. #3252).

Updated: removed it from the project dropdown since we're no longer putting functionality there


njx included the following code: https://github.com/adobe/brackets/pull/3370/commits

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Friday Apr 19, 2013 at 19:53 GMT


I wonder if this sort of "Promise queue" construct is something we should add to the Async utils module... would that help to simplify the code in ProjectManager?

@core-ai-bot
Copy link
Member Author

Comment by njx
Wednesday Apr 24, 2013 at 00:51 GMT


Rebased onto most recent master. Haven't addressed code review comments yet.

@core-ai-bot
Copy link
Member Author

Comment by njx
Friday May 10, 2013 at 01:55 GMT


Reviewed. Open for committers to review, though I should address@TomMalbran's feedback first.

@core-ai-bot
Copy link
Member Author

Comment by njx
Saturday May 18, 2013 at 00:09 GMT


@gruehle - see my comment above. Ready for review.

@core-ai-bot
Copy link
Member Author

Comment by njx
Sunday May 19, 2013 at 04:40 GMT


Ready for re-review. One last thought...do you think we should be paranoid and have a timeout in case the render promises don't all complete within some amount of time? I'm sufficiently worried about the complexity of the codepaths involved (and the possibility of bugs in jstree), and things are likely to break if projectOpen never gets sent out.

@core-ai-bot
Copy link
Member Author

Comment by gruehle
Sunday May 19, 2013 at 04:44 GMT


Yeah, it would be a good idea to have a timeout, just in case. The Async module has a withTimout() method for easily adding a timeout to any promise.

@core-ai-bot
Copy link
Member Author

Comment by njx
Sunday May 19, 2013 at 05:18 GMT


Added the timeout (withTimeout() is super handy!). However, now I'm noticing that even in master (without my changes), there's a problem with restoring open folders--if I open a bunch of different folders, then quit and restart Brackets, it seems like only the first folder is reopened properly--filed as #3905. Do you think we should track that down before merging this?

@core-ai-bot
Copy link
Member Author

Comment by njx
Sunday May 19, 2013 at 05:22 GMT


Actually...it looks like that functionality has never worked properly for more than one open top-level folder :( So I guess we can go ahead and merge this :)

@core-ai-bot
Copy link
Member Author

Comment by gruehle
Sunday May 19, 2013 at 14:01 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