Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 185768
Collapse All | Expand All

(-)src/org/eclipse/jdt/internal/compiler/tool/EclipseCompiler.java (-10 lines)
Lines 304-319 Link Here
304
		this.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6);
304
		this.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6);
305
		this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6);
305
		this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6);
306
306
307
		// TODO FIXME (olivier) REMOVE BEFORE 3.3 once the APT1.6 IS WORKING FINE
308
		for (String option : options ) {
309
			if ("-processorpath".equals(option) //$NON-NLS-1$
310
					|| ("-processor".equals(option))) { //$NON-NLS-1$
311
				this.options.put(CompilerOptions.OPTION_Process_Annotations, CompilerOptions.ENABLED);
312
				this.options.put(CompilerOptions.OPTION_DocCommentSupport, CompilerOptions.ENABLED);
313
				break;
314
			}
315
		}
316
317
		ArrayList<String> allOptions = new ArrayList<String>();
307
		ArrayList<String> allOptions = new ArrayList<String>();
318
		if (options != null) {
308
		if (options != null) {
319
			for (Iterator<String> iterator = options.iterator(); iterator.hasNext(); ) {
309
			for (Iterator<String> iterator = options.iterator(); iterator.hasNext(); ) {
(-)batch/org/eclipse/jdt/internal/compiler/batch/Main.java (-6 / +6 lines)
Lines 2155-2160 Link Here
2155
		printUsage();
2155
		printUsage();
2156
		return;
2156
		return;
2157
	}
2157
	}
2158
2159
	// enable annotation processing by default in batch mode: 185768
2160
	this.options.put(
2161
		CompilerOptions.OPTION_Process_Annotations,
2162
		CompilerOptions.ENABLED);
2163
2158
	final int INSIDE_CLASSPATH_start = 1;
2164
	final int INSIDE_CLASSPATH_start = 1;
2159
	final int INSIDE_DESTINATION_PATH = 3;
2165
	final int INSIDE_DESTINATION_PATH = 3;
2160
	final int INSIDE_TARGET = 4;
2166
	final int INSIDE_TARGET = 4;
Lines 2685-2700 Link Here
2685
				}
2691
				}
2686
				if (currentArg.equals("-processorpath")) { //$NON-NLS-1$
2692
				if (currentArg.equals("-processorpath")) { //$NON-NLS-1$
2687
					mode = INSIDE_PROCESSOR_PATH_start;
2693
					mode = INSIDE_PROCESSOR_PATH_start;
2688
					this.options.put(
2689
						CompilerOptions.OPTION_Process_Annotations,
2690
						CompilerOptions.ENABLED);
2691
					continue;
2694
					continue;
2692
				}
2695
				}
2693
				if (currentArg.equals("-processor")) { //$NON-NLS-1$
2696
				if (currentArg.equals("-processor")) { //$NON-NLS-1$
2694
					mode = INSIDE_PROCESSOR_start;
2697
					mode = INSIDE_PROCESSOR_start;
2695
					this.options.put(
2696
						CompilerOptions.OPTION_Process_Annotations,
2697
						CompilerOptions.ENABLED);
2698
					continue;
2698
					continue;
2699
				}
2699
				}
2700
				if (currentArg.equals("-proc:only")) { //$NON-NLS-1$
2700
				if (currentArg.equals("-proc:only")) { //$NON-NLS-1$
(-)compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java (+1 lines)
Lines 920-925 Link Here
920
			if (ENABLED.equals(optionValue)) {
920
			if (ENABLED.equals(optionValue)) {
921
				this.processAnnotations = true;
921
				this.processAnnotations = true;
922
				this.storeAnnotations = true; // annotation processing requires annotation to be stored
922
				this.storeAnnotations = true; // annotation processing requires annotation to be stored
923
				this.docCommentSupport = true;  // annotation processing requires javadoc processing
923
			} else if (DISABLED.equals(optionValue)) {
924
			} else if (DISABLED.equals(optionValue)) {
924
				this.processAnnotations = false;
925
				this.processAnnotations = false;
925
				this.storeAnnotations = false;
926
				this.storeAnnotations = false;

Return to bug 185768