Community
Participate
Working Groups
hello, a format feature like in JDT would appreciated. regards Xavier
See also bug 9999.
*** Bug 23541 has been marked as a duplicate of this bug. ***
*** Bug 45202 has been marked as a duplicate of this bug. ***
PR was not targeted to any particular release. Changing target milestone to 2.1
Redirected to Alex, for more work and plan item.
*** Bug 72760 has been marked as a duplicate of this bug. ***
Created attachment 14432 [details] This is a patch for Cdt.core This patch (together with the next one) creates general framework for formatter attachment.
Created attachment 14433 [details] This is a patch for cdt.ui plugin This patch (together with the previous one) creates general framework for formatter attachment.
Thanks patch apply. Alex, lets close this PR. We can deal with new problems in new Focus PRs. This is no longer an enhancement.
Patch in cdt-2.1
I can't help the feeling I must be either be doing something stupid, or failing to find the right bug in bugzilla, but this really doesn't work for me at all. The formatter does correctly indent when I open or close a brace: if(foo) { /* this line starts here */ } but 'Format' on the edit menu doesn't do anything, and 'Indent line' (which I have bound to 'Tab') just inserts four spaces at the cursor. This with eclipse 3.1.1, CDT 2.1.1
I've also just tried CDT 3.0.1, with the same effect.
It's great that there's a framework, but are there any plans to provide a built-in formatter, rather than each person having to cobble something together?
When typing it works, but like comment 12 says, using the format drop down doesn't work. I tried installing simple indent (http://softwitch.net/blog/index.php/simple-indent-110-has-been-released/) but this has basically the same problem. It works using the format drop down, but not when inputing text. One of the nice things about simple indent is that you can customize the indent style.