for ( int j = 0; j < packages.length; ++j )
{
//get the package from the PackageManager because this will hold
//the version with the classes also.
PackageType currentImport = packageManager.getPackageType( packages[j] );
//the package here might in fact be null because it wasn't parsed out
//this might be something that is either not included or is part
//of another package and wasn't parsed out.
if ( currentImport == null )
{
continue;
}
//see if the current word is within the package
//at this point the word could be a fully qualified package name
//(FQPN) or an imported package name.
String wordName = word.toString();
if ( wordName.indexOf( "." ) != -1 )
{
//if there is a "." in the string then we have to assume
//it is a package.
String fqpn_package = null;
String fqpn_class = null;
fqpn_package = wordName.substring( 0, wordName.lastIndexOf( "." ) );
fqpn_class = wordName.substring( wordName.lastIndexOf( "." ) + 1, wordName.length() );
//note. since this is a reference to a full package then
//it doesn't have to be explicitly imported so this information
//is useless. Instead just see if it was parsed out.
PackageType pt = packageManager.getPackageType( fqpn_package );
if ( pt != null )
{
ClassType ct = pt.getClassType( fqpn_class );
if ( ct != null )
{
//OK. the user specified a full package to be imported
//that is in the package manager so it is time to
//link to it.
line = xrLine( line, pt.getName(), ct );
}
}
if ( fqpn_package.equals( currentImport.getName() )
&& currentImport.getClassType( fqpn_class ) != null )