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 88283 Details for
Bug 122247
[formatter] add support to handle parameter annotations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
[proposed patch + test cases] on top v834 - all jdt.core tests OK
patch_bug_122247_top_HEAD(v834)_v10.txt (text/plain), 50.00 KB, created by
Eric Jodet
on 2008-01-30 10:16:17 EST
(
hide
)
Description:
[proposed patch + test cases] on top v834 - all jdt.core tests OK
Filename:
MIME Type:
Creator:
Eric Jodet
Created:
2008-01-30 10:16:17 EST
Size:
50.00 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.89 >diff -u -r1.89 DefaultCodeFormatterConstants.java >--- formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java 29 Jan 2008 11:25:41 -0000 1.89 >+++ formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java 30 Jan 2008 15:07:08 -0000 >@@ -937,8 +937,53 @@ > * @see JavaCore#INSERT > * @see JavaCore#DO_NOT_INSERT > * @since 3.1 >+ * @deprecated >+ * To activate the same formatting preference or capability, activate the two options below: >+ * {@link #FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_MEMBER} >+ * {@link #FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_LOCAL_VARIABLE} >+ * @see #FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_PARAMETER for additional annotation formatting preference > */ > public static final String FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION = JavaCore.PLUGIN_ID + ".formatter.insert_new_line_after_annotation";//$NON-NLS-1$ >+ >+ /** >+ * <pre> >+ * FORMATTER / Option to insert a new line after an annotation on a member (package, class, method, field declaration) >+ * - option id: "org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member" >+ * - possible values: { INSERT, DO_NOT_INSERT } >+ * - default: INSERT >+ * </pre> >+ >+ * @see JavaCore#DO_NOT_INSERT >+ * @since 3.4 >+ */ >+ 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 parameter >+ * - option id: "org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" >+ * - possible values: { INSERT, DO_NOT_INSERT } >+ * - default: DO_NOT_INSERT >+ * </pre> >+ >+ * @see JavaCore#DO_NOT_INSERT >+ * @since 3.4 >+ */ >+ public static final String FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_PARAMETER = JavaCore.PLUGIN_ID + ".formatter.insert_new_line_after_annotation_on_parameter";//$NON-NLS-1$ >+ >+ /** >+ * <pre> >+ * FORMATTER / Option to insert a new line after an annotation on a local variable >+ * - option id: "org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" >+ * - possible values: { INSERT, DO_NOT_INSERT } >+ * - default: INSERT >+ * </pre> >+ >+ * @see JavaCore#DO_NOT_INSERT >+ * @since 3.4 >+ */ >+ public static final String FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_LOCAL_VARIABLE = JavaCore.PLUGIN_ID + ".formatter.insert_new_line_after_annotation_on_local_variable";//$NON-NLS-1$ >+ > > /** > * <pre> >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.204 >diff -u -r1.204 CodeFormatterVisitor.java >--- formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java 29 Jan 2008 11:25:41 -0000 1.204 >+++ formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java 30 Jan 2008 15:07:09 -0000 >@@ -562,7 +562,7 @@ > Alignment memberAlignment = this.scribe.getMemberAlignment(); > > this.scribe.printComment(); >- this.scribe.printModifiers(fieldDeclaration.annotations, this); >+ this.scribe.printModifiers(fieldDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_MEMBER); > this.scribe.space(); > /* > * Field type >@@ -669,7 +669,7 @@ > Alignment fieldAlignment = this.scribe.getMemberAlignment(); > > this.scribe.printComment(); >- this.scribe.printModifiers(multiFieldDeclaration.annotations, this); >+ this.scribe.printModifiers(multiFieldDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_MEMBER); > this.scribe.space(); > > multiFieldDeclaration.declarations[0].type.traverse(this, scope); >@@ -917,7 +917,7 @@ > this.scribe.printComment(); > int line = this.scribe.line; > >- this.scribe.printModifiers(typeDeclaration.annotations, this); >+ this.scribe.printModifiers(typeDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_MEMBER); > > if (this.scribe.line > line) { > // annotations introduced new line, but this is not a line wrapping >@@ -1563,7 +1563,7 @@ > if (!isMultipleLocalDeclaration(localDeclaration)) { > if (localDeclaration.modifiers != NO_MODIFIERS || localDeclaration.annotations != null) { > this.scribe.printComment(); >- this.scribe.printModifiers(localDeclaration.annotations, this); >+ this.scribe.printModifiers(localDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_LOCAL_VARIABLE); > this.scribe.space(); > } > >@@ -2349,7 +2349,7 @@ > * Print comments to get proper line number > */ > this.scribe.printComment(); >- this.scribe.printModifiers(annotationTypeMemberDeclaration.annotations, this); >+ this.scribe.printModifiers(annotationTypeMemberDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_MEMBER); > this.scribe.space(); > /* > * Print the method return type >@@ -2396,7 +2396,7 @@ > > if (argument.modifiers != NO_MODIFIERS || argument.annotations != null) { > this.scribe.printComment(); >- this.scribe.printModifiers(argument.annotations, this); >+ this.scribe.printModifiers(argument.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_PARAMETER); > this.scribe.space(); > } > >@@ -2958,7 +2958,7 @@ > this.scribe.printEmptyLines(blankLinesBeforePackage); > } > >- this.scribe.printModifiers(compilationUnitDeclaration.currentPackage.annotations, this); >+ this.scribe.printModifiers(compilationUnitDeclaration.currentPackage.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_MEMBER); > this.scribe.space(); > // dump the package keyword > this.scribe.printNextToken(TerminalTokens.TokenNamepackage); >@@ -3193,7 +3193,7 @@ > */ > this.scribe.printComment(); > int line = this.scribe.line; >- this.scribe.printModifiers(constructorDeclaration.annotations, this); >+ this.scribe.printModifiers(constructorDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_MEMBER); > if (this.scribe.line > line) { > // annotations introduced new line, but this is not a line wrapping > // see 158267 >@@ -3408,8 +3408,7 @@ > */ > this.scribe.printComment(); > final int line = this.scribe.line; >- >- this.scribe.printModifiers(enumConstant.annotations, this); >+ this.scribe.printModifiers(enumConstant.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_MEMBER); > this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier, false); > formatEnumConstantArguments( > enumConstant, >@@ -4081,7 +4080,7 @@ > this.scribe.printComment(); > int line = this.scribe.line; > >- this.scribe.printModifiers(methodDeclaration.annotations, this); >+ this.scribe.printModifiers(methodDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_MEMBER); > > if (this.scribe.line > line) { > // annotations introduced new line, but this is not a line wrapping >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.89 >diff -u -r1.89 DefaultCodeFormatterOptions.java >--- formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java 29 Jan 2008 11:25:41 -0000 1.89 >+++ formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java 30 Jan 2008 15:07:12 -0000 >@@ -122,7 +122,9 @@ > public boolean indent_switchstatements_compare_to_switch; > public int indentation_size; > >- public boolean insert_new_line_after_annotation; >+ public boolean insert_new_line_after_annotation_on_member; >+ 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_opening_brace_in_array_initializer; > public boolean insert_new_line_at_end_of_file_if_missing; > public boolean insert_new_line_before_catch_in_try_statement; >@@ -397,7 +399,9 @@ > 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, this.insert_new_line_after_annotation ? JavaCore.INSERT : JavaCore.DO_NOT_INSERT); >+ 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_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); > options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AT_END_OF_FILE_IF_MISSING, this.insert_new_line_at_end_of_file_if_missing ? JavaCore.INSERT : JavaCore.DO_NOT_INSERT); > options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_CATCH_IN_TRY_STATEMENT, this.insert_new_line_before_catch_in_try_statement? JavaCore.INSERT : JavaCore.DO_NOT_INSERT); >@@ -1128,9 +1132,17 @@ > this.indentation_size = 4; > } > } >- final Object insertNewLineAfterAnnotationOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION); >- if (insertNewLineAfterAnnotationOption != null) { >- this.insert_new_line_after_annotation = JavaCore.INSERT.equals(insertNewLineAfterAnnotationOption); >+ final Object insertNewLineAfterAnnotationOnMemberOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_MEMBER); >+ if (insertNewLineAfterAnnotationOnMemberOption != null) { >+ this.insert_new_line_after_annotation_on_member = JavaCore.INSERT.equals(insertNewLineAfterAnnotationOnMemberOption); >+ } >+ final Object insertNewLineAfterAnnotationOnParameterOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_PARAMETER); >+ if (insertNewLineAfterAnnotationOnParameterOption != null) { >+ this.insert_new_line_after_annotation_on_parameter = JavaCore.INSERT.equals(insertNewLineAfterAnnotationOnParameterOption); >+ } >+ final Object insertNewLineAfterAnnotationOnLocalVariableOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_LOCAL_VARIABLE); >+ if (insertNewLineAfterAnnotationOnLocalVariableOption != null) { >+ this.insert_new_line_after_annotation_on_local_variable = JavaCore.INSERT.equals(insertNewLineAfterAnnotationOnLocalVariableOption); > } > final Object insertNewLineAfterOpeningBraceInArrayInitializerOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_OPENING_BRACE_IN_ARRAY_INITIALIZER); > if (insertNewLineAfterOpeningBraceInArrayInitializerOption != null) { >@@ -1910,6 +1922,11 @@ > this.comment_clear_blank_lines_in_block_comment = DefaultCodeFormatterConstants.TRUE.equals(commentClearBlankLinesInBlockCommentOption); > } > } >+ final Object insertNewLineAfterAnnotationOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION); >+ if (insertNewLineAfterAnnotationOption != null) { >+ this.insert_new_line_after_annotation_on_member = JavaCore.INSERT.equals(insertNewLineAfterAnnotationOption); >+ this.insert_new_line_after_annotation_on_local_variable = JavaCore.INSERT.equals(insertNewLineAfterAnnotationOption); >+ } > } > > public void setDefaultSettings() { >@@ -1983,7 +2000,9 @@ > this.indent_switchstatements_compare_to_cases = true; > this.indent_switchstatements_compare_to_switch = true; > this.indentation_size = 4; >- this.insert_new_line_after_annotation = true; >+ this.insert_new_line_after_annotation_on_member = 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; > this.insert_new_line_at_end_of_file_if_missing = false; > this.insert_new_line_before_catch_in_try_statement = false; >@@ -2245,7 +2264,9 @@ > this.indent_switchstatements_compare_to_cases = true; > this.indent_switchstatements_compare_to_switch = false; > this.indentation_size = 4; >- this.insert_new_line_after_annotation = true; >+ this.insert_new_line_after_annotation_on_member = 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; > this.insert_new_line_at_end_of_file_if_missing = false; > this.insert_new_line_before_catch_in_try_statement = false; >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.117 >diff -u -r1.117 Scribe.java >--- formatter/org/eclipse/jdt/internal/formatter/Scribe.java 29 Jan 2008 11:25:41 -0000 1.117 >+++ formatter/org/eclipse/jdt/internal/formatter/Scribe.java 30 Jan 2008 15:07:12 -0000 >@@ -1470,6 +1470,10 @@ > } > > public void printModifiers(Annotation[] annotations, ASTVisitor visitor) { >+ printModifiers(annotations, visitor, ICodeFormatterConstants.ANNOTATION_UNSPECIFIED); >+ } >+ >+ public void printModifiers(Annotation[] annotations, ASTVisitor visitor, int annotationSourceKind) { > try { > int annotationsLength = annotations != null ? annotations.length : 0; > int annotationsIndex = 0; >@@ -1502,8 +1506,30 @@ > } > this.scanner.resetTo(this.scanner.getCurrentTokenStartPosition(), this.scannerEndPosition - 1); > if (annotationsIndex < annotationsLength) { >- annotations[annotationsIndex++].traverse(visitor, (BlockScope) null); >- if (this.formatter.preferences.insert_new_line_after_annotation) { >+ Annotation annotation = annotations[annotationsIndex++]; >+ annotation.traverse(visitor, (BlockScope) null); >+ // 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) { >+ shouldAddNewLine = true; >+ } >+ break; >+ case ICodeFormatterConstants.ANNOTATION_ON_PARAMETER : >+ if (this.formatter.preferences.insert_new_line_after_annotation_on_parameter) { >+ shouldAddNewLine = true; >+ } >+ break; >+ case ICodeFormatterConstants.ANNOTATION_ON_LOCAL_VARIABLE : >+ if (this.formatter.preferences.insert_new_line_after_annotation_on_local_variable) { >+ shouldAddNewLine = true; >+ } >+ break; >+ default: >+ // do nothing when no annotation formatting option specified >+ } >+ if (shouldAddNewLine) { > this.printNewLine(); > } > } else { >Index: formatter/org/eclipse/jdt/internal/formatter/ICodeFormatterConstants.java >=================================================================== >RCS file: formatter/org/eclipse/jdt/internal/formatter/ICodeFormatterConstants.java >diff -N formatter/org/eclipse/jdt/internal/formatter/ICodeFormatterConstants.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ formatter/org/eclipse/jdt/internal/formatter/ICodeFormatterConstants.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,35 @@ >+/******************************************************************************* >+ * Copyright (c) 2000, 2008 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+ >+package org.eclipse.jdt.internal.formatter; >+ >+/** >+ * Internal code formatter constants. >+ * >+ * @since 3.4 >+ */ >+ >+public interface ICodeFormatterConstants { >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=122247 >+ // constants used to format annotations >+ >+ /** 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 parameter */ >+ public static final int ANNOTATION_ON_PARAMETER = 2; >+ >+ /** annotation on a local variable */ >+ public static final int ANNOTATION_ON_LOCAL_VARIABLE = 3; >+} >#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.227 >diff -u -r1.227 FormatterRegressionTests.java >--- src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java 29 Jan 2008 11:25:44 -0000 1.227 >+++ src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java 30 Jan 2008 15:07:19 -0000 >@@ -7829,7 +7829,7 @@ > preferences.tab_size = 4; > preferences.tab_char = DefaultCodeFormatterOptions.SPACE; > preferences.insert_space_after_comma_in_enum_declarations = false; >- preferences.insert_new_line_after_annotation = false; >+ preferences.insert_new_line_after_annotation_on_member = false; > Hashtable javaCoreOptions = JavaCore.getOptions(); > try { > Hashtable newJavaCoreOptions = JavaCore.getOptions(); >@@ -7856,7 +7856,7 @@ > preferences.tab_size = 4; > preferences.tab_char = DefaultCodeFormatterOptions.SPACE; > preferences.insert_space_after_comma_in_enum_declarations = true; >- preferences.insert_new_line_after_annotation = false; >+ preferences.insert_new_line_after_annotation_on_member = false; > Hashtable javaCoreOptions = JavaCore.getOptions(); > try { > Hashtable newJavaCoreOptions = JavaCore.getOptions(); >@@ -8141,6 +8141,8 @@ > public void test575() { > Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); > DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=122247 >+ preferences.insert_new_line_after_annotation_on_parameter = true; > Hashtable javaCoreOptions = JavaCore.getOptions(); > try { > Hashtable newJavaCoreOptions = JavaCore.getOptions(); >@@ -9813,4 +9815,268 @@ > }; > runTest(codeFormatter, "test699", "A.java", CodeFormatter.K_UNKNOWN, 0, false, regions, "\n");//$NON-NLS-1$ //$NON-NLS-2$ > } >+ >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=122247 >+ public void test700() { >+ final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); >+ DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); >+ preferences.line_separator = "\n";//$NON-NLS-1$ >+ DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); >+ IRegion[] regions = new IRegion[] { >+ new Region(0, 221) // nothing selected --> format all >+ }; >+ runTest(codeFormatter, "test700", "X.java", CodeFormatter.K_UNKNOWN, 0, false, regions, "\n");//$NON-NLS-1$ //$NON-NLS-2$ >+ } >+ >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=122247 >+ public void test701() { >+ final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); >+ DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); >+ preferences.insert_new_line_after_annotation_on_parameter = true; >+ preferences.line_separator = "\n";//$NON-NLS-1$ >+ DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); >+ IRegion[] regions = new IRegion[] { >+ new Region(0, 221) // nothing selected --> format all >+ }; >+ runTest(codeFormatter, "test701", "X.java", CodeFormatter.K_UNKNOWN, 0, false, regions, "\n");//$NON-NLS-1$ //$NON-NLS-2$ >+ } >+ >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=122247 >+ public void test702() { >+ final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); >+ DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); >+ preferences.line_separator = "\n";//$NON-NLS-1$ >+ preferences.insert_new_line_after_annotation_on_parameter = false; >+ DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); >+ IRegion[] regions = new IRegion[] { >+ new Region(0, 86) // nothing selected --> format all >+ }; >+ runTest(codeFormatter, "test702", "X.java", CodeFormatter.K_UNKNOWN, 0, false, regions, "\n");//$NON-NLS-1$ //$NON-NLS-2$ >+ } >+ >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=122247 >+ public void test703() { >+ final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); >+ DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); >+ preferences.line_separator = "\n";//$NON-NLS-1$ >+ preferences.insert_new_line_after_annotation_on_parameter = true; >+ DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); >+ IRegion[] regions = new IRegion[] { >+ new Region(0, 86) // nothing selected --> format all >+ }; >+ runTest(codeFormatter, "test703", "X.java", CodeFormatter.K_UNKNOWN, 0, false, regions, "\n");//$NON-NLS-1$ //$NON-NLS-2$ >+ } >+ >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=122247 >+ public void test704() { >+ 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_parameter = true; >+ DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); >+ IRegion[] regions = new IRegion[] { >+ new Region(0, 86) // nothing selected --> format all >+ }; >+ runTest(codeFormatter, "test704", "X.java", CodeFormatter.K_UNKNOWN, 0, false, regions, "\n");//$NON-NLS-1$ //$NON-NLS-2$ >+ } >+ >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=122247 >+ public void test705() { >+ 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_parameter = false; >+ DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); >+ IRegion[] regions = new IRegion[] { >+ new Region(0, 86) // nothing selected --> format all >+ }; >+ runTest(codeFormatter, "test705", "X.java", CodeFormatter.K_UNKNOWN, 0, false, regions, "\n");//$NON-NLS-1$ //$NON-NLS-2$ >+ } >+ >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=122247 >+ public void test706() { >+ final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); >+ DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); >+ preferences.line_separator = "\n";//$NON-NLS-1$ >+ preferences.insert_new_line_after_annotation_on_parameter = true; >+ Hashtable javaCoreOptions = JavaCore.getOptions(); >+ try { >+ Hashtable newJavaCoreOptions = JavaCore.getOptions(); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5); >+ JavaCore.setOptions(newJavaCoreOptions); >+ >+ Map compilerOptions = new HashMap(); >+ compilerOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5); >+ compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5); >+ compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5); >+ DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions); >+ runTest(codeFormatter, "test706", "X.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$ >+ } finally { >+ JavaCore.setOptions(javaCoreOptions); >+ } >+ } >+ >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=122247 >+ 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_parameter = true; >+ preferences.insert_new_line_after_annotation_on_local_variable = false; >+ preferences.line_separator = "\n";//$NON-NLS-1$ >+ Hashtable javaCoreOptions = JavaCore.getOptions(); >+ try { >+ Hashtable newJavaCoreOptions = JavaCore.getOptions(); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5); >+ JavaCore.setOptions(newJavaCoreOptions); >+ >+ Map compilerOptions = new HashMap(); >+ compilerOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5); >+ compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5); >+ compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5); >+ DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions); >+ runTest(codeFormatter, "test707", "X.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$ >+ } finally { >+ JavaCore.setOptions(javaCoreOptions); >+ } >+ } >+ >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=122247 >+ public void test708() { >+ 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_parameter = false; >+ preferences.insert_new_line_after_annotation_on_local_variable = false; >+ preferences.line_separator = "\n";//$NON-NLS-1$ >+ Hashtable javaCoreOptions = JavaCore.getOptions(); >+ try { >+ Hashtable newJavaCoreOptions = JavaCore.getOptions(); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5); >+ JavaCore.setOptions(newJavaCoreOptions); >+ >+ Map compilerOptions = new HashMap(); >+ compilerOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5); >+ compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5); >+ compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5); >+ DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions); >+ runTest(codeFormatter, "test708", "X.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$ >+ } finally { >+ JavaCore.setOptions(javaCoreOptions); >+ } >+ } >+ >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=122247 >+ 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_parameter = false; >+ preferences.insert_new_line_after_annotation_on_local_variable = false; >+ preferences.line_separator = "\n";//$NON-NLS-1$ >+ Hashtable javaCoreOptions = JavaCore.getOptions(); >+ try { >+ Hashtable newJavaCoreOptions = JavaCore.getOptions(); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5); >+ JavaCore.setOptions(newJavaCoreOptions); >+ >+ Map compilerOptions = new HashMap(); >+ compilerOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5); >+ compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5); >+ compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5); >+ DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions); >+ runTest(codeFormatter, "test709", "X.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$ >+ } finally { >+ JavaCore.setOptions(javaCoreOptions); >+ } >+ } >+ >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=122247 >+ 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_parameter = true; >+ preferences.insert_new_line_after_annotation_on_local_variable = true; >+ preferences.line_separator = "\n";//$NON-NLS-1$ >+ Hashtable javaCoreOptions = JavaCore.getOptions(); >+ try { >+ Hashtable newJavaCoreOptions = JavaCore.getOptions(); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5); >+ JavaCore.setOptions(newJavaCoreOptions); >+ >+ Map compilerOptions = new HashMap(); >+ compilerOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5); >+ compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5); >+ compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5); >+ DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions); >+ runTest(codeFormatter, "test710", "X.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$ >+ } finally { >+ JavaCore.setOptions(javaCoreOptions); >+ } >+ } >+ >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=122247 >+ 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_parameter = false; >+ preferences.insert_new_line_after_annotation_on_local_variable = true; >+ preferences.line_separator = "\n";//$NON-NLS-1$ >+ Hashtable javaCoreOptions = JavaCore.getOptions(); >+ try { >+ Hashtable newJavaCoreOptions = JavaCore.getOptions(); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5); >+ JavaCore.setOptions(newJavaCoreOptions); >+ >+ Map compilerOptions = new HashMap(); >+ compilerOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5); >+ compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5); >+ compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5); >+ DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions); >+ runTest(codeFormatter, "test711", "X.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$ >+ } finally { >+ JavaCore.setOptions(javaCoreOptions); >+ } >+ } >+ >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=122247 >+ public void test712() { >+ final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); >+ DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); >+ // default options >+ preferences.line_separator = "\n";//$NON-NLS-1$ >+ Hashtable javaCoreOptions = JavaCore.getOptions(); >+ try { >+ Hashtable newJavaCoreOptions = JavaCore.getOptions(); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5); >+ JavaCore.setOptions(newJavaCoreOptions); >+ >+ Map compilerOptions = new HashMap(); >+ compilerOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5); >+ compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5); >+ compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5); >+ DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions); >+ runTest(codeFormatter, "test712", "X.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$ >+ } finally { >+ JavaCore.setOptions(javaCoreOptions); >+ } >+ } > } >Index: workspace/Formatter/test711/X_out.java >=================================================================== >RCS file: workspace/Formatter/test711/X_out.java >diff -N workspace/Formatter/test711/X_out.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test711/X_out.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,42 @@ >+@OnMember @Retention package pkg1; >+ >+@interface Name { >+ String first() default "Joe"; >+ >+ String last() default "Smith"; >+ >+ int age(); >+} >+ >+@interface Author { >+ Name value(); >+} >+ >+@interface Retention { >+} >+ >+@interface OnMember { >+} >+ >+@interface OnParameter { >+ String value(); >+} >+ >+@interface OnLocalVariable { >+} >+ >+@OnMember @Retention @Author(@Name(first = "Jdt", last = "Core", age = 32)) public class X { >+ >+ @OnMember @Retention private String aString; >+ >+ @OnMember @Author(@Name(first = "John", last = "Doe", age = 32)) X() { >+ >+ } >+ >+ @OnMember public void bar(@OnParameter("unused value") int i, >+ @OnParameter("unused value") String s) { >+ @OnLocalVariable >+ @Retention >+ String localString = "string"; >+ } >+} >Index: workspace/Formatter/test710/X_out.java >=================================================================== >RCS file: workspace/Formatter/test710/X_out.java >diff -N workspace/Formatter/test710/X_out.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test710/X_out.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,43 @@ >+@OnMember @Retention package pkg1; >+ >+@interface Name { >+ String first() default "Joe"; >+ >+ String last() default "Smith"; >+ >+ int age(); >+} >+ >+@interface Author { >+ Name value(); >+} >+ >+@interface Retention { >+} >+ >+@interface OnMember { >+} >+ >+@interface OnParameter { >+ String value(); >+} >+ >+@interface OnLocalVariable { >+} >+ >+@OnMember @Retention @Author(@Name(first = "Jdt", last = "Core", age = 32)) public class X { >+ >+ @OnMember @Retention private String aString; >+ >+ @OnMember @Author(@Name(first = "John", last = "Doe", age = 32)) X() { >+ >+ } >+ >+ @OnMember public void bar(@OnParameter("unused value") >+ int i, @OnParameter("unused value") >+ String s) { >+ @OnLocalVariable >+ @Retention >+ String localString = "string"; >+ } >+} >Index: workspace/Formatter/test710/X_in.java >=================================================================== >RCS file: workspace/Formatter/test710/X_in.java >diff -N workspace/Formatter/test710/X_in.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test710/X_in.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,30 @@ >+@OnMember @Retention package pkg1; >+ >+@interface Name { >+ String first() default "Joe"; >+ String last() default "Smith"; >+ int age(); >+} >+@interface Author { >+ Name value(); >+} >+@interface Retention { >+} >+@interface OnMember {} >+@interface OnParameter { >+ String value(); >+} >+@interface OnLocalVariable {} >+ >+@OnMember @Retention @Author(@Name(first="Jdt", last="Core", age=32)) public class X { >+ >+ @OnMember @Retention private String aString; >+ >+ @OnMember @Author(@Name(first="John", last="Doe", age=32)) X() { >+ >+ } >+ >+ @OnMember public void bar(@OnParameter("unused value") int i, @OnParameter("unused value") String s) { >+ @OnLocalVariable @Retention String localString = "string"; >+ } >+} >Index: workspace/Formatter/test711/X_in.java >=================================================================== >RCS file: workspace/Formatter/test711/X_in.java >diff -N workspace/Formatter/test711/X_in.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test711/X_in.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,30 @@ >+@OnMember @Retention package pkg1; >+ >+@interface Name { >+ String first() default "Joe"; >+ String last() default "Smith"; >+ int age(); >+} >+@interface Author { >+ Name value(); >+} >+@interface Retention { >+} >+@interface OnMember {} >+@interface OnParameter { >+ String value(); >+} >+@interface OnLocalVariable {} >+ >+@OnMember @Retention @Author(@Name(first="Jdt", last="Core", age=32)) public class X { >+ >+ @OnMember @Retention private String aString; >+ >+ @OnMember @Author(@Name(first="John", last="Doe", age=32)) X() { >+ >+ } >+ >+ @OnMember public void bar(@OnParameter("unused value") int i, @OnParameter("unused value") String s) { >+ @OnLocalVariable @Retention String localString = "string"; >+ } >+} >Index: workspace/Formatter/test712/X_in.java >=================================================================== >RCS file: workspace/Formatter/test712/X_in.java >diff -N workspace/Formatter/test712/X_in.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test712/X_in.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,30 @@ >+@OnMember @Retention package pkg1; >+ >+@interface Name { >+ String first() default "Joe"; >+ String last() default "Smith"; >+ int age(); >+} >+@interface Author { >+ Name value(); >+} >+@interface Retention { >+} >+@interface OnMember {} >+@interface OnParameter { >+ String value(); >+} >+@interface OnLocalVariable {} >+ >+@OnMember @Retention @Author(@Name(first="Jdt", last="Core", age=32)) public class X { >+ >+ @OnMember @Retention private String aString; >+ >+ @OnMember @Author(@Name(first="John", last="Doe", age=32)) X() { >+ >+ } >+ >+ @OnMember public void bar(@OnParameter("unused value") int i, @OnParameter("unused value") String s) { >+ @OnLocalVariable @Retention String localString = "string"; >+ } >+} >Index: workspace/Formatter/test706/X_in.java >=================================================================== >RCS file: workspace/Formatter/test706/X_in.java >diff -N workspace/Formatter/test706/X_in.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test706/X_in.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,30 @@ >+@OnMember @Retention package pkg1; >+ >+@interface Name { >+ String first() default "Joe"; >+ String last() default "Smith"; >+ int age(); >+} >+@interface Author { >+ Name value(); >+} >+@interface Retention { >+} >+@interface OnMember {} >+@interface OnParameter { >+ String value(); >+} >+@interface OnLocalVariable {} >+ >+@OnMember @Retention @Author(@Name(first="Jdt", last="Core", age=32)) public class X { >+ >+ @OnMember @Retention private String aString; >+ >+ @OnMember @Author(@Name(first="John", last="Doe", age=32)) X() { >+ >+ } >+ >+ @OnMember public void bar(@OnParameter("unused value") int i, @OnParameter("unused value") String s) { >+ @OnLocalVariable @Retention String localString = "string"; >+ } >+} >Index: workspace/Formatter/test707/X_in.java >=================================================================== >RCS file: workspace/Formatter/test707/X_in.java >diff -N workspace/Formatter/test707/X_in.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test707/X_in.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,30 @@ >+@OnMember @Retention package pkg1; >+ >+@interface Name { >+ String first() default "Joe"; >+ String last() default "Smith"; >+ int age(); >+} >+@interface Author { >+ Name value(); >+} >+@interface Retention { >+} >+@interface OnMember {} >+@interface OnParameter { >+ String value(); >+} >+@interface OnLocalVariable {} >+ >+@OnMember @Retention @Author(@Name(first="Jdt", last="Core", age=32)) public class X { >+ >+ @OnMember @Retention private String aString; >+ >+ @OnMember @Author(@Name(first="John", last="Doe", age=32)) X() { >+ >+ } >+ >+ @OnMember public void bar(@OnParameter("unused value") int i, @OnParameter("unused value") String s) { >+ @OnLocalVariable @Retention String localString = "string"; >+ } >+} >Index: workspace/Formatter/test708/X_in.java >=================================================================== >RCS file: workspace/Formatter/test708/X_in.java >diff -N workspace/Formatter/test708/X_in.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test708/X_in.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,30 @@ >+@OnMember @Retention package pkg1; >+ >+@interface Name { >+ String first() default "Joe"; >+ String last() default "Smith"; >+ int age(); >+} >+@interface Author { >+ Name value(); >+} >+@interface Retention { >+} >+@interface OnMember {} >+@interface OnParameter { >+ String value(); >+} >+@interface OnLocalVariable {} >+ >+@OnMember @Retention @Author(@Name(first="Jdt", last="Core", age=32)) public class X { >+ >+ @OnMember @Retention private String aString; >+ >+ @OnMember @Author(@Name(first="John", last="Doe", age=32)) X() { >+ >+ } >+ >+ @OnMember public void bar(@OnParameter("unused value") int i, @OnParameter("unused value") String s) { >+ @OnLocalVariable @Retention String localString = "string"; >+ } >+} >Index: workspace/Formatter/test709/X_in.java >=================================================================== >RCS file: workspace/Formatter/test709/X_in.java >diff -N workspace/Formatter/test709/X_in.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test709/X_in.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,30 @@ >+@OnMember @Retention package pkg1; >+ >+@interface Name { >+ String first() default "Joe"; >+ String last() default "Smith"; >+ int age(); >+} >+@interface Author { >+ Name value(); >+} >+@interface Retention { >+} >+@interface OnMember {} >+@interface OnParameter { >+ String value(); >+} >+@interface OnLocalVariable {} >+ >+@OnMember @Retention @Author(@Name(first="Jdt", last="Core", age=32)) public class X { >+ >+ @OnMember @Retention private String aString; >+ >+ @OnMember @Author(@Name(first="John", last="Doe", age=32)) X() { >+ >+ } >+ >+ @OnMember public void bar(@OnParameter("unused value") int i, @OnParameter("unused value") String s) { >+ @OnLocalVariable @Retention String localString = "string"; >+ } >+} >Index: workspace/Formatter/test709/X_out.java >=================================================================== >RCS file: workspace/Formatter/test709/X_out.java >diff -N workspace/Formatter/test709/X_out.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test709/X_out.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,40 @@ >+@OnMember @Retention package pkg1; >+ >+@interface Name { >+ String first() default "Joe"; >+ >+ String last() default "Smith"; >+ >+ int age(); >+} >+ >+@interface Author { >+ Name value(); >+} >+ >+@interface Retention { >+} >+ >+@interface OnMember { >+} >+ >+@interface OnParameter { >+ String value(); >+} >+ >+@interface OnLocalVariable { >+} >+ >+@OnMember @Retention @Author(@Name(first = "Jdt", last = "Core", age = 32)) public class X { >+ >+ @OnMember @Retention private String aString; >+ >+ @OnMember @Author(@Name(first = "John", last = "Doe", age = 32)) X() { >+ >+ } >+ >+ @OnMember public void bar(@OnParameter("unused value") int i, >+ @OnParameter("unused value") String s) { >+ @OnLocalVariable @Retention String localString = "string"; >+ } >+} >Index: workspace/Formatter/test708/X_out.java >=================================================================== >RCS file: workspace/Formatter/test708/X_out.java >diff -N workspace/Formatter/test708/X_out.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test708/X_out.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,50 @@ >+@OnMember >+@Retention >+package pkg1; >+ >+@interface Name { >+ String first() default "Joe"; >+ >+ String last() default "Smith"; >+ >+ int age(); >+} >+ >+@interface Author { >+ Name value(); >+} >+ >+@interface Retention { >+} >+ >+@interface OnMember { >+} >+ >+@interface OnParameter { >+ String value(); >+} >+ >+@interface OnLocalVariable { >+} >+ >+@OnMember >+@Retention >+@Author(@Name(first = "Jdt", last = "Core", age = 32)) >+public class X { >+ >+ @OnMember >+ @Retention >+ private String aString; >+ >+ @OnMember >+ @Author(@Name(first = "John", last = "Doe", age = 32)) >+ X() { >+ >+ } >+ >+ @OnMember >+ public void bar(@OnParameter("unused value") int i, >+ @OnParameter("unused value") String s) { >+ @OnLocalVariable @Retention String localString = "string"; >+ } >+} >Index: workspace/Formatter/test707/X_out.java >=================================================================== >RCS file: workspace/Formatter/test707/X_out.java >diff -N workspace/Formatter/test707/X_out.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test707/X_out.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,51 @@ >+@OnMember >+@Retention >+package pkg1; >+ >+@interface Name { >+ String first() default "Joe"; >+ >+ String last() default "Smith"; >+ >+ int age(); >+} >+ >+@interface Author { >+ Name value(); >+} >+ >+@interface Retention { >+} >+ >+@interface OnMember { >+} >+ >+@interface OnParameter { >+ String value(); >+} >+ >+@interface OnLocalVariable { >+} >+ >+@OnMember >+@Retention >+@Author(@Name(first = "Jdt", last = "Core", age = 32)) >+public class X { >+ >+ @OnMember >+ @Retention >+ private String aString; >+ >+ @OnMember >+ @Author(@Name(first = "John", last = "Doe", age = 32)) >+ X() { >+ >+ } >+ >+ @OnMember >+ public void bar(@OnParameter("unused value") >+ int i, @OnParameter("unused value") >+ String s) { >+ @OnLocalVariable @Retention String localString = "string"; >+ } >+} >Index: workspace/Formatter/test706/X_out.java >=================================================================== >RCS file: workspace/Formatter/test706/X_out.java >diff -N workspace/Formatter/test706/X_out.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test706/X_out.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,53 @@ >+@OnMember >+@Retention >+package pkg1; >+ >+@interface Name { >+ String first() default "Joe"; >+ >+ String last() default "Smith"; >+ >+ int age(); >+} >+ >+@interface Author { >+ Name value(); >+} >+ >+@interface Retention { >+} >+ >+@interface OnMember { >+} >+ >+@interface OnParameter { >+ String value(); >+} >+ >+@interface OnLocalVariable { >+} >+ >+@OnMember >+@Retention >+@Author(@Name(first = "Jdt", last = "Core", age = 32)) >+public class X { >+ >+ @OnMember >+ @Retention >+ private String aString; >+ >+ @OnMember >+ @Author(@Name(first = "John", last = "Doe", age = 32)) >+ X() { >+ >+ } >+ >+ @OnMember >+ public void bar(@OnParameter("unused value") >+ int i, @OnParameter("unused value") >+ String s) { >+ @OnLocalVariable >+ @Retention >+ String localString = "string"; >+ } >+} >Index: workspace/Formatter/test712/X_out.java >=================================================================== >RCS file: workspace/Formatter/test712/X_out.java >diff -N workspace/Formatter/test712/X_out.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test712/X_out.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,52 @@ >+@OnMember >+@Retention >+package pkg1; >+ >+@interface Name { >+ String first() default "Joe"; >+ >+ String last() default "Smith"; >+ >+ int age(); >+} >+ >+@interface Author { >+ Name value(); >+} >+ >+@interface Retention { >+} >+ >+@interface OnMember { >+} >+ >+@interface OnParameter { >+ String value(); >+} >+ >+@interface OnLocalVariable { >+} >+ >+@OnMember >+@Retention >+@Author(@Name(first = "Jdt", last = "Core", age = 32)) >+public class X { >+ >+ @OnMember >+ @Retention >+ private String aString; >+ >+ @OnMember >+ @Author(@Name(first = "John", last = "Doe", age = 32)) >+ X() { >+ >+ } >+ >+ @OnMember >+ public void bar(@OnParameter("unused value") int i, >+ @OnParameter("unused value") String s) { >+ @OnLocalVariable >+ @Retention >+ String localString = "string"; >+ } >+}
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 122247
:
75636
|
87756
|
88022
|
88283
|
88284
|
88538