@Override
public boolean visit(Statement s) throws Exception {
if (s instanceof RutaImportStatement) {
// handle engine imports
if (((RutaImportStatement) s).getType() == RutaStatementConstants.S_IMPORT_ENGINE) {
SimpleReference sRef = (SimpleReference) ((RutaImportStatement) s).getExpression();
if (RutaCheckerUtils.checkEngineImport(sRef.getName(), project)) {
importEngine(sRef.getName());
} else {
IProblem problem = problemFactory.createFileNotFoundProblem(sRef);
rep.reportProblem(problem);
}
}
// handle script imports
if (((RutaImportStatement) s).getType() == RutaStatementConstants.S_IMPORT_SCRIPT) {
SimpleReference stRef = (SimpleReference) ((RutaImportStatement) s).getExpression();
String sRefName = stRef.getName();
try {
Set<String> blocks = RutaCheckerUtils.importScript(sRefName,
IModelElement.METHOD, project);
scripts.add(sRefName);
if (!blocks.isEmpty()) {