}
@Override
public void validate() throws Exception {
setValidated(true);
WooModel wooModel = getModel();
if (wooModel != null) {
WodParserCache cache = getCache();
IJavaProject javaProject = cache.getJavaProject();
IType componentType = cache.getComponentType();
List<WodProblem> wodProblems = wooModel.getProblems(javaProject, componentType, WodParserCache.getTypeCache(), WodParserCache.getModelGroupCache());
IFile wooFile = getFile();
if (wooFile != null && wooFile.exists()) {
for (WodProblem wodProblem : wodProblems) {
WodModelUtils.createMarker(wooFile, wodProblem);
}
try {
wooModel.loadModelFromStream(wooFile.getContents());
}
catch (Throwable e) {
WodModelUtils.createMarker(wooFile, new WodProblem(e.getMessage(), null, 0, false));
}
}