public void writeImports(TextBuffer buffer, boolean addSeparator) {
    if (DecompilerContext.getOption(IFernflowerPreferences.REMOVE_IMPORTS)) {
      return;
    }

    List<String> imports = packImports();
    for (String line : imports) {
      buffer.append("import ").append(line).append(';').appendLineSeparator();
    }
    if (addSeparator && !imports.isEmpty()) {
      buffer.appendLineSeparator();
    }
  }
Check whether the package-less name ClassName is shaded by variable in a context of
the decompiled class
@param classToName - pkg.name.ClassName - class to find shortname for
@return ClassName if the name is not shaded by local field, pkg.name.ClassName otherwise
src/org/jetbrains/java/decompiler/main/collectors/ImportCollector.java