public void addImport(final ImportDirective importDirective) {
Ide ide = importDirective.getIde();
String name = ide.getName();
Ide packageIde = ide.getQualifier();
String packageName = "";
final CompilationUnit compilationUnit = getCompilationUnit();
if (packageIde != null) {
packageName = packageIde.getQualifiedNameStr();
packages.add(packageName);
}
if (AS3Type.ANY.toString().equals(name)) {
final List<String> packageIdes = compilationUnit.getCompiler().getPackageIdes(packageName);
for (String typeToImport : packageIdes) {
ImportDirective implicitImport = new ImportDirective(packageIde, typeToImport);
implicitImport.scope(this);
}
} else {