if (curr instanceof CssExtension) {
CssExtension e = (CssExtension) curr;
recFindObjects(e.getPackageDef(), result, filter);
}
else if (curr instanceof PackageDefinition) {
PackageDefinition pkg = (PackageDefinition) curr;
for (Definition def : pkg.getRules()) {
recFindObjects((CSSRuleDefinition) def, result, filter);
}
for (ElementDefinition el : pkg.getElements()) {
recFindObjects(el, result, filter);
}
for (PackageDefinition subPkg : pkg.getSubpackages()) {
recFindObjects(subPkg, result, filter);
}
}
}