Bug 151881 - Modifications done via Resource API not available synchronously in the model
Summary: Modifications done via Resource API not available synchronously in the model
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1.2   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.3 RC4   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-26 13:23 EDT by Jess Garms CLA
Modified: 2007-06-21 08:01 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jess Garms CLA 2006-07-26 13:23:31 EDT
APT reads compiler data via the model APIs. We've run into a race condition with these APIs as follows:

1) User has a third-party builder that runs before the JavaBuilder and creates a number of Java source files via the IResource APIs
2) APT runs and uses the model APIs to attempt to find some of those generated source files. This fails, as the model has not yet been refreshed.

The JavaBuilder never encounters this problem directly, as it does not use the model for compilation during build.
Comment 1 Jerome Lanneluc CLA 2007-06-21 08:01:36 EDT
The Java model can only be up-to-date iff a Java model API is used, or after a resource change event has been received.
A workaround for APT would be to force the resource change event to be triggered using IWorkspace#checkpoint(boolean).
No action planned on JDT/Core side.