This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | wrong quotes completion | ||
---|---|---|---|
Product: | editor | Reporter: | Milos Kleint <mkleint> |
Component: | Completion & Templates | Assignee: | Martin Roskanin <mroskanin> |
Status: | RESOLVED DUPLICATE | ||
Severity: | blocker | CC: | jtulach |
Priority: | P3 | ||
Version: | 4.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | test (prolly wrong because it's not failing. |
Description
Milos Kleint
2004-10-06 12:21:14 UTC
Created attachment 18077 [details]
test (prolly wrong because it's not failing.
ad. 1. In most cases it's good that backspace deletes both quotes. In your case just use delete instead of backspace. ad. 2. It only happens at the end of line. Put a semicolon and it won't longer happen: String var = "text|; ad 1. in what cases it's ok? I would assume that deleting both quotes makes sense in this case String name = ""| but nowhere else. ad 2. your suggestion is just a workaround IMHO. The ditor should know I'm closing the string. ad. 1. When you wanted to type something else (like ', ;, :, /) and you accidently pressed ", I expect backspace to delete what I typed. If I typed *one* character I want *one* backspace to delete it, even if it inserted two characters. ad. 2. Yes, you're right, I just wanted to notice, that it's not a common scenario to type " at the end of line, so the problem has never hit me. I think that the case 1) cannot be resolved while retaining the pair-character completion. You may intend to write '"xx" + text' instead of just quoting the 'text' and in that case the extra added quote would be useful. The only additional logic that could help here would be to check the 'text' in your example against a list of the local and instance variables and if the text does not match any of them then add only a single quote. But that's sort of fuzzy. Regarding the second problem we should add a check for unclosed string and in that case add only a single quote. We should be able to resolve this into promoE. *** Issue 51194 has been marked as a duplicate of this issue. *** I have a further observation. If I have "some text '" and I now delete the ' character it also deletes the " character as well. But, "some text ' " will leave the double-quotes. The syntax-highlighting realizes that the single-quote is in a double-quoted string. Perhaps some logic can be re-used here. *** Issue 55018 has been marked as a duplicate of this issue. *** We should really revise the automagic behaviour of quotes. It happens too often that undesired quotes are added. *** Issue 58367 has been marked as a duplicate of this issue. *** *** Issue 60801 has been marked as a duplicate of this issue. *** *** Issue 61035 has been marked as a duplicate of this issue. *** This is not Mac specific issue. *** Issue 58198 has been marked as a duplicate of this issue. *** Making a duplicate of a higher priority issue. *** This issue has been marked as a duplicate of 67775 *** |