Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 177102 Details for
Bug 308000
[formatter] Formatter is missing options regarding Annotation Newlines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
New proposed patch + additional test
v04.txt (text/plain), 61.84 KB, created by
Frederic Fusier
on 2010-08-20 11:08:55 EDT
(
hide
)
Description:
New proposed patch + additional test
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2010-08-20 11:08:55 EDT
Size:
61.84 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java,v >retrieving revision 1.116 >diff -u -r1.116 DefaultCodeFormatterConstants.java >--- formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java 27 May 2010 15:54:44 -0000 1.116 >+++ formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java 20 Aug 2010 14:50:04 -0000 >@@ -1206,11 +1206,69 @@ > * @see JavaCore#INSERT > * @see JavaCore#DO_NOT_INSERT > * @since 3.4 >+ * @deprecated >+ * All new options must be enabled to activate old strategy >+ * {@link #FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_FIELD} >+ * {@link #FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_METHOD} >+ * {@link #FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_PACKAGE} >+ * {@link #FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_TYPE} > */ > public static final String FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_MEMBER = JavaCore.PLUGIN_ID + ".formatter.insert_new_line_after_annotation_on_member";//$NON-NLS-1$ > > /** > * <pre> >+ * FORMATTER / Option to insert a new line after an annotation on a field declaration >+ * - option id: "org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" >+ * - possible values: { INSERT, DO_NOT_INSERT } >+ * - default: INSERT >+ * </pre> >+ * @see JavaCore#INSERT >+ * @see JavaCore#DO_NOT_INSERT >+ * @since 3.7 >+ */ >+ public static final String FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_FIELD = JavaCore.PLUGIN_ID + ".formatter.insert_new_line_after_annotation_on_field";//$NON-NLS-1$ >+ >+ /** >+ * <pre> >+ * FORMATTER / Option to insert a new line after an annotation on a method declaration >+ * - option id: "org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" >+ * - possible values: { INSERT, DO_NOT_INSERT } >+ * - default: INSERT >+ * </pre> >+ * @see JavaCore#INSERT >+ * @see JavaCore#DO_NOT_INSERT >+ * @since 3.7 >+ */ >+ public static final String FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_METHOD = JavaCore.PLUGIN_ID + ".formatter.insert_new_line_after_annotation_on_method";//$NON-NLS-1$ >+ >+ /** >+ * <pre> >+ * FORMATTER / Option to insert a new line after an annotation on a package declaration >+ * - option id: "org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" >+ * - possible values: { INSERT, DO_NOT_INSERT } >+ * - default: INSERT >+ * </pre> >+ * @see JavaCore#INSERT >+ * @see JavaCore#DO_NOT_INSERT >+ * @since 3.7 >+ */ >+ public static final String FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_PACKAGE = JavaCore.PLUGIN_ID + ".formatter.insert_new_line_after_annotation_on_package";//$NON-NLS-1$ >+ >+ /** >+ * <pre> >+ * FORMATTER / Option to insert a new line after an annotation on a type declaration >+ * - option id: "org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" >+ * - possible values: { INSERT, DO_NOT_INSERT } >+ * - default: INSERT >+ * </pre> >+ * @see JavaCore#INSERT >+ * @see JavaCore#DO_NOT_INSERT >+ * @since 3.7 >+ */ >+ public static final String FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_TYPE = JavaCore.PLUGIN_ID + ".formatter.insert_new_line_after_annotation_on_type";//$NON-NLS-1$ >+ >+ /** >+ * <pre> > * FORMATTER / Option to insert a new line after an annotation on a parameter > * - option id: "org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" > * - possible values: { INSERT, DO_NOT_INSERT } >Index: formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java,v >retrieving revision 1.235 >diff -u -r1.235 CodeFormatterVisitor.java >--- formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java 20 May 2010 09:41:48 -0000 1.235 >+++ formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java 20 Aug 2010 14:50:04 -0000 >@@ -561,7 +561,7 @@ > Alignment memberAlignment = this.scribe.getMemberAlignment(); > > this.scribe.printComment(); >- this.scribe.printModifiers(fieldDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_MEMBER); >+ this.scribe.printModifiers(fieldDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_FIELD); > this.scribe.space(); > /* > * Field type >@@ -675,7 +675,7 @@ > Alignment fieldAlignment = this.scribe.getMemberAlignment(); > > this.scribe.printComment(); >- this.scribe.printModifiers(multiFieldDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_MEMBER); >+ this.scribe.printModifiers(multiFieldDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_FIELD); > this.scribe.space(); > > multiFieldDeclaration.declarations[0].type.traverse(this, scope); >@@ -911,7 +911,7 @@ > this.scribe.printComment(); > int line = this.scribe.line; > >- this.scribe.printModifiers(typeDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_MEMBER); >+ this.scribe.printModifiers(typeDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_TYPE); > > if (this.scribe.line > line) { > // annotations introduced new line, but this is not a line wrapping >@@ -2443,7 +2443,7 @@ > * Print comments to get proper line number > */ > this.scribe.printComment(); >- this.scribe.printModifiers(annotationTypeMemberDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_MEMBER); >+ this.scribe.printModifiers(annotationTypeMemberDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_METHOD); > this.scribe.space(); > /* > * Print the method return type >@@ -3070,7 +3070,7 @@ > this.scribe.printEmptyLines(blankLinesBeforePackage); > } > >- this.scribe.printModifiers(currentPackage.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_MEMBER); >+ this.scribe.printModifiers(currentPackage.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_PACKAGE); > this.scribe.space(); > // dump the package keyword > this.scribe.printNextToken(TerminalTokens.TokenNamepackage); >@@ -3306,7 +3306,7 @@ > */ > this.scribe.printComment(); > int line = this.scribe.line; >- this.scribe.printModifiers(constructorDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_MEMBER); >+ this.scribe.printModifiers(constructorDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_METHOD); > if (this.scribe.line > line) { > // annotations introduced new line, but this is not a line wrapping > // see 158267 >@@ -3523,7 +3523,7 @@ > */ > this.scribe.printComment(); > final int line = this.scribe.line; >- this.scribe.printModifiers(enumConstant.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_MEMBER); >+ this.scribe.printModifiers(enumConstant.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_FIELD); > this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier, false); > formatEnumConstantArguments( > enumConstant, >@@ -4219,7 +4219,7 @@ > do { > try { > >- this.scribe.printModifiers(methodDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_MEMBER); >+ this.scribe.printModifiers(methodDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_METHOD); > int fragmentIndex = 0; > this.scribe.alignFragment(methodDeclAlignment, fragmentIndex); > >Index: formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java,v >retrieving revision 1.108 >diff -u -r1.108 DefaultCodeFormatterOptions.java >--- formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java 20 May 2010 09:41:48 -0000 1.108 >+++ formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java 20 Aug 2010 14:50:05 -0000 >@@ -135,7 +135,10 @@ > public boolean indent_switchstatements_compare_to_switch; > public int indentation_size; > >- public boolean insert_new_line_after_annotation_on_member; >+ public boolean insert_new_line_after_annotation_on_type; >+ public boolean insert_new_line_after_annotation_on_field; >+ public boolean insert_new_line_after_annotation_on_method; >+ public boolean insert_new_line_after_annotation_on_package; > public boolean insert_new_line_after_annotation_on_parameter; > public boolean insert_new_line_after_annotation_on_local_variable; > public boolean insert_new_line_after_label; >@@ -421,7 +424,10 @@ > options.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_SWITCHSTATEMENTS_COMPARE_TO_CASES, this.indent_switchstatements_compare_to_cases ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE); > options.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_SWITCHSTATEMENTS_COMPARE_TO_SWITCH, this.indent_switchstatements_compare_to_switch ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE); > options.put(DefaultCodeFormatterConstants.FORMATTER_INDENTATION_SIZE, Integer.toString(this.indentation_size)); >- options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_MEMBER, this.insert_new_line_after_annotation_on_member ? JavaCore.INSERT : JavaCore.DO_NOT_INSERT); >+ options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_TYPE, this.insert_new_line_after_annotation_on_type ? JavaCore.INSERT : JavaCore.DO_NOT_INSERT); >+ options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_FIELD, this.insert_new_line_after_annotation_on_field ? JavaCore.INSERT : JavaCore.DO_NOT_INSERT); >+ options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_METHOD, this.insert_new_line_after_annotation_on_method ? JavaCore.INSERT : JavaCore.DO_NOT_INSERT); >+ options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_PACKAGE, this.insert_new_line_after_annotation_on_package ? JavaCore.INSERT : JavaCore.DO_NOT_INSERT); > options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_PARAMETER, this.insert_new_line_after_annotation_on_parameter ? JavaCore.INSERT : JavaCore.DO_NOT_INSERT); > options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_LOCAL_VARIABLE, this.insert_new_line_after_annotation_on_local_variable ? JavaCore.INSERT : JavaCore.DO_NOT_INSERT); > options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_OPENING_BRACE_IN_ARRAY_INITIALIZER, this.insert_new_line_after_opening_brace_in_array_initializer? JavaCore.INSERT : JavaCore.DO_NOT_INSERT); >@@ -2028,16 +2034,41 @@ > this.comment_clear_blank_lines_in_block_comment = DefaultCodeFormatterConstants.TRUE.equals(commentClearBlankLinesInBlockCommentOption); > } > } >- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=122247 >+ // New line after annotations > final Object insertNewLineAfterAnnotationOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION); >- if (insertNewLineAfterAnnotationOption != null) { // check if deprecated option was used >- this.insert_new_line_after_annotation_on_member = JavaCore.INSERT.equals(insertNewLineAfterAnnotationOption); >- this.insert_new_line_after_annotation_on_parameter = JavaCore.INSERT.equals(insertNewLineAfterAnnotationOption); >- this.insert_new_line_after_annotation_on_local_variable = JavaCore.INSERT.equals(insertNewLineAfterAnnotationOption); >+ if (insertNewLineAfterAnnotationOption != null) { // check if deprecated 3.1 option was used >+ boolean insert = JavaCore.INSERT.equals(insertNewLineAfterAnnotationOption); >+ this.insert_new_line_after_annotation_on_type = insert; >+ this.insert_new_line_after_annotation_on_field = insert; >+ this.insert_new_line_after_annotation_on_method = insert; >+ this.insert_new_line_after_annotation_on_package = insert; >+ this.insert_new_line_after_annotation_on_parameter = insert; >+ this.insert_new_line_after_annotation_on_local_variable = insert; > } else { > final Object insertNewLineAfterAnnotationOnMemberOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_MEMBER); >- if (insertNewLineAfterAnnotationOnMemberOption != null) { // otherwhise, use the new options >- this.insert_new_line_after_annotation_on_member = JavaCore.INSERT.equals(insertNewLineAfterAnnotationOnMemberOption); >+ if (insertNewLineAfterAnnotationOnMemberOption != null) { // check if deprecated 3.4 option was used >+ boolean insert = JavaCore.INSERT.equals(insertNewLineAfterAnnotationOnMemberOption); >+ this.insert_new_line_after_annotation_on_type = insert; >+ this.insert_new_line_after_annotation_on_field = insert; >+ this.insert_new_line_after_annotation_on_method = insert; >+ this.insert_new_line_after_annotation_on_package = insert; >+ } else { // otherwise use new options >+ final Object insertNewLineAfterAnnotationOnTypeOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_TYPE); >+ if (insertNewLineAfterAnnotationOnTypeOption != null) { >+ this.insert_new_line_after_annotation_on_type = JavaCore.INSERT.equals(insertNewLineAfterAnnotationOnTypeOption); >+ } >+ final Object insertNewLineAfterAnnotationOnFieldOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_FIELD); >+ if (insertNewLineAfterAnnotationOnFieldOption != null) { >+ this.insert_new_line_after_annotation_on_field = JavaCore.INSERT.equals(insertNewLineAfterAnnotationOnFieldOption); >+ } >+ final Object insertNewLineAfterAnnotationOnMethodOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_METHOD); >+ if (insertNewLineAfterAnnotationOnMethodOption != null) { >+ this.insert_new_line_after_annotation_on_method = JavaCore.INSERT.equals(insertNewLineAfterAnnotationOnMethodOption); >+ } >+ final Object insertNewLineAfterAnnotationOnPackageOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_PACKAGE); >+ if (insertNewLineAfterAnnotationOnPackageOption != null) { >+ this.insert_new_line_after_annotation_on_package = JavaCore.INSERT.equals(insertNewLineAfterAnnotationOnPackageOption); >+ } > } > final Object insertNewLineAfterAnnotationOnParameterOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_PARAMETER); > if (insertNewLineAfterAnnotationOnParameterOption != null) { >@@ -2126,7 +2157,10 @@ > this.indent_switchstatements_compare_to_cases = true; > this.indent_switchstatements_compare_to_switch = true; > this.indentation_size = 4; >- this.insert_new_line_after_annotation_on_member = true; >+ this.insert_new_line_after_annotation_on_type = true; >+ this.insert_new_line_after_annotation_on_field = true; >+ this.insert_new_line_after_annotation_on_method = true; >+ this.insert_new_line_after_annotation_on_package = true; > this.insert_new_line_after_annotation_on_parameter = false; > this.insert_new_line_after_annotation_on_local_variable = true; > this.insert_new_line_after_opening_brace_in_array_initializer = false; >@@ -2401,7 +2435,10 @@ > this.indent_switchstatements_compare_to_cases = true; > this.indent_switchstatements_compare_to_switch = false; > this.indentation_size = 4; >- this.insert_new_line_after_annotation_on_member = true; >+ this.insert_new_line_after_annotation_on_type = true; >+ this.insert_new_line_after_annotation_on_field = true; >+ this.insert_new_line_after_annotation_on_method = true; >+ this.insert_new_line_after_annotation_on_package = true; > this.insert_new_line_after_annotation_on_parameter = false; > this.insert_new_line_after_annotation_on_local_variable = true; > this.insert_new_line_after_opening_brace_in_array_initializer = false; >Index: formatter/org/eclipse/jdt/internal/formatter/ICodeFormatterConstants.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/ICodeFormatterConstants.java,v >retrieving revision 1.2 >diff -u -r1.2 ICodeFormatterConstants.java >--- formatter/org/eclipse/jdt/internal/formatter/ICodeFormatterConstants.java 27 Jun 2008 16:04:08 -0000 1.2 >+++ formatter/org/eclipse/jdt/internal/formatter/ICodeFormatterConstants.java 20 Aug 2010 14:50:05 -0000 >@@ -24,12 +24,21 @@ > /** annotation on unspecified source*/ > public static final int ANNOTATION_UNSPECIFIED = 0; > >- /** annotation on a member (type, method, field) */ >- public static final int ANNOTATION_ON_MEMBER = 1; >+ /** annotation on a type */ >+ public static final int ANNOTATION_ON_TYPE = 1; >+ >+ /** annotation on a field */ >+ public static final int ANNOTATION_ON_FIELD = 2; >+ >+ /** annotation on a method */ >+ public static final int ANNOTATION_ON_METHOD = 3; >+ >+ /** annotation on a package */ >+ public static final int ANNOTATION_ON_PACKAGE = 4; > > /** annotation on a parameter */ >- public static final int ANNOTATION_ON_PARAMETER = 2; >+ public static final int ANNOTATION_ON_PARAMETER = 5; > > /** annotation on a local variable */ >- public static final int ANNOTATION_ON_LOCAL_VARIABLE = 3; >+ public static final int ANNOTATION_ON_LOCAL_VARIABLE = 6; > } >Index: formatter/org/eclipse/jdt/internal/formatter/Scribe.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java,v >retrieving revision 1.216 >diff -u -r1.216 Scribe.java >--- formatter/org/eclipse/jdt/internal/formatter/Scribe.java 17 Aug 2010 10:16:57 -0000 1.216 >+++ formatter/org/eclipse/jdt/internal/formatter/Scribe.java 20 Aug 2010 14:50:05 -0000 >@@ -4465,8 +4465,23 @@ > // https://bugs.eclipse.org/bugs/show_bug.cgi?id=122247 > boolean shouldAddNewLine = false; > switch (annotationSourceKind) { >- case ICodeFormatterConstants.ANNOTATION_ON_MEMBER : >- if (this.formatter.preferences.insert_new_line_after_annotation_on_member) { >+ case ICodeFormatterConstants.ANNOTATION_ON_TYPE : >+ if (this.formatter.preferences.insert_new_line_after_annotation_on_type) { >+ shouldAddNewLine = true; >+ } >+ break; >+ case ICodeFormatterConstants.ANNOTATION_ON_FIELD : >+ if (this.formatter.preferences.insert_new_line_after_annotation_on_field) { >+ shouldAddNewLine = true; >+ } >+ break; >+ case ICodeFormatterConstants.ANNOTATION_ON_METHOD : >+ if (this.formatter.preferences.insert_new_line_after_annotation_on_method) { >+ shouldAddNewLine = true; >+ } >+ break; >+ case ICodeFormatterConstants.ANNOTATION_ON_PACKAGE : >+ if (this.formatter.preferences.insert_new_line_after_annotation_on_package) { > shouldAddNewLine = true; > } > break; >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java,v >retrieving revision 1.260 >diff -u -r1.260 FormatterRegressionTests.java >--- src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java 20 May 2010 09:41:37 -0000 1.260 >+++ src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java 20 Aug 2010 14:50:09 -0000 >@@ -10364,7 +10364,10 @@ > final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); > DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); > preferences.line_separator = "\n";//$NON-NLS-1$ >- preferences.insert_new_line_after_annotation_on_member = false; >+ preferences.insert_new_line_after_annotation_on_type = false; >+ preferences.insert_new_line_after_annotation_on_field = false; >+ preferences.insert_new_line_after_annotation_on_method = false; >+ preferences.insert_new_line_after_annotation_on_package = false; > preferences.insert_new_line_after_annotation_on_parameter = true; > DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); > IRegion[] regions = new IRegion[] { >@@ -10378,7 +10381,10 @@ > final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); > DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); > preferences.line_separator = "\n";//$NON-NLS-1$ >- preferences.insert_new_line_after_annotation_on_member = false; >+ preferences.insert_new_line_after_annotation_on_type = false; >+ preferences.insert_new_line_after_annotation_on_field = false; >+ preferences.insert_new_line_after_annotation_on_method = false; >+ preferences.insert_new_line_after_annotation_on_package = false; > preferences.insert_new_line_after_annotation_on_parameter = false; > DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); > IRegion[] regions = new IRegion[] { >@@ -10393,7 +10399,10 @@ > final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); > DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); > preferences.line_separator = "\n";//$NON-NLS-1$ >- preferences.insert_new_line_after_annotation_on_member = false; >+ preferences.insert_new_line_after_annotation_on_type = false; >+ preferences.insert_new_line_after_annotation_on_field = false; >+ preferences.insert_new_line_after_annotation_on_method = false; >+ preferences.insert_new_line_after_annotation_on_package = false; > preferences.insert_new_line_after_annotation_on_parameter = true; > preferences.insert_new_line_after_annotation_on_local_variable = false; > Hashtable javaCoreOptions = JavaCore.getOptions(); >@@ -10419,7 +10428,10 @@ > public void test707() { > final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); > DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); >- preferences.insert_new_line_after_annotation_on_member = true; >+ preferences.insert_new_line_after_annotation_on_type = true; >+ preferences.insert_new_line_after_annotation_on_field = true; >+ preferences.insert_new_line_after_annotation_on_method = true; >+ preferences.insert_new_line_after_annotation_on_package = true; > preferences.insert_new_line_after_annotation_on_parameter = true; > preferences.insert_new_line_after_annotation_on_local_variable = false; > preferences.line_separator = "\n";//$NON-NLS-1$ >@@ -10447,7 +10459,10 @@ > final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); > DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); > preferences.line_separator = "\n";//$NON-NLS-1$ >- preferences.insert_new_line_after_annotation_on_member = true; >+ preferences.insert_new_line_after_annotation_on_type = true; >+ preferences.insert_new_line_after_annotation_on_field = true; >+ preferences.insert_new_line_after_annotation_on_method = true; >+ preferences.insert_new_line_after_annotation_on_package = true; > preferences.insert_new_line_after_annotation_on_parameter = false; > preferences.insert_new_line_after_annotation_on_local_variable = false; > Hashtable javaCoreOptions = JavaCore.getOptions(); >@@ -10473,7 +10488,10 @@ > public void test709() { > final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); > DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); >- preferences.insert_new_line_after_annotation_on_member = false; >+ preferences.insert_new_line_after_annotation_on_type = false; >+ preferences.insert_new_line_after_annotation_on_field = false; >+ preferences.insert_new_line_after_annotation_on_method = false; >+ preferences.insert_new_line_after_annotation_on_package = false; > preferences.insert_new_line_after_annotation_on_parameter = false; > preferences.insert_new_line_after_annotation_on_local_variable = false; > preferences.line_separator = "\n";//$NON-NLS-1$ >@@ -10500,7 +10518,10 @@ > public void test710() { > final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); > DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); >- preferences.insert_new_line_after_annotation_on_member = false; >+ preferences.insert_new_line_after_annotation_on_type = false; >+ preferences.insert_new_line_after_annotation_on_field = false; >+ preferences.insert_new_line_after_annotation_on_method = false; >+ preferences.insert_new_line_after_annotation_on_package = false; > preferences.insert_new_line_after_annotation_on_parameter = true; > preferences.insert_new_line_after_annotation_on_local_variable = true; > preferences.line_separator = "\n";//$NON-NLS-1$ >@@ -10527,7 +10548,10 @@ > public void test711() { > final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); > DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); >- preferences.insert_new_line_after_annotation_on_member = false; >+ preferences.insert_new_line_after_annotation_on_type = false; >+ preferences.insert_new_line_after_annotation_on_field = false; >+ preferences.insert_new_line_after_annotation_on_method = false; >+ preferences.insert_new_line_after_annotation_on_package = false; > preferences.insert_new_line_after_annotation_on_parameter = false; > preferences.insert_new_line_after_annotation_on_local_variable = true; > preferences.line_separator = "\n";//$NON-NLS-1$ >@@ -10726,4 +10750,173 @@ > "}\n" > ); > } >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=308000 >+public void test725() { >+ this.formatterPrefs = null; >+ this.formatterOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_6); >+ this.formatterOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6); >+ this.formatterOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6); >+ String source = >+ "@Deprecated package pack;\n" + >+ "public class Test {\n" + >+ " @Deprecated Test(String s) {}\n" + >+ " @Deprecated String label;\n" + >+ " @Deprecated void foo() {}\n" + >+ " @Deprecated interface I {}\n" + >+ "}\n"; >+ formatSource(source, >+ "@Deprecated\n" + >+ "package pack;\n" + >+ "\n" + >+ "public class Test {\n" + >+ " @Deprecated\n" + >+ " Test(String s) {\n" + >+ " }\n" + >+ "\n" + >+ " @Deprecated\n" + >+ " String label;\n" + >+ "\n" + >+ " @Deprecated\n" + >+ " void foo() {\n" + >+ " }\n" + >+ "\n" + >+ " @Deprecated\n" + >+ " interface I {\n" + >+ " }\n" + >+ "}\n" >+ ); >+} >+public void test726() { >+ this.formatterPrefs = null; >+ this.formatterOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_6); >+ this.formatterOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6); >+ this.formatterOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6); >+ this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_TYPE, DefaultCodeFormatterConstants.FALSE); >+ this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_FIELD, DefaultCodeFormatterConstants.FALSE); >+ this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_METHOD, DefaultCodeFormatterConstants.FALSE); >+ this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_PACKAGE, DefaultCodeFormatterConstants.FALSE); >+ String source = >+ "@Deprecated package pack;\n" + >+ "public class Test {\n" + >+ " @Deprecated Test(String s) {}\n" + >+ " @Deprecated String label;\n" + >+ " @Deprecated void foo() {}\n" + >+ " @Deprecated interface I {}\n" + >+ "}\n"; >+ formatSource(source, >+ "@Deprecated package pack;\n" + >+ "\n" + >+ "public class Test {\n" + >+ " @Deprecated Test(String s) {\n" + >+ " }\n" + >+ "\n" + >+ " @Deprecated String label;\n" + >+ "\n" + >+ " @Deprecated void foo() {\n" + >+ " }\n" + >+ "\n" + >+ " @Deprecated interface I {\n" + >+ " }\n" + >+ "}\n" >+ ); >+} >+ >+/** >+ * @deprecated Use a deprecated formatter option. >+ */ >+public void test727() { >+ this.formatterPrefs = null; >+ this.formatterOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_6); >+ this.formatterOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6); >+ this.formatterOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6); >+ this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_LOCAL_VARIABLE, DefaultCodeFormatterConstants.TRUE); >+ this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_MEMBER, DefaultCodeFormatterConstants.FALSE); >+ this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_PARAMETER, DefaultCodeFormatterConstants.FALSE); >+ String source = >+ "@Deprecated package pack;\n" + >+ "public class Test {\n" + >+ " @Deprecated Test(String s) {}\n" + >+ " @Deprecated String label;\n" + >+ " @Deprecated void foo() {}\n" + >+ " @Deprecated interface I {}\n" + >+ "}\n"; >+ formatSource(source, >+ "@Deprecated package pack;\n" + >+ "\n" + >+ "public class Test {\n" + >+ " @Deprecated Test(String s) {\n" + >+ " }\n" + >+ "\n" + >+ " @Deprecated String label;\n" + >+ "\n" + >+ " @Deprecated void foo() {\n" + >+ " }\n" + >+ "\n" + >+ " @Deprecated interface I {\n" + >+ " }\n" + >+ "}\n" >+ ); >+} >+ >+/** >+ * @deprecated Use a deprecated formatter option. >+ */ >+public void test728() { >+ this.formatterPrefs = null; >+ this.formatterOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_6); >+ this.formatterOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6); >+ this.formatterOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6); >+ this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION, DefaultCodeFormatterConstants.FALSE); >+ String source = >+ "@Deprecated package pack;\n" + >+ "public class Test {\n" + >+ " @Deprecated Test(String s) {}\n" + >+ " @Deprecated String label;\n" + >+ " @Deprecated void foo() {}\n" + >+ " @Deprecated interface I {}\n" + >+ "}\n"; >+ formatSource(source, >+ "@Deprecated package pack;\n" + >+ "\n" + >+ "public class Test {\n" + >+ " @Deprecated Test(String s) {\n" + >+ " }\n" + >+ "\n" + >+ " @Deprecated String label;\n" + >+ "\n" + >+ " @Deprecated void foo() {\n" + >+ " }\n" + >+ "\n" + >+ " @Deprecated interface I {\n" + >+ " }\n" + >+ "}\n" >+ ); >+} >+public void test729() { >+ this.formatterPrefs = null; >+ String profilePath = getResource("profiles", "b308000.xml"); >+ this.formatterOptions = DecodeCodeFormatterPreferences.decodeCodeFormatterOptions(profilePath, "b308000"); >+ assertNotNull("No preferences", this.formatterOptions); >+ String source = >+ "package p;\n" + >+ "\n" + >+ "@Deprecated public class C {\n" + >+ " @Deprecated public static void main(@Deprecated String[] args) {\n" + >+ " @Deprecated int i= 2;\n" + >+ " System.out.println(i);\n" + >+ " }\n" + >+ "}\n"; >+ formatSource(source, >+ "package p;\n" + >+ "\n" + >+ "@Deprecated public class C {\n" + >+ " @Deprecated public static void main(@Deprecated String[] args) {\n" + >+ " @Deprecated\n" + >+ " int i = 2;\n" + >+ " System.out.println(i);\n" + >+ " }\n" + >+ "}\n" >+ ); >+} >+ > } >Index: workspace/Formatter/profiles/b308000.xml >=================================================================== >RCS file: workspace/Formatter/profiles/b308000.xml >diff -N workspace/Formatter/profiles/b308000.xml >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/profiles/b308000.xml 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,279 @@ >+<?xml version="1.0" encoding="UTF-8" standalone="no"?> >+<profiles version="11"> >+<profile kind="CodeFormatterProfile" name="b308000" version="11"> >+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="false"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/> >+<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/> >+<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/> >+<setting id="org.eclipse.jdt.core.compiler.source" value="1.5"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/> >+<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/> >+<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="80"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/> >+<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/> >+<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/> >+<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/> >+<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="tab"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/> >+<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/> >+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/> >+<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/> >+<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/> >+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/> >+<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/> >+<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.5"/> >+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/> >+<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/> >+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/> >+<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/> >+<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="80"/> >+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/> >+<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/> >+<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/> >+<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.5"/> >+<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/> >+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/> >+<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/> >+<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/> >+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/> >+<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/> >+<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/> >+</profile> >+</profiles>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 308000
:
172780
|
176332
|
176715
|
177102
|
177845
|
178168
|
178171