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.
Summary: | "Encapsulate Fields" wizard adds method definition into wrong place | ||
---|---|---|---|
Product: | cnd | Reporter: | soldatov <soldatov> |
Component: | Editor | Assignee: | Vladimir Voskresensky <vv159170> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
soldatov
2010-02-05 04:19:48 UTC
I'm lost what is expected here :-) setter were inserted in header after GetDiscount() => in cpp they were tried to be inserted after the same function. Ok. Other sample. Source files in project ====== main.cpp ============ #include "class1.hpp" int main() { Class1 c1; c1.method1(1); return 0; } ====== class1.cpp ============ #include "class1.hpp" Class1::Class1() { } void Class1::method1(int a) { i = a; return; } void Class1::method2(int a) { j = a; return; } void Class1::method3() { return; } ====== class1.hpp ============ class Class1 { public: Class1(); void method1(int a); void method2(int a); private: void method3(); int i; int j; }; ============================= Scenario: - Call "Refactor|Encapsulate Fields" context menu in Class1 class - Press "Select All" button - Select "After method3(): void" in "Insert Point" combobox - Press "Refactor" button ==> expected result: ====== class1.cpp ============ void Class1::method3() { return; } <-- new getters and setters should be added ====== class1.hpp ============ private: void method3(); <-- new getters and setters should be added int i; int j; ============================= |