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.

Bug 70188 - No way to stop close quote from appearing
Summary: No way to stop close quote from appearing
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Roskanin
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2005-12-10 13:25 UTC by kitfox
Modified: 2007-11-05 13:44 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kitfox 2005-12-10 13:25:58 UTC
As far as I can tell, there is no option to stop either a close single quote or
a close double quote from appearing when the user types the open quote.  Turning
off 'insert close bracket automatically' doesn't help.
Comment 1 Martin Roskanin 2005-12-13 15:20:02 UTC
It is regression and should be fixed into NB 5.0
Comment 2 Martin Roskanin 2005-12-13 15:27:07 UTC
fixed in [maintrunk]

Mila, Roman, could you please review/test the fix? Thanks.

/cvs/java/editor/src/org/netbeans/modules/editor/java/BracketCompletion.java,v 
<--  BracketCompletion.java
new revision: 1.14; previous revision: 1.13

cvs diff -u -r1.13 -r1.14 BracketCompletion.java 
Index: BracketCompletion.java
===================================================================
RCS file:
/cvs/java/editor/src/org/netbeans/modules/editor/java/BracketCompletion.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- BracketCompletion.java	6 Dec 2005 14:13:01 -0000	1.13
+++ BracketCompletion.java	13 Dec 2005 15:23:37 -0000	1.14
@@ -552,6 +552,10 @@
   static boolean completeQuote(BaseDocument doc, int dotPos, Caret caret,
           char bracket) throws BadLocationException {
 
+    if (!completionSettingEnabled()){
+        return false;
+    }
+    
     if (isEscapeSequence(doc, dotPos)){ // \" or \' typed
         return false;
     } 

Comment 3 Miloslav Metelka 2005-12-13 16:44:21 UTC
I approve the fix.
Comment 4 Roman Strobl 2005-12-14 15:14:03 UTC
Verified in trunk build 200512131900. I agree with fixing in release50 branch.
Comment 5 Martin Roskanin 2005-12-14 15:30:10 UTC
integrated into [release50]

/cvs/java/editor/src/org/netbeans/modules/editor/java/BracketCompletion.java,v 
<--  BracketCompletion.java
new revision: 1.13.2.1; previous revision: 1.13
Comment 6 Max Sauer 2005-12-23 13:01:24 UTC
Verified in 5.0 200512222030 && trunk 200512221900.