Class JavaProject
- All Implemented Interfaces:
IResourceDeltaVisitor
- Author:
- Christopher Mindus
Method Summary
Modifier and TypeMethodDescriptionvoiddoValidateReferences(boolean doReCheck) Validates the references for this project.protected voidfinalize()Finalized?Gets the property Java container root for Module projects.Gets the Module model.Gets the project.booleanChecks if this project is included in any of the Module projects, thus needs parsing.booleanvisit(IResourceDelta delta) If one of the folders are found, let the main class handle the visiting.
Method Details
getJavaRootContainer
Gets the property Java container root for Module projects.doValidateReferences
public void doValidateReferences(boolean doReCheck) Validates the references for this project.- Parameters:
doReCheck- If a re-check of all references must be done.
getProject
Gets the project.getModuleModel
Gets the Module model.- Returns:
- The Module model or null if not yet created or not a Module project.
finalize
visit
If one of the folders are found, let the main class handle the visiting.- Specified by:
visitin interfaceIResourceDeltaVisitor- Throws:
CoreException
isParsingRequired
public boolean isParsingRequired()Checks if this project is included in any of the Module projects, thus needs parsing.LOCK ORDER: the Project Manager's lock first, then the
JavaManager, then thisJavaProject. That is the order of a project load:ModuleModel.fromand the Project Manager callModuleNature.setProjectunder the Project Manager's lock, and itsnew ModuleModelgoes on toJavaManager.onOpenandonOpen(ModuleModel).ProjectManager.getLoadedModuleModels()takes the Project Manager's lock, so it is called here with this monitor NOT held. The Java builder asks this question at the start of every build (JavaCompilationParticipant.isActive): when it waited for the Project Manager's lock inside this monitor while a load held that lock and waited for this monitor, neither of them ever ended. Nothing called under this monitor may take the Project Manager's lock or the monitor of theJavaManager.The answer is kept until it is forgotten (
forgetParsingRequired()). A Module model that is handed over while the Project Manager is asked decides the answer; an answer asked for before it was forgotten is not kept after it.- Returns:
- true if the Java sources of this project are parsed: it is a Module project, or it is on the build path of a loaded Module project.