final List<UsageFilteringRule> rules = new ArrayList<UsageFilteringRule>();
if (!SHOW_IMPORTS) {
rules.add(new ImportFilteringRule());
}
if (!myReadWriteState.isShowReadAccess()) {
rules.add(new ReadAccessFilteringRule());
}
if (!myReadWriteState.isShowWriteAccess()) {
rules.add(new WriteAccessFilteringRule());
}
return rules.toArray(new UsageFilteringRule[rules.size()]);