Summary: | API: Provide ASTs for compilation participants | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Martin Aeschlimann <martinae> |
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
Status: | RESOLVED WONTFIX | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | benno.baumgartner, jerome_lanneluc, markus.kell.r, philippe_mulet |
Version: | 3.2 | ||
Target Milestone: | 3.3 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Martin Aeschlimann
2006-01-27 12:46:20 EST
Kent - pls have a look at this. In theory, a compiler participant should be allowed to reach a DOM AST, independantly from APT. The builder is only notified about compilation units before or after the compile loop (depending on annotation support). The builder does not have access to an AST for the CU and would have to create it even tho we don't know if any of the participants actually want it. So what proof do we have that numerous participants are going to be attached that want an AST for the same CU? As of now - none. If we get to the point that there are 4-5 attached participants that want to examine EVERY single compilation unit about to be compiled - then creating ASTs will not be the only performance problem. Philippe - this is why we should have never released the participant support for anything but annotations... I know we don't have the compiler AST handy in those stages, but still we could provide a mechanism for participants to reuse the same AST if they ask for some. Creation should be lazy; i.e. until a participant asks for AST, none is created. Like we do when reconciling. Reassigning to Jerome who did the reconcile side. The problem is that for each participant we notify all compilation units. So if a participant was to request an AST for each compilation units, we would keep all these AST in memory until we finished to notify participants. This would not scale. So you would have to add a per-CU notification of compilation participant results and tell compilation participants that they are not allowed to retain links to the AST after the callback returns. I have a better idea - REMOVE the support for compilation participants to get units before the compile loop! We know performance will be pathetic and its a waste of time trying to improve it. Post 3.2 As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you. |