Summary: | Code/Function completion done in comments | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | ecarpenter |
Component: | Code completion | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | bluedzins, esigra, greatbunzinni, kouzinopoulos, kreso, pau.capdevila, vdboor |
Priority: | VLO | ||
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
ecarpenter
2003-08-23 13:36:26 UTC
Confirmed. Hardly a severe problem though.. true, but it can get very annoying when one moves up and down through a document and every time the cursor moves pass a comment like "//if" it displays a dropdown box. *** Bug 91832 has been marked as a duplicate of this bug. *** *** Bug 114521 has been marked as a duplicate of this bug. *** I agree that this behavior might not always be desired, but it's hardly a bug. When typing comments, I frequently refer to variables and functions in the code, and the completion saves me time, and makes sure that I spell the names correctly. I can understand wanting to disable this behavior. But I don't think it's a bug. Please consider turning this into a wishlist item instead of a bug report (I could do that, but I think it's fair to get feedback first). A simple checkbox that disables the completion in comments would please the people that think it's a problem without annoying those of us who like it. For me: severity = wish. Thanks, *** Bug 123068 has been marked as a duplicate of this bug. *** No please, not another option :/ Compare the times you want to refer to a function inside a comment vs the times you don't. This is a bug and a very irritating one. I accidently wrote similar report for kate directly, so here is the most important part from that report: Please add an option to control the "source" for auto word completion feature: Whole document except [ ] comments [ ] quotations and I agree that getting words from comments are pretty annoying. *** Bug 126858 has been marked as a duplicate of this bug. *** > I accidently wrote similar report for kate directly,
> so here is the most important part from that report:
> Please add an option to control the "source" for auto
> word completion feature: Whole document except
> [ ] comments [ ] quotations
> and I agree that getting words from comments are
> pretty annoying.
At this point I wonder what happens when the usability people see this. My guess is, they'd recommend to remove the option straight away. I'll agree with Haris: there are hardly any reasons why you want code completion in comments. And most comments contain English text, not code.
But for what it's worth.. I'd even rather have another (stupid IMHO) option that a long debate about what to do, because this bug is getting a big annoying. ;-)
I agree with complete removal of completion in comments and string constants. Maybe it's not a question of voting which solution to do, but let me add a little pointer: if Microsoft in Visual Studio decided to go that way, there may be some good reason... ;-) Sorry, but I agree with comment #5. I like code completion in the comments. And nobody as yet provided a scenario where this can be considered a bug. So basically it should be configurable. This is IMHO a very low priority wishlist. No, it really shouldn't be an option. Fortunately, we're currently testing a recently submitted patch that appears to do the Right Thing for C++: It does not automatically complete inside comments, but it does complete when explicitly asked to do so (using the ctrl+space shortcut). Unfortunately, this doesn't affect the PHP Code Completion that the reporter used as an example. Nor will it affect the "word completion" that Maciej Pilichowski talks about, since that is a KTextEditor plugin (part of the kate codebase) and works completely on strings and has no knowledge (afaik) about context. I completely disagree with #13. Its definately a bug and a very high priority IMHO. With annoyances like this one people are turned away from kdevelop The times you don't need autocompletion in a comment and having an annoying popup in EACH word you write over the times you actually need autocompletion in comments is around 100/1 And diederik is right: please no more configuration bloat :/ > It does not automatically complete inside comments, but it does complete > when explicitly asked to do so (using the ctrl+space shortcut). > Nor will it affect the "word completion" that Maciej Pilichowski talks > about, since that is a KTextEditor plugin (part of the kate codebase) and > works completely on strings and has no knowledge (afaik) about context. Now I am a bit puzzled -- if plugin/engine/program knows where to put AC words why it doesn't know where to get AC words. It is the same context recognition I guess. Btw. after your reply I realized that this whole report is similar but not so similar after all to my original report -- should I open new report with wish about this reversed-AC ;-) problem? quoting comment #5: > And nobody as yet provided a scenario where this can be considered a bug. End your sentence with a period, then press enter. you'll get code completion instead of a newline. quoting comment #14 > not automatically complete inside comments, but it does complete when explicitly asked to do so (using the ctrl+space shortcut). That sounds really cool! I hope this version will be implemented as solution. Nobody will be bothered with unwanted code completion, unless you ask for it :) > The times you don't need autocompletion in a comment and having an annoying > popup in EACH word you write over the times you actually need autocompletion > in comments is around 100/1 You are just saying that you would like to be 99% instead of 100%. Excuse me, but I would like to be 100% productive. Clip your "wings" in other areas like this and wonder why you spend so much time fighting with every-day work. > And diederik is right: please no more configuration bloat :/ Why not? Because Kdevelop would be too powerful tool? After another session with writing code I think (I still opt for configuring AC) that the best would be even more flexible approach -- configuring sources for AC and for each source possible target. Source and target would be -- source code, comments, quotations. This way I could configure AC that I can use words from source code in comments, but not vice versa (plus source code in source code, comments in comments, etc.). Writing code and comments for it (when I use names of variables, methods, etc) would be much faster (and less stressing my hands -- which I greatly appreciate). This started out as a bug report against php code completion. (Is it still valid?) And now it's.. what, exactly? Unless an issue can be reasonably "scoped", it can never be implemented/fixed and the report just turns into bug database bloat. > This started out as a bug report against php code completion. (Is it still > valid?) For C++ -- sure. > And now it's.. what, exactly? Original report -- AC kicks in within comments. Complementary problem (if I should "fork" this please let me know) -- AC gets words from comments. Try to type: const // co| and vice-versa // football fo| @Maciej Yeah, I suspected that.. What you are seeing is completion from the katepart wordcompletion plugin. Go into Settings->Configure Editor->Plugins. I'm betting you have "KTextEditor Word Completion Plugin" active. Right? That feature, as Anders Lund explained in Bug #126858 only "searches for text" and has no concept of "inside comments" or such. If you have both it, the kdevelop abbrev plugin and c++ code completion active, you will probably have a bit of a mess (and sometimes confusing results). > What you are seeing is completion from the katepart wordcompletion plugin. > Go into Settings->Configure Editor->Plugins. I'm betting you have > "KTextEditor Word Completion Plugin" active. Right? Right. But is this something wrong? > That feature, as Anders Lund explained in Bug #126858 only "searches for > text" and has no concept of "inside comments" or such. Yes, I know, my point is -- it should get that concept :-) I understand why it works the way it does. > If you have both it, the kdevelop abbrev plugin and c++ code completion > active, you will probably have a bit of a mess (and sometimes confusing > results). Why? AC kicks in automatically, abbreviations -- not. I have to press ctrl+l to "unfold" abbreviation. Well, if you disagree with how the katepart word completion works, you should make a wish against that software, not kdevelop. (Which you already have with bug #126858...) Looks like you are right about abbrev.. I think it has changed behaviour since I last used it (I've had it off for years) ;) We have "CC" - CodeCompletion (This is implemented in KDevelop and is based on a language parser.) and "WC" - Word Completion (This is implemented in Kate(part).) "AC" is your invention. :) CC is the only thing that can be affected from KDevelop, and for C++, it will be updated in 3.4. I don't know the state of PHP-CC. Can we please just get a checkbox that will cause code completion to be turned off in comments. Looks like there are significant numbers of us that are on both sides of this issue. Personally I find that it's impossible to comment my code with this enabled. I'm using 3.3.3 on 3.5.1 level 'a' on SUSE 10.1 btw, Thanks for listening. dd This line of concern/interest was opened 2003-08-23. I am new to the kde website system. Has this bug/wish been put to rest? If so, how do I fix it/turn it off? I am currently using KDevelop 3.3.2 (KDE 3.5.4). I really must turn this off or remove it, I don't care. My productivity is going down due to this issue and that is a problem. I use a lot of comments in my code and having this pop up show up for every character or add stuff to the end of my comments simply because I hit return is causing me MAJOR problems. If a fix isn't presented soon, even if it is to turn off all auto completion capability, I will have to stop using KDevelop. Please help. Keri The bug is still marked as new, which indicates that the KDevelop developers are still looking at it. Unfortunately that doesn't mean anything. There are still bug reports which are marked as new since 1999 and which were sent when KDevelop was in 1.0-beta1. So what means that a report with a New status can mean anything at all. It can mean that the developers are indeed seriously looking at it but it can also mean that they know that the bug exists but they don't feel like fixing it. To make matters worse, sometimes you can even fix the bug yourself and post the patch and not only that fix won't be accepted but also the bug will persist. Sad but true. You can disable automatic Code Completion completly, I think it is in the "C++ Settings". I have disabled it for exact that reason. This has been fixed three months ago already: http://websvn.kde.org/branches/kdevelop/3.4/?rev=546311&view=rev This "feature" doesn't seem fixed to me using Fedora Core 6, KDE 3.5.5-0.2.fc6 and KDevelop 3.3.5. Autocomplete still pops up within comments. Hi James, of course this is not fixed in 3.3.5, because there's basically no development on 3.3 anymore. Any development for kdevelop3 is taking place in the 3.4 branch, including the fix for this bug. Check the kdevelop.org website for the rc2 or install directly from the svn version. |