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] Added projectRefresh event when project tree is refreshed but project root has not changed. #4451

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

Comments

@core-ai-bot
Copy link
Member

Issue by zaggino
Sunday Aug 18, 2013 at 00:00 GMT
Originally opened as adobe/brackets#4815


I need an event like this for my git extension which hooks on project tree and displays branch information from git. I have not found any other way to hook onto this.


zaggino included the following code: https://github.com/adobe/brackets/pull/4815/commits

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Monday Aug 19, 2013 at 17:27 GMT


If the idea is to get notifications when files are added/deleted/renamed, hanging those notifications off of ProjectManager doesn't seem ideal. But OTOH, once we add file watchers we'll probably have a whole different API for file-change notifications, so maybe it's not so bad to notify from ProjectManager for now & then deprecate it later...?

@core-ai-bot
Copy link
Member Author

Comment by WebsiteDeveloper
Monday Aug 19, 2013 at 17:48 GMT


@peterflynn@zaggino i already added an extension which updates the file tree, maybe when the new proposed extension api is in place you could hook in to change events there.
By the way the extension is called FileWatcher

@core-ai-bot
Copy link
Member Author

Comment by zaggino
Monday Aug 19, 2013 at 22:53 GMT


@peterflynn@WebsiteDeveloper my problem with hooking on any file change/add/delete/rename actions is that when user switches branches on git, none of this occurs. All files might be exactly the same on two different branches. Right now user has to change branches outside of brackets (I haven't implemented that yet but it's in plan though) and when he goes back to brackets, right clicking on the file tree and using "Refresh File Tree" won't help him, because there's no event to hook on. Maybe the event should be placed somewhere else but this seemed like a good place to me and it works fine.

@core-ai-bot
Copy link
Member Author

Comment by njx
Tuesday Aug 20, 2013 at 00:23 GMT


Initial review done. I think it's okay to add this because it's different from individual file notifications--it's specifically saying that the UI of the file tree has been torn down and rebuilt, and extensions that are annotating the tree might need to reapply themselves.

@core-ai-bot
Copy link
Member Author

Comment by zaggino
Tuesday Aug 20, 2013 at 02:41 GMT


@njx Added the docs for the event.

@core-ai-bot
Copy link
Member Author

Comment by zaggino
Tuesday Aug 27, 2013 at 13:21 GMT


@njx can you take a second look at this?

I can move the event out of the if-else if desired.

@core-ai-bot
Copy link
Member Author

Comment by njx
Thursday Aug 29, 2013 at 21:38 GMT


Sorry, been busy. Will try to get to this soon.

@core-ai-bot
Copy link
Member Author

Comment by njx
Wednesday Sep 04, 2013 at 21:33 GMT


Seems fine. I'm going to push up another commit to tweak the comment after merging this. Thanks.

@core-ai-bot
Copy link
Member Author

Comment by zaggino
Wednesday Sep 04, 2013 at 21:42 GMT


Thanks@njx

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