docs: public static boolean isJavaFile(IResource resource) {
          if (resource == null || (resource.getType() != IResource.FILE)) {
              return false;
          }
          String ex = resource.getFileExtension();
          return "java".equalsIgnoreCase(ex); //$NON-NLS-1$
      }