| Summary: | Generate Getters and Setters expands macro with typedef and breaks formatting | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Marc-André Laperle <malaperle> |
| Component: | cdt-refactoring | Assignee: | Sergey Prigogin <eclipse.sprigogin> |
| Status: | RESOLVED FIXED | QA Contact: | Sergey Prigogin <eclipse.sprigogin> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug, eclipse.sprigogin |
| Version: | 8.1.0 | ||
| Target Milestone: | 8.1.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
The issue was fixed by minimizing areas of code affected by the refactoring changes. This minimization had a huge ripple effect. *** cdt git genie on behalf of Sergey Prigogin ***
Bug 363244 - Generate Getters and Setters expands macro with typedef and
breaks formatting. The bug was fixed by minimizing areas of code
affected by the refactoring changes. This minimization had a huge ripple
effect.
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=c521604dd1dde08dfd55e8e08fae1de4ad6a2e21
Thank you. With this change, I can finally use Generate Getters and Setters in my code base! I saw a case of a method definition being reformatted just below where a declaration was inserted but I didn't take note of where and now can't reproduce it. I'll open a new bug if I can get it to happen again. (In reply to comment #3) > I saw a case of a method definition being reformatted just below > where a declaration was inserted but I didn't take note of where and now can't > reproduce it. I've found and fixed the bug that was causing this. (In reply to comment #4) > (In reply to comment #3) > > I saw a case of a method definition being reformatted just below > > where a declaration was inserted but I didn't take note of where and now can't > > reproduce it. > > I've found and fixed the bug that was causing this. Thanks. Do you have a test case locally for this? I'd like to confirm that it was something similar to what I was seeing in my code base. (In reply to comment #5) > Thanks. Do you have a test case locally for this? I'd like to confirm that it > was something similar to what I was seeing in my code base. I saw it in a situation like: test.h ------ namespace ns { class A { public: void m(); int getX() const { return x; } private: int x; }; } test.cc ------- #include "test.h" namespace ns { void A::m() { } } Generate setter with implementation in the test.cc. (In reply to comment #5) Forgot to mention that you also need some arbitrary code after the closing namespace brace in test.cc. |
Using CDT 8.1.0.201111072207 Example: #define Typedef \ typedef int Int class Test { public: Typedef; void Foo(); Test(); int test; }; Use Generate Getters and Setters on 'test' field. Result: formatting changes and 'Typedef;' is expanded to 'typedef intTypedef'.