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 145380

Summary: In code completion is missing command "endl" (without any parenthesis)
Product: cnd Reporter: Martin Fousek <marfous>
Component: Code CompletionAssignee: nnnnnk <nnnnnk>
Status: VERIFIED FIXED    
Severity: blocker Keywords: USABILITY
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Martin Fousek 2008-08-28 07:27:57 UTC
Product Version: NetBeans IDE Dev (Build 200808261401)
Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b13
System: Linux version 2.6.24-19-generic running on i386; UTF-8; en_US (nb)

Observed:
In this source code below in code completion, there isn't available command "endl" without any parenthesis. CC offers to
me only endl().

#include <stdlib.h>
#include <iostream>
int main(int argc, char** argv) {
    std::cout << std::en
    return (EXIT_SUCCESS);
}
Comment 1 Vladimir Voskresensky 2008-08-28 08:52:28 UTC
I'd like to clarify, that endl is really the function from std namespace, so may be displaying endl() in popup list is
correct. The incorrect behavior is that choosing endl() in list produces incorrect code 
std::cout << std::endl() instead of 
std::cout << std::endl

So, I would suggest to fix the problem by inserting endl without () when it is after "<<" operator 
What do you think?
P.S. the critical part here is the overridden operator "<<" which takes names of function as it's parameter, so we
should insert only name of function and not function call in such a case.
Comment 3 Martin Fousek 2008-09-22 07:22:20 UTC
Verified in NetBeans IDE Dev (Build 200809220201).