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 179954 - "implement method" feature
Summary: "implement method" feature
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Completion (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal with 3 votes (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-28 05:05 UTC by dmit10
Modified: 2017-02-05 12:01 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 dmit10 2010-01-28 05:05:38 UTC
There's a feature that would be useful to have. Show "lamp hint" in 
the line where c++ method is declared within a class with inscription 
"implement method" (if it is not implemented yet). When user selects it 
NetBeans should insert a stub like

returnType className::methodName(Arg1Type arg1, Arg2Type arg2[, ...]) {
}

taking into consideration special words like "virtual", "static", "const". The 
place where to put this stub should be selected by some rules. I propose the 
following:

if there is any other method in the class and method "className::methodName" 
is declared after "className::anyOtherMethod" its implementation should be 
after its implementation. 

class A{
void B();
void C();
void D();
};

------- somewhere in the project (in the same file or any other): -------

void A::B(){
}

//insert implementation stub of A::C ---> here

void A::D(){
}


If "className::anyOtherMethod" is not implemented yet we consider the method 
before "className::anyOtherMethod" and so on. If it the first method 
implemented in the class consider method below. If there is no method that 
implemented than: if the class declared in file.h user file.cpp for 
implementation, if the class declared in file.cpp, insert an implementation 
after the class declaration.
Comment 1 Alexander Simon 2013-10-03 06:28:01 UTC
see bug #213811
Comment 2 mambu 2017-02-03 15:51:27 UTC
It would be good if we could choose to make the implementation stub inline. In that case it would go in the same file and after the class definition.

class A{
void B();
void C();
void D();
};

------- in the same file: -------

//insert implementation stub of A::C ---> here

inline
void A::C()
{
}

I have tried the feature described in the bug #213811 but it does not seem what was asked here. Or at least I can get it to work for that.

Thanks