docs: private static String addSecondaryTypesToPattern(IFile file, String fileName, String classNamePattern) {
          ICompilationUnit cu = JavaCore.createCompilationUnitFrom(file);
          if (cu == null) {
              FindbugsPlugin.getDefault().logError(
                      "NULL compilation unit for " + file + ", FB analysis might  be incomplete for included types");
              return classNamePattern;
          }
          try {
              IType[] types = cu.getTypes();
              if (types.length > 1) {
                  StringBuilder sb = new StringBuilder(classNamePattern);
                  for (IType type : types) {
                      if (fileName.equals(type.getElementName())) {
                          // "usual" type with the same name: we have it already
                          continue;
                      }
                      sb.append("|").append(type.getElementName());
                      sb.append("\\.class|").append(type.getElementName());
                      sb.append("\\$.*\\.class");
                  }
                  classNamePattern = sb.toString();
              }
          } catch (JavaModelException e) {
              FindbugsPlugin.getDefault().logException(e, "Cannot get types from compilation unit: " + cu);
          }
          return classNamePattern;
      }