### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredField.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredField.java,v retrieving revision 1.33 diff -u -r1.33 RecoveredField.java --- compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredField.java 29 Mar 2006 02:47:34 -0000 1.33 +++ compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredField.java 18 Apr 2006 13:35:08 -0000 @@ -19,6 +19,7 @@ import org.eclipse.jdt.internal.compiler.ast.ASTNode; import org.eclipse.jdt.internal.compiler.ast.Expression; import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration; +import org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression; import org.eclipse.jdt.internal.compiler.ast.Statement; import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration; @@ -121,7 +122,13 @@ typeDeclaration.bodyEnd = this.fieldDeclaration.declarationSourceEnd; } if (recoveredType.preserveContent){ - fieldDeclaration.initialization = recoveredType.updatedTypeDeclaration().allocation; + TypeDeclaration anonymousType = recoveredType.updatedTypeDeclaration(); + fieldDeclaration.initialization = anonymousType.allocation; + if(this.fieldDeclaration.declarationSourceEnd == 0) { + int end = anonymousType.declarationSourceEnd; + this.fieldDeclaration.declarationSourceEnd = end; + this.fieldDeclaration.declarationEnd = end; + } } } if (this.anonymousTypeCount > 0) fieldDeclaration.bits |= ASTNode.HasLocalType; Index: compiler/org/eclipse/jdt/internal/compiler/Compiler.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java,v retrieving revision 1.77 diff -u -r1.77 Compiler.java --- compiler/org/eclipse/jdt/internal/compiler/Compiler.java 7 Apr 2006 09:03:35 -0000 1.77 +++ compiler/org/eclipse/jdt/internal/compiler/Compiler.java 18 Apr 2006 13:35:07 -0000 @@ -69,6 +69,9 @@ * them all) and at the same time perform some actions such as opening a dialog * in UI when compiling interactively. * @see org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies + * + * @param settings java.util.Map + * The settings that control the compiler behavior. * * @param requestor org.eclipse.jdt.internal.compiler.api.ICompilerRequestor * Component which will receive and persist all compilation results and is intended @@ -83,7 +86,7 @@ * to accumulate the created problems, the compiler will gather them all and hand * them back as part of the compilation unit result. * - * @deprecated this constructor is keeped to preserve 3.1 and 3.2M4 compatibility + * @deprecated this constructor is kept to preserve 3.1 and 3.2M4 compatibility */ public Compiler( INameEnvironment environment, @@ -114,6 +117,9 @@ * in UI when compiling interactively. * @see org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies * + * @param settings java.util.Map + * The settings that control the compiler behavior. + * * @param requestor org.eclipse.jdt.internal.compiler.api.ICompilerRequestor * Component which will receive and persist all compilation results and is intended * to consume them as they are produced. Typically, in a batch compiler, it is @@ -131,7 +137,7 @@ * This parameter is used to optimize the literals or leave them as they are in the source. * If you put true, "Hello" + " world" will be converted to "Hello world". * - * @deprecated this constructor is keeped to preserve 3.1 and 3.2M4 compatibility + * @deprecated this constructor is kept to preserve 3.1 and 3.2M4 compatibility */ public Compiler( INameEnvironment environment, @@ -163,6 +169,9 @@ * in UI when compiling interactively. * @see org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies * + * @param options org.eclipse.jdt.internal.compiler.impl.CompilerOptions + * The options that control the compiler behavior. + * * @param requestor org.eclipse.jdt.internal.compiler.api.ICompilerRequestor * Component which will receive and persist all compilation results and is intended * to consume them as they are produced. Typically, in a batch compiler, it is @@ -205,6 +214,9 @@ * in UI when compiling interactively. * @see org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies * + * @param options org.eclipse.jdt.internal.compiler.impl.CompilerOptions + * The options that control the compiler behavior. + * * @param requestor org.eclipse.jdt.internal.compiler.api.ICompilerRequestor * Component which will receive and persist all compilation results and is intended * to consume them as they are produced. Typically, in a batch compiler, it is