Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 22932 - format fetaure
Summary: format fetaure
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 2.0   Edit
Hardware: PC other
: P3 enhancement (vote)
Target Milestone: 2.1   Edit
Assignee: Alex Chapiro CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 23541 45202 72760 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-08-28 03:15 EDT by Xavier Méhaut CLA
Modified: 2009-01-09 16:43 EST (History)
6 users (show)

See Also:


Attachments
This is a patch for Cdt.core (17.28 KB, text/plain)
2004-09-07 15:34 EDT, Alex Chapiro CLA
no flags Details
This is a patch for cdt.ui plugin (57.78 KB, text/plain)
2004-09-07 15:35 EDT, Alex Chapiro CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Méhaut CLA 2002-08-28 03:15:06 EDT
hello,
a format feature like in JDT would appreciated.
regards
Xavier
Comment 1 Johan Walles CLA 2002-08-29 07:15:42 EDT
See also bug 9999.
Comment 2 Alain Magloire CLA 2003-07-30 12:25:36 EDT
*** Bug 23541 has been marked as a duplicate of this bug. ***
Comment 3 Thomas Fletcher CLA 2004-05-26 08:34:31 EDT
*** Bug 45202 has been marked as a duplicate of this bug. ***
Comment 4 Kleo Hapitas CLA 2004-07-07 16:57:07 EDT
PR was not targeted to any particular release. Changing target milestone to 2.1
Comment 5 Alain Magloire CLA 2004-08-16 14:38:04 EDT
Redirected to Alex, for more work and plan item.
Comment 6 Alain Magloire CLA 2004-08-27 10:56:42 EDT
*** Bug 72760 has been marked as a duplicate of this bug. ***
Comment 7 Alex Chapiro CLA 2004-09-07 15:34:33 EDT
Created attachment 14432 [details]
This is a patch for Cdt.core 

This patch (together with the next one) creates general framework for formatter
attachment.
Comment 8 Alex Chapiro CLA 2004-09-07 15:35:32 EDT
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.
Comment 9 Alain Magloire CLA 2004-09-07 16:32:26 EDT
Thanks patch apply.

Alex, lets close this PR.
We can deal with new problems in new Focus PRs.

This is no longer an enhancement.
Comment 10 Alain Magloire CLA 2004-11-04 09:41:05 EST
Patch in cdt-2.1
Comment 11 Richard van der Hoff CLA 2005-12-22 07:34:26 EST
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
Comment 12 Richard van der Hoff CLA 2005-12-22 08:25:08 EST
I've also just tried CDT 3.0.1, with the same effect.
Comment 13 David Whiteman CLA 2006-04-13 12:38:42 EDT
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?
Comment 14 Matt Gillette CLA 2006-05-25 16:46:19 EDT
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.