@Override
  public PsiPackage getPackage(@NotNull PsiDirectory dir) {
    return dir.getProject().getService(CoreJavaFileManager.class).getPackage(dir);
  }
@Override
  public PsiPackage getPackage(@NotNull PsiDirectory dir)