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 248841 - Code Assistance Algorithm does not handle parenthesis correctly in C++
Summary: Code Assistance Algorithm does not handle parenthesis correctly in C++
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0.1
Hardware: PC Windows 7
: P4 normal (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-23 16:03 UTC by aschwarz1309
Modified: 2014-11-30 19:19 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description aschwarz1309 2014-11-23 16:03:26 UTC
Product Version = NetBeans IDE 8.0.1 (Build 201408251540)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_45
Runtime = Java HotSpot(TM) 64-Bit Server VM 24.45-b08

The New, Updated Code Assistance Algorithm is causing me fits.

1: Adding parenthesis:
    a. Add:  ...()
    b. Change:  ...(abc)
    c. Continue by typing '(':  ...(abc))  
        the two ')' are a result of typing ')' after 'c'.
    d. The old algorithm would not insert a parenthesis but would move the cursor to the next character following the parenthesis.
         The result would have been: ...(abc) with the cursor placed after the right paren.
    Example:
           fn()  then
           fn(a, b, c))   typing a paren after 'c' does not skip to the character following the right paren.
    

2: Adding semicolon:
    a. Use a parenthesized macro expression:   MACRO()
    b. Insert parameters:  MACRO(a=b)
    c. Add a semicolon (;) after b yields:  MACRO(a=b); instead of MACRO(a=b;)
    Example:
            DEBUG(debugFlags & DEBUG_EXEC,
                 cout << "Best Column" << bestCol << endl)

            Adding ';' after endl yields:
            DEBUG(debugFlags & DEBUG_EXEC,
                 cout << "Best Column" << bestCol << endl);

           Instead of:
            DEBUG(debugFlags & DEBUG_EXEC,
                 cout << "Best Column" << bestCol << endl;)