projectplus
projectplus copied to clipboard
Outline view doesn't update correctly
The outline view doesn't seem to be update correctly when an external application changes the files. For example, when I switch branches using git and it removes files, those files are still visible in the outline view.
This is fixed in my local copy but I'm waiting to push it out until I've fully tested it.
On Jul 10, 2012, at 10:33 AM, [email protected] wrote:
The outline view doesn't seem to be update correctly when an external application changes the files. For example, when I switch branches using git and it removes files, those files are still visible in the outline view.
Reply to this email directly or view it on GitHub: https://github.com/fdintino/projectplus/issues/5
Perfect.
I wanted to give you a heads up that this is currently fixed on the master branch. I haven't recompiled and posted the binary because I'd like to get the Sparkle framework working again so that subsequent updates can be pushed out via an appcast feed.
Cool, I'll give it a try.
I'm not entirely sure but I don't think the outline view properly resorts when the window becomes active.
That's odd, I've tried it a number of different ways and I've had very reliable resort behavior on focus. A few questions to help narrow down the cause:
- Are you working on a network mounted folder?
- In the TextMate preferences, under the ProjectPlus pane, do you have "Add sorting options" checked?
- If the answer to the previous question is yes, do you have any of the sort options selected? (Right click on the OutlineView → Sort → (Folders on Top | By Extension | Descending))
- Do you have any TMPlugins installed that might interfere with the functioning of ProjectPlus, such as MissingDrawer?
- Do you have any plugins installed that might affect applicationDidUpdate notifications, such as ReMate?
I once made the mistake of deleting and copying ProjectPlus.tmplugin into ~/Library/Application Support/TextMate/PlugIns while TextMate was still open, which prevented files from being updated and stumped me until I realized my mistake... probably not what happened but worth a mention.
Thanks for helping test this.
- I'm not working on a network folder
- I do have "Add sorting options" checked
- I have "Folders on Top" selected
- I have ProjectPlus, ReMate TextmateMinimap and TMTools installed
I've used the updated ProjectPlus for about a day now and I've seen the problem once. I don't know if it matters but the files change from outside of TextMate when I use git.
I seen this issue a couple of more times. Just now I did a git rebase
in a project and the outline view doesn't get sorted when the window gets focus. If I manually "close" a folder and then open it again it's sorted. Also if I use the hot key for showing the current file in the outline view it's sometimes not sorted.
You're quite right about that, I've seen it myself.
So, as far as I can tell, my changes fix the majority of the sorting issues. This remaining problem is I believe caused by some sort of race condition between the sorting code, the SCM code (if enabled), and some bit of original TextMate sorting code that I haven't yet been able to track down. I was led to this conclusion because I noticed that the problem occurs relatively infrequently on large git repositories, whereas it occurs quite often on small, non-source-controlled projects. It's also possible that actions which might confound the SCM code temporarily (e.g. a rebase) might also resurface TextMate's default sorting method.
I unfortunately have not had much time to dedicate to this lately; my team at The Atlantic is launching a new CMS coincident with the publication of the September 2012 issue on August 23rd. It's a fairly large project, so I haven't had much sleep let alone free time. After this Thursday (plus a few days of padding for rest) I can come back to this.
Something tangentially related that I'd like to do afterward fixing this ticket is work on speeding up the performance of the git SCM code, perhaps by switching from calling NSTask on a git binary to using the libgit2 api via Objective Git and adding threading to the dataSource updates in the NSOutlineView. The latter part will be tricky, given the non-thread-safety of almost all NSFoundation methods, but I have a few ideas on how to go about it.
If you have a few hours to kill you can try to track down the actual method where TextMate is performing its default sorting so that it can be directly overridden; I think that would be the key to fixing this last issue. All I've been able to find so far are the methods that call it, and I haven't figured out how to load TextMate into the XCode debugger, or if that's even possible—though I suppose one could export the symbols from ProjectPlus and load it up in gdb the old-fashioned way).
No rush. I just tried to provide some more detail of the issue.