Bug 219820 - [1.6][compiler] APT should not enable doc comment support
Summary: [1.6][compiler] APT should not enable doc comment support
Status: VERIFIED DUPLICATE of bug 189459
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M6   Edit
Assignee: Satyam Kandula CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2008-02-21 11:50 EST by Philipe Mulet CLA
Modified: 2011-03-08 05:36 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2008-02-21 11:50:43 EST
Build 3.4M4

Currently the batch compiler enables doc comment support as soon as processors are made available:

Why do we enable the docCommentSupport (javadoc) in compiler as soon as APT is turned on ?

		if ((optionValue = optionsMap.get(OPTION_Process_Annotations)) != null) {
			if (ENABLED.equals(optionValue)) {
				this.processAnnotations = true;
				this.storeAnnotations = true; // annotation processing requires annotation to be stored
				this.docCommentSupport = true;  // annotation processing requires javadoc processing
			} else if (DISABLED.equals(optionValue)) {
				this.processAnnotations = false;
				this.storeAnnotations = false;
			}
		}

This is pretty expensive, as it triggers some parsing and reference resolutions (could also cause some side effects).
Comment 1 Philipe Mulet CLA 2008-02-21 11:51:51 EST
Historical explanation is:
This is because there is no way to get the javadoc position for elements in the type system otherwise. 
APT needs the positions of the javadoc. It doesn't need to actually process the javadoc itself.
Comment 2 Philipe Mulet CLA 2008-02-21 11:52:32 EST
Olivier - is the position required on bindings ? or only on declarations ?
Comment 3 Olivier Thomann CLA 2008-02-21 11:58:23 EST
on declarations if I remember well.
Comment 4 Olivier Thomann CLA 2011-02-25 13:38:17 EST
Satyam, isn't this fixed in HEAD?
Comment 5 Satyam Kandula CLA 2011-02-27 23:27:09 EST
Yes, this is fixed in HEAD as part of bug 189459. Hence, marking this as a duplicate.

*** This bug has been marked as a duplicate of bug 189459 ***
Comment 6 Jay Arthanareeswaran CLA 2011-03-08 05:36:50 EST
Verified for 3.7M6 using build I20110301-1537.