Community
Participate
Working Groups
class TestClass { public: class TestNestedClass { int a; }; TestClass(); virtual ~TestClass(); }; Generates: int TestNestedClass::getA() const { ... void TestNestedClass::setA(int a) { ...
Created attachment 171365 [details] Handle nested classes patch
Created attachment 230043 [details] Minimal project to verify the problem Verified with eclipse-SDK-4.3M5a-win32-x86_64. The refactoring does work if the definitions are inline, obviously. You have to select the "Definition separate from declaration" checkbox to make it generate the invalid code.
I suspect that solving this will depend on bug 402878, which is enhancing the index to track the nested status of classes. Possibly the existing namespace support is sufficient, but probably not. If a committer would add 402878 to the "Depends on" list, that'd be useful.
(In reply to comment #3) This bug doesn't depend on bug 402878 since class nesting structure is available in the index. Bug 402878 is about visibility of nested classes, which is irrelevant for this use case.
Proposed fix: https://git.eclipse.org/r/13843
Fix applied to master. I created bug 419919 for further improvements to handling namespaces in generated code.