@Nullable
  public static ResourceBundle getResourceBundleFromDataContext(@NotNull DataContext dataContext) {
    PsiElement element = CommonDataKeys.PSI_ELEMENT.getData(dataContext);
    if (element instanceof IProperty) return null; //rename property
    final ResourceBundle[] bundles = ResourceBundle.ARRAY_DATA_KEY.getData(dataContext);
    if (bundles != null && bundles.length == 1) return bundles[0];
    VirtualFile virtualFile = CommonDataKeys.VIRTUAL_FILE.getData(dataContext);
    if (virtualFile == null || !virtualFile.isValid()) {
      return null;
    }
    final Project project = CommonDataKeys.PROJECT.getData(dataContext);
    if (virtualFile instanceof ResourceBundleAsVirtualFile && project != null) {
      return ((ResourceBundleAsVirtualFile)virtualFile).getResourceBundle();
    }
    if (project != null) {
      final PsiFile psiFile = PsiManager.getInstance(project).findFile(virtualFile);
      if (psiFile instanceof PropertiesFile) {
        return ((PropertiesFile)psiFile).getResourceBundle();
      }
    }
    return null;
  }
@Nullable
  public static ResourceBundle getResourceBundleFromDataContext(@NotNull DataContext dataContext)