if (!(mdObj instanceof ModuleDeclaration)) {
return;
}
ModuleDeclaration md = (ModuleDeclaration) mdObj;
IProblemReporter problemReporter = context.getProblemReporter();
ISourceModule smod = context.getSourceModule();
// get Types:
Set<String> types = null;
try {
types = importBasicTypeSystem();
} catch (InvalidXMLException e1) {
System.err.println("ERROR: Failed to get BasicTypeSystem!! " + this.toString());
// problemReporter.reportProblem(problem)
} catch (IOException e1) {
System.err.println("ERROR: Failed to get BasicTypeSystem!! " + this.toString());
}
if (types == null) {
types = new HashSet<String>();
}
// traverse:
ISourceLineTracker linetracker = context.getLineTracker();
String fileName = smod.getElementName();
try {
ASTVisitor visitor = new TypeCheckerVisitor(problemReporter, linetracker, fileName, types);
md.traverse(visitor);
} catch (Exception e) {
e.printStackTrace();