Summary: | Problem in Code Formatter | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Klaus Dicks <kd> | ||||
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||
Status: | RESOLVED WORKSFORME | QA Contact: | |||||
Severity: | minor | ||||||
Priority: | P3 | CC: | eclipse | ||||
Version: | 3.0 | ||||||
Target Milestone: | 3.0 M8 | ||||||
Hardware: | PC | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Klaus Dicks
2004-03-02 04:42:39 EST
Please provide an example. Thanks, Kai Created attachment 8293 [details]
saved code formatting profile
This is the code formatter profile that creates the mentioned problems.
whith the submitted format the following happens: ### code unformatted /* * user: kd date: 03.03.2004 time: 08:33:03 */ package de.shd.util.idb.tools; public class DBTools { public static void main(String[] args) { String driver = null; String url = null; String method = null; for (int i = 0; i < args.length; i = i + 2) { if (args[i].equals("-driver")) { driver = args[i + 1]; } else if (args[i].equals("-url")) { url = args[i + 1]; } else if (args[i].equals("-method")) { method = args[i + 1]; } } Command com = new Command(); com.m_driver = driver; com.m_url = url; Tool tool = ToolFactory.createTool(method); tool.doJob(com); } } ### code formatted (the blank lines are removed although the option preserve blank lines is checked) /* * user: kd date: 03.03.2004 time: 08:33:03 */ package de.shd.util.idb.tools; public class DBTools { public static void main(String[] args) { String driver = null; String url = null; String method = null; for (int i = 0; i < args.length; i = i + 2) { if (args[i].equals("-driver")) { driver = args[i + 1]; } else if (args[i].equals("-url")) { url = args[i + 1]; } else if (args[i].equals("-method")) { method = args[i + 1]; } } Command com = new Command(); com.m_driver = driver; com.m_url = url; Tool tool = ToolFactory.createTool(method); tool.doJob(com); } } do you also have the "preserve empty lines" preference enabled? I have the perference 'number of empty lines to preserve' set to 1. reopening moving to jdt core for comments The option "preserve existing line breaks" has been removed. So please try again with the latest integration build. doesn't occur with I20040323 Reopening to mark as WORKSFORME. Reporter said it now works. |