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 - In code completion is missing command "endl" (without any parenthesis)
Summary: In code completion is missing command "endl" (without any parenthesis)
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Completion (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: nnnnnk
URL:
Keywords: USABILITY
Depends on:
Blocks:
 
Reported: 2008-08-28 07:27 UTC by Martin Fousek
Modified: 2008-09-22 07:22 UTC (History)
0 users

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 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).