<commit_before>package org.jetbrains.plugins.scala.codeInspection.notImplementedCode

import com.intellij.codeInsight.intention.BaseElementAtCaretIntentionAction
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.project.Project
import com.intellij.psi.PsiElement
import org.jetbrains.plugins.scala.ScalaBundle
import org.jetbrains.plugins.scala.externalHighlighters.ScalaHighlightingMode
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.ScTemplateDefinition
import org.jetbrains.plugins.scala.overrideImplement.ScalaOIUtil

final class NotImplementedMembersAction extends BaseElementAtCaretIntentionAction {
  override def getText: String = ScalaBundle.message("implement.members.fix")

  override def getFamilyName: String = getText

  override def isAvailable(project: Project, editor: Editor, element: PsiElement): Boolean =
    ScalaHighlightingMode.isShowErrorsFromCompilerEnabled(project) &&
      (element.getContext match {
        case clazz: ScTemplateDefinition =>
          ScalaOIUtil.getMembersToImplement(clazz, withOwn = true).nonEmpty
        case _ => false
      })

  override def invoke(project: Project, editor: Editor, element: PsiElement): Unit =
    element.getContext match {
      case clazz: ScTemplateDefinition =>
        ScalaOIUtil.invokeOverrideImplement(clazz, isImplement = true)(project, editor)
      case _ =>
  }

  override def startInWriteAction(): Boolean = false
}
<commit_msg>changed isShowErrorsFromCompilerEnabled to check the file, not the project<commit_after>package org.jetbrains.plugins.scala.codeInspection.notImplementedCode

import com.intellij.codeInsight.intention.BaseElementAtCaretIntentionAction
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.project.Project
import com.intellij.psi.PsiElement
import org.jetbrains.plugins.scala.ScalaBundle
import org.jetbrains.plugins.scala.externalHighlighters.ScalaHighlightingMode
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.ScTemplateDefinition
import org.jetbrains.plugins.scala.overrideImplement.ScalaOIUtil

final class NotImplementedMembersAction extends BaseElementAtCaretIntentionAction {
  override def getText: String = ScalaBundle.message("implement.members.fix")

  override def getFamilyName: String = getText

  override def isAvailable(project: Project, editor: Editor, element: PsiElement): Boolean =
    ScalaHighlightingMode.isShowErrorsFromCompilerEnabled(element.getContainingFile) &&
      (element.getContext match {
        case clazz: ScTemplateDefinition =>
          ScalaOIUtil.getMembersToImplement(clazz, withOwn = true).nonEmpty
        case _ => false
      })

  override def invoke(project: Project, editor: Editor, element: PsiElement): Unit =
    element.getContext match {
      case clazz: ScTemplateDefinition =>
        ScalaOIUtil.invokeOverrideImplement(clazz, isImplement = true)(project, editor)
      case _ =>
  }

  override def startInWriteAction(): Boolean = false
}

{'fraction_non_alphanumeric': 0.07957204948177866, 'fraction_numerical': 0.0, 'mean_word_length': 5.285714285714286, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3529631', 'n_tokens_mistral': 856, 'n_tokens_neox': 833, 'n_words': 162}