mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-28 03:15:33 +02:00
hack to initialize ast cache for reading comments
This commit is contained in:
parent
2b1b5e18d4
commit
2d5b88f62e
1 changed files with 8 additions and 0 deletions
|
@ -10,8 +10,10 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.codan.internal.checkers;
|
||||
|
||||
import org.eclipse.cdt.codan.checkers.CodanCheckersActivator;
|
||||
import org.eclipse.cdt.codan.core.cxx.CxxAstUtils;
|
||||
import org.eclipse.cdt.codan.core.cxx.model.AbstractIndexAstChecker;
|
||||
import org.eclipse.cdt.codan.core.cxx.model.CxxModelsCache;
|
||||
import org.eclipse.cdt.codan.core.model.ICheckerWithPreferences;
|
||||
import org.eclipse.cdt.codan.core.model.IProblemWorkingCopy;
|
||||
import org.eclipse.cdt.core.dom.ast.ASTVisitor;
|
||||
|
@ -118,6 +120,12 @@ public class CaseBreakChecker extends AbstractIndexAstChecker implements IChecke
|
|||
_prev_normal_stmnt_offset = 0;
|
||||
_prev_case_stmnt_offset = 0;
|
||||
_prev_case_stmnt = null;
|
||||
//initilize cache
|
||||
try {
|
||||
CxxModelsCache.getInstance().getAst(getFile());
|
||||
} catch (Exception e) {
|
||||
CodanCheckersActivator.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue