private boolean shouldImport(Generator gen, Type type) {
        final DependencyManager mgr = gen.getDependencyMgr();
        final String typeName = stripGenerics(type.getTypeName());
        
        if (mgr.isIgnored(typeName)) {
            return false;
        }

        if (mgr.isLoaded(typeName)) {
            return false;
        }

        final Optional<String> current = mgr.getCurrentPackage();
        final Optional<String> suggested = packageName(typeName);

        // TODO: Inner classes might still be imported explicitly.
            
        return !(current.isPresent()
            && suggested.isPresent()
            && current.get().equals(suggested.get()));
    }
Returns <code>true</code> if the specified type requires an explicit
import. If the type has already been imported or is part of a package
that does not need to be imported, <code>false</code> is returned.

@param gen the generator
@param type the type to import
@return      <code>true</code> if it should be imported explicitly
common-parent/codegen/src/main/java/com/speedment/common/codegen/internal/java/view/ImportView.java