/** * Check whether a file is recommended to be visible. * Default return value is visible unless at least one VisibilityQueryImplementation * provider says hidden. * @param file a file which should be checked * @return true if it is recommended to show this file */ public boolean isVisible(FileObject file) { Parameters.notNull("file", file); for (VisibilityQueryImplementation vqi : getVqiInstances()) { if (!vqi.isVisible(file)) { return false; } } return true; }
/** * Check whether a file is recommended to be visible. * Default return value is visible unless at least one VisibilityQueryImplementation * provider says hidden. * @param file a file which should be checked * @return true if it is recommended to show this file * @since org.netbeans.modules.queries/1 1.12 */ public boolean isVisible(File file) { Parameters.notNull("file", file); for (VisibilityQueryImplementation vqi : getVqiInstances()) { if (vqi instanceof VisibilityQueryImplementation2) { if (!((VisibilityQueryImplementation2)vqi).isVisible(file)) { return false; } } else { FileObject fo = FileUtil.toFileObject(file); if (fo != null) { if (!vqi.isVisible(fo)) { return false; } } } } return true; }