Project: JDT
Bug 27079 Tags for disabling/enabling code formatter (feature)
Reported: 2002-11-25 07:35:55 | Status: verified fixed

I like code formatter in eclipse very much - but I think one more feature wiuld be useful. Sometimes I have some parts in my code - for example several constant declarations which I would like to remain formatted as I entered them. For example not to be wrapped to max line length and all assigments remained in one column. I can format my code part by part, but I was thinking if it would be possible to create some tags in comments which would turn on/off code formatter. Here goes my example: /* here goes my constants: @@formatter:off */ public static final int FIRST = 1; public static final int SECOND = 2; public static final int AND_THE_LAST_ONE = 3; /* @@formatter:on */ Best regards to whole team, Piotr Gawronski (happy eclipse user)

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterModifyDialog.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ModifyDialogTabPage.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/OnOffTagsTabPage.java