if (!ResourceUtil.samePath(resource.getLocation().toString(), fileName)) {
final IProject project = resource.getProject();
result = ResourceUtil.findResourceByLocation(project, fileName);
if (result == null) {
try {
final IErlElementLocator model = ErlangEngine.getInstance()
.getModel();
final IErlProject erlProject = model.findProject(project);
if (erlProject != null) {
final IErlModule includeFile = model.findIncludeFromProject(
erlProject, fileName, fileName,
IErlElementLocator.Scope.REFERENCED_PROJECTS);
if (includeFile == null) {
result = resource;