Community
Participate
Working Groups
Currently: label: for (int i = 0; i <list.length; i++) [...] would like to configure new line so that: label: for (int i = 0; i <list.length; i++) [...]
Another example: I have LABEL: do { } while (false); after format: LABEL: do { } while (false);
Created attachment 87246 [details] patch to jdt core and UI I have attached a patch to add this option. You may want to double check the javadoc and option preference keys. Default is off.
Is there any chance of the attached patch being looked at by M5? (it contains API changes).
For M5, no. Since Monday is the warmup build. But we could see this post M5 depending of the patch review.
Any chance this will make it into the next version of Eclipse? I can probably recreate the patch if it has gone stale. It has been sitting for a while.
We would need regression tests as well.
(In reply to comment #5) > Any chance this will make it into the next version of Eclipse? > > I can probably recreate the patch if it has gone stale. It has been sitting > for a while. > It would be definitely helpful as we lack of time to work on formatter... As said Jerome, do not forget to add some JUnit tests to validate your contribution and I'll have a look on it. Thanks
Created attachment 110309 [details] Updated patch including regression test
Created attachment 159312 [details] Updated patch for JDT/Core projects
Created attachment 159313 [details] Updated patch for JDT/UI projects
>Created an attachment (id=159313) [details] [diff] >Updated patch for JDT/UI projects Please file a separate bug against JDT UI with this patch. Thx.
Created attachment 159410 [details] Proposed patch
(In reply to comment #11) > Please file a separate bug against JDT UI with this patch. Thx. Done, see bug 303163...
(In reply to comment #12) > Created an attachment (id=159410) [details] > Proposed patch Released for 3.6M6 in HEAD stream.
DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_LABEL says: * - default: INSERT Shouldn't the default be DO_NOT_INSERT? That's what I actually see when running the code, so I guess you only have to fix the Javadoc and the buildnotes entry.
(In reply to comment #15) > DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_LABEL says: > * - default: INSERT > > Shouldn't the default be DO_NOT_INSERT? That's what I actually see when running > the code, so I guess you only have to fix the Javadoc and the buildnotes entry. Correct, I fixed the javadoc comment and the entry in the build notes. Thanks a lot for the feedback :-)
Verified for 3.6M6 using build I20100305-1011