* @param file the file
* @return true if we should ignore the file, false otherwise
*/
protected boolean ignoreFile(final VFSDeploymentUnit unit, final VirtualFile file)
{
NameIgnoreMechanism mechanism = getNameIgnoreMechanism();
if (mechanism != null)
{
LazyPath path = new LazyPath()
{
public String buildPath()
{
try
{
VirtualFile root = unit.getRoot();
return file.getPathNameRelativeTo(root);
}
catch (IllegalArgumentException e)
{
// most probably alt-dd file, let's take its full path
return file.getPathName();
}
}
};
return mechanism.ignorePath(unit, path);
}
return false;
}