public static WhiteSpaceFormattingStrategy getStrategy(@NotNull Editor editor) {
    Project project = editor.getProject();
    if (project != null) {
      PsiFile psiFile = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument());
      if (psiFile != null) {
        return getStrategy(psiFile.getLanguage());
      }
    }
    return getStrategy();
  }
public static WhiteSpaceFormattingStrategy getStrategy(@NotNull Editor editor)