// definitions to the project scope, we must also check
// whether it matches an externally visible definition
// in the file.
if (inInvisibleCompilationUnit)
{
IFileNode fileNode = (IFileNode)importNode.getAncestorOfType(IFileNode.class);
IDefinition[] externallyVisibleDefinitionsInThisFile =
fileNode.getTopLevelDefinitions(false, true);
for (IDefinition d : externallyVisibleDefinitionsInThisFile)
{
String qName = d.getQualifiedName();
if (qName.equals(importName))
return true;