Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 255105 - [typing] Correct Indentation doesn't use Java Formatter settings
Summary: [typing] Correct Indentation doesn't use Java Formatter settings
Status: RESOLVED DUPLICATE of bug 75573
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.4.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-12 16:06 EST by Daniel B. CLA
Modified: 2008-11-17 03:43 EST (History)
2 users (show)

See Also:


Attachments
my current preferences (120.19 KB, application/octet-stream)
2008-11-12 16:06 EST, Daniel B. CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel B. CLA 2008-11-12 16:06:34 EST
Created attachment 117711 [details]
my current preferences

Build ID: M20080911-1700

The Source . Correct Indentation command doesn't seem to
follow the Java . Code Style . Formatter settings at all.


When invoking Format on the following lines it indents them 
as follows:

:    public void test1()
:	throws Exception,
:	    Exception
:    {
:	InputStream testInput = this
:			.getClass()
:			.getResourceAsStream(
:					      "/dsb/accump3/submain/yEncTest1Input.yenc" );

invoking Correct Indentation changes the indentation to 
this:

:    public void test1()
:    throws Exception,
:    Exception
:    {
:	InputStream testInput = this
:	.getClass()
:	.getResourceAsStream(
:	                     "/dsb/accump3/submain/yEncTest1Input.yenc" );


Steps To Reproduce:
1. Have a formatter configuration and code that show the 
   problem (e.g., my attached preferences and the above 
   code nested in a class declaration).
2. Select the code and invoke Source . Format.
3. Invoked Correct Indentation.
4. Notice that the indentation changes (and changes to 
   something other than what is specified in the 
   formatter configuration). 

More information:

(If somehow the Correct Indentation command is not intended 
to follow the formatter preferences, then 
1) that needs to be make much clearer in the documentation 
   (and probably in the GUI), and
2) the indenter needs to be configurable too.
Comment 1 Jerome Lanneluc CLA 2008-11-13 04:52:10 EST
Move to JDT/UI to investigate
Comment 2 Dani Megert CLA 2008-11-13 05:06:00 EST

*** This bug has been marked as a duplicate of bug 75573 ***