public static @NlsActions.ActionText String getActionName(DataContext dataContext){
    Editor editor = dataContext.getData(CommonDataKeys.EDITOR);
    Project project = dataContext.getData(CommonDataKeys.PROJECT);
    if (project != null && editor != null) {
      PsiFile file = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument());
      PsiMember member = findMember(editor, file);
      if (member instanceof PsiField) {
        return ActionsBundle.message("action.MethodDuplicates.field.text");
      }
      else if (member instanceof PsiMethod) {
        return ActionsBundle.message("action.MethodDuplicates.method.text");
      }
    }
    return ActionsBundle.message("action.MethodDuplicates.text");
  }
public static @NlsActions.ActionText String getActionName(DataContext dataContext)