public static @Nullable String getBundleName(final PropertiesFile propertiesFile) {
    final PsiDirectory directory = propertiesFile.getParent();
    if (directory == null) {
      return null;
    }
    final String packageName;
    final PsiPackage aPackage = JavaDirectoryService.getInstance().getPackage(directory);
    if (aPackage == null) {
      packageName = "";
    }
    else {
      packageName = aPackage.getQualifiedName();
    }

    String bundleName = propertiesFile.getResourceBundle().getBaseName();

    if (!packageName.isEmpty()) {
      bundleName = packageName + '.' + bundleName;
    }
    bundleName = bundleName.replace('.', '/');
    return bundleName;
  }
public static @Nullable String getBundleName(final PropertiesFile propertiesFile)