* @return the WodParserCache for the component
* @throws CoreException if a core error occurs
* @throws LocateException if a locate error occurs
*/
public static WodParserCache parser(IProject project, String componentName) throws CoreException, LocateException {
LocalizedComponentsLocateResult locateResult = LocatePlugin.getDefault().getLocalizedComponentsLocateResult(project, componentName);
IFile resource = locateResult.getFirstWodFile();
if (resource == null) {
resource = locateResult.getFirstHtmlFile();
}
WodParserCache parserCache = WodParserCache.parser(resource, true);
if (parserCache._componentsLocateResults == null) {
parserCache._componentsLocateResults = locateResult;
}