Summary: | editor doesn't check for file updates outside IDE | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | noster |
Component: | All editors | Assignee: | KDevelop Developers <kdevelop-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | holger-kde, per.angstrom |
Priority: | HI | ||
Version: | 3.0.0a4 | ||
Target Milestone: | --- | ||
Platform: | Debian stable | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
noster
2003-05-16 17:40:21 UTC
This is a regression against KDevelop 2. Changing priority to HI. IDEAl mode (CVS HEAD) will show you external modifications. It won't automatically reload the file, though. It should at least ask the user if he want's to reload the file when it detects it... An alternative or addition would be to add a menu alternative to the editor-context menu to reload the file. We've got cvs setup so it adds several fields to the source files, which means that everytime something is checked in we have to close the file and locate it again to view it. The F5 trick that the original poster mentions DOES solve this, but I'd prefer a 'reload' menu option also. The F5 function seems to be undocumented anyway. ....to clarify... F5 does work, it reloads the document... but I have to press it TWICE for the icon on the tab-bar to disappear. I just would like to clarify that F5 isn't a solution. Imagine you have several [15?] open files and do cvs update on the tree. Which sources should you reload? All of them? This should be handled the way Kate does it - pop up a yes/no requester for each modified file and reload according to answer. No more no less... It'd be nice to see a Yes to All, like MS Vis Studio .net has. *** Bug 68118 has been marked as a duplicate of this bug. *** Is this really the same as 68118? 68118 talks about showing visual notification _within_ kdevelop when you modify a file. This bug talks about what happens when an application outside modifys a file. I can see where you would use the same code but the notifications are totally different. But we do eventually need to see which files were modified ... and currently the only way to do it after you've made changes yourself is to look for the '*' in the status bar ... that's not nice. OK, this should now be back to where it was a few months ago. When an external modification occurs, KDevelop will change the editor window icon (typically the tab icon) into a different icon signalling this. Some issues remain: #It does not throw up a dialog unless you attempt to save the file, which I guess is debatable. #There is only one icon to play with, and a file can be both externally and internally changed, at which point I think externally takes precedence (internal changes is still visible in the statusbar (at least in katepart 3.1+)). #There is no tooltip explaining what the icon means. This is bad. # more? Actually, I can't make it show me a warning dialog about overwriting externally modified files at all.. So this bug is really only fixed in part. In bug #23908 I was told that the problem would be fixed in KDevelop 3.0.0. I now find that it's actually even worse than before. BTW: this is probably platform-independent. I run SuSE 9.0. The problem is still there in Kdevelop 3.0.1. I edit 10 file sin Kdevelop, then i commit them with to CVS with an external tool (lincvs or tkcvs). The when i switch back to Kdevelop the files are not updated at all, and there is no notification, no big warnings !!! In my opinion, this is a VERY important behavior : Kdevelop should at least offer 2 general options like ! - Notify when a file is externally modified (YES/NO) - Automatically synchronize with external modifications (YES/NO) My standard for comparing this (and a lot of smart editor features) is EMACS. Emacs has one more feature that doesn't seem to be captured above. Emacs' notifications all include a hint about whether the file had been changed without being saved since it had been loaded into memory. The implication is that if a reload occurs when no changes have been made, then it is far less likely that information will be lost. Therefore the auto-reload process is relatively safe and is much easier to do. (In fact it is more or less automatic as I recall.) However, if changes have been made, then emacs is VERY picky about allowing you to make any moves which will either wipe out the data you edited in the buffer, or wipe out any changes the third party made to the disk. Kdevelop shows only one notification with no feedback about whether changes occurred in just one place or in both places. It does change its behavior to make it more difficult to damage either set of changes, but it does not take that extra step of noticing that you hadn't really made any changes in the buffer since it was last loaded/saved and make it easier/less scary to load in the third party changes. As for notification, Emacs will basically stay quiet about the issue UNTIL you make any attempt to change the file in memory, or to save it over somebody else's changes, or close it without saving (if you had made changes in the buffer). As soon as you type a character or make some other change in a buffer that was saved by another app after it had last been read by emacs, THEN a message pops up asking you what you want to do. (New File, Revert, Save, Cancel) The save is followed by an 'are you sure' message. I have found this to be the smoothest and easiest way to deal with these issues of any program I ever dealt with. Mimicry is the sincerest form of flattery...Take the best features from all sources. I just downloaded KDevelop 3.0.3. To my horror, I found that this bug is still present. I'm sorry but I just can't trust my source files to KDevelop. This is finally done in HEAD, if the editorpart used in katepart. It still has a few issues, but is more or less FIXED. |