Bug 38523 - so add "Insert new line after each parameter if line is too long" checkbox to Preferences > Java > Code Formatter > New Lines
Summary: so add "Insert new line after each parameter if line is too long" checkbox to...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P4 enhancement (vote)
Target Milestone: 3.0 M6   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-05 11:06 EDT by Slavik Lazor CLA
Modified: 2003-12-17 06:32 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Slavik Lazor CLA 2003-06-05 11:06:08 EDT
if i have such method 
	public static void parseRendererURL(
		Template template,
		String prefix,
		String urlBlock,
		String urlVariable,
		Map urlMap,
		Long instanceId,
		Long pageId,
		Long successForward,
		boolean canParse) {

it would be nice to customize it's formatting to something like this

	public static void parseRendererURL(Template template, String prefix, 
String urlBlock, <Line spliting goes here
		String urlVariable, Map urlMap, Long instanceId, Long pageId, 
		Long successForward, boolean canParse) {

so add "Insert new line after each parameter if line is too long" checkbox to 
Preferences > Java > Code Formatter > New Lines
Comment 1 Uwe Kubosch CLA 2003-09-25 04:24:38 EDT
Sun's Java Code Conventions state:

http://java.sun.com/docs/codeconv/html/CodeConventions.doc3.html#248

<quote>
Following are two examples of indenting method declarations. The first is the 
conventional case. The second would shift the second and third lines to the far 
right if it used conventional indentation, so instead it indents only 8 spaces. 

//CONVENTIONAL INDENTATION
someMethod(int anArg, Object anotherArg, String yetAnotherArg,
           Object andStillAnother) {
    ...
}
//INDENT 8 SPACES TO AVOID VERY DEEP INDENTS
private static synchronized horkingLongMethodName(int anArg,
        Object anotherArg, String yetAnotherArg,
        Object andStillAnother) {
    ...
}
</quote>

Both of these options should be implemented.  Today the second and following 
lines of parameters are only indented 4 spaces, which makes them 
indistinguishable(sp?) from the following lines of code.
Comment 2 Dani Megert CLA 2003-09-25 05:13:36 EDT
Formatter is owned by JDT Core.
Comment 3 Slavik Lazor CLA 2003-11-19 04:27:35 EST
wich version will include this feature ?
don't see the Target Milestone field filled
Comment 4 Olivier Thomann CLA 2003-11-26 09:57:04 EST
I will try this as soon as the new code formatter preference page is ready.
Comment 5 Olivier Thomann CLA 2003-12-04 22:20:07 EST
Please try the latest integration build and check the new code formatter
preference page. It should solve your problem.
Comment 6 Olivier Thomann CLA 2003-12-05 07:54:45 EST
Fixed in HEAD.
Comment 7 David Audel CLA 2003-12-17 06:32:03 EST
Verified for 3.0M6