View | Details | Raw Unified | Return to bug 136678
Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredField.java (-1 / +8 lines)
Lines 19-24 Link Here
19
import org.eclipse.jdt.internal.compiler.ast.ASTNode;
19
import org.eclipse.jdt.internal.compiler.ast.ASTNode;
20
import org.eclipse.jdt.internal.compiler.ast.Expression;
20
import org.eclipse.jdt.internal.compiler.ast.Expression;
21
import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration;
21
import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration;
22
import org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression;
22
import org.eclipse.jdt.internal.compiler.ast.Statement;
23
import org.eclipse.jdt.internal.compiler.ast.Statement;
23
import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
24
import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
24
25
Lines 121-127 Link Here
121
					typeDeclaration.bodyEnd = this.fieldDeclaration.declarationSourceEnd;
122
					typeDeclaration.bodyEnd = this.fieldDeclaration.declarationSourceEnd;
122
				}
123
				}
123
				if (recoveredType.preserveContent){
124
				if (recoveredType.preserveContent){
124
					fieldDeclaration.initialization = recoveredType.updatedTypeDeclaration().allocation;
125
					TypeDeclaration anonymousType = recoveredType.updatedTypeDeclaration();
126
					fieldDeclaration.initialization = anonymousType.allocation;
127
					if(this.fieldDeclaration.declarationSourceEnd == 0) {
128
						int end = anonymousType.declarationSourceEnd;
129
						this.fieldDeclaration.declarationSourceEnd = end;
130
						this.fieldDeclaration.declarationEnd = end;
131
					}
125
				}
132
				}
126
			}
133
			}
127
			if (this.anonymousTypeCount > 0) fieldDeclaration.bits |= ASTNode.HasLocalType;
134
			if (this.anonymousTypeCount > 0) fieldDeclaration.bits |= ASTNode.HasLocalType;
(-)compiler/org/eclipse/jdt/internal/compiler/Compiler.java (-2 / +14 lines)
Lines 69-74 Link Here
69
	 *      them all) and at the same time perform some actions such as opening a dialog
69
	 *      them all) and at the same time perform some actions such as opening a dialog
70
	 *      in UI when compiling interactively.
70
	 *      in UI when compiling interactively.
71
	 *      @see org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies
71
	 *      @see org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies
72
	 *  
73
	 *  @param settings java.util.Map
74
	 *      The settings that control the compiler behavior.
72
	 *      
75
	 *      
73
	 *  @param requestor org.eclipse.jdt.internal.compiler.api.ICompilerRequestor
76
	 *  @param requestor org.eclipse.jdt.internal.compiler.api.ICompilerRequestor
74
	 *      Component which will receive and persist all compilation results and is intended
77
	 *      Component which will receive and persist all compilation results and is intended
Lines 83-89 Link Here
83
	 *      to accumulate the created problems, the compiler will gather them all and hand
86
	 *      to accumulate the created problems, the compiler will gather them all and hand
84
	 *      them back as part of the compilation unit result.
87
	 *      them back as part of the compilation unit result.
85
	 *      
88
	 *      
86
	 *  @deprecated this constructor is keeped to preserve 3.1 and 3.2M4 compatibility
89
	 *  @deprecated this constructor is kept to preserve 3.1 and 3.2M4 compatibility
87
	 */
90
	 */
88
	public Compiler(
91
	public Compiler(
89
		INameEnvironment environment,
92
		INameEnvironment environment,
Lines 114-119 Link Here
114
	 *      in UI when compiling interactively.
117
	 *      in UI when compiling interactively.
115
	 *      @see org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies
118
	 *      @see org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies
116
	 *      
119
	 *      
120
	 *  @param settings java.util.Map
121
	 *      The settings that control the compiler behavior.
122
	 *      
117
	 *  @param requestor org.eclipse.jdt.internal.compiler.api.ICompilerRequestor
123
	 *  @param requestor org.eclipse.jdt.internal.compiler.api.ICompilerRequestor
118
	 *      Component which will receive and persist all compilation results and is intended
124
	 *      Component which will receive and persist all compilation results and is intended
119
	 *      to consume them as they are produced. Typically, in a batch compiler, it is 
125
	 *      to consume them as they are produced. Typically, in a batch compiler, it is 
Lines 131-137 Link Here
131
	 *		This parameter is used to optimize the literals or leave them as they are in the source.
137
	 *		This parameter is used to optimize the literals or leave them as they are in the source.
132
	 * 		If you put true, "Hello" + " world" will be converted to "Hello world".
138
	 * 		If you put true, "Hello" + " world" will be converted to "Hello world".
133
	 * 
139
	 * 
134
	 *  @deprecated this constructor is keeped to preserve 3.1 and 3.2M4 compatibility
140
	 *  @deprecated this constructor is kept to preserve 3.1 and 3.2M4 compatibility
135
	 */
141
	 */
136
	public Compiler(
142
	public Compiler(
137
		INameEnvironment environment,
143
		INameEnvironment environment,
Lines 163-168 Link Here
163
	 *      in UI when compiling interactively.
169
	 *      in UI when compiling interactively.
164
	 *      @see org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies
170
	 *      @see org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies
165
	 *      
171
	 *      
172
	 *  @param options org.eclipse.jdt.internal.compiler.impl.CompilerOptions
173
	 *      The options that control the compiler behavior.
174
	 *      
166
	 *  @param requestor org.eclipse.jdt.internal.compiler.api.ICompilerRequestor
175
	 *  @param requestor org.eclipse.jdt.internal.compiler.api.ICompilerRequestor
167
	 *      Component which will receive and persist all compilation results and is intended
176
	 *      Component which will receive and persist all compilation results and is intended
168
	 *      to consume them as they are produced. Typically, in a batch compiler, it is 
177
	 *      to consume them as they are produced. Typically, in a batch compiler, it is 
Lines 205-210 Link Here
205
	 *      in UI when compiling interactively.
214
	 *      in UI when compiling interactively.
206
	 *      @see org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies
215
	 *      @see org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies
207
	 *      
216
	 *      
217
	 *  @param options org.eclipse.jdt.internal.compiler.impl.CompilerOptions
218
	 *      The options that control the compiler behavior.
219
	 *      
208
	 *  @param requestor org.eclipse.jdt.internal.compiler.api.ICompilerRequestor
220
	 *  @param requestor org.eclipse.jdt.internal.compiler.api.ICompilerRequestor
209
	 *      Component which will receive and persist all compilation results and is intended
221
	 *      Component which will receive and persist all compilation results and is intended
210
	 *      to consume them as they are produced. Typically, in a batch compiler, it is 
222
	 *      to consume them as they are produced. Typically, in a batch compiler, it is 

Return to bug 136678