<commit_before>package org.jetbrains.plugins.scala.actions

import com.intellij.openapi.actionSystem.{AnAction, AnActionEvent, CommonDataKeys}
import com.intellij.openapi.project.Project
import org.jetbrains.plugins.scala.compiler.HydraCompilerSettings

/**
  * @author <NAME>
  */
class EnableHydraSettingsAction extends AnAction{
  def actionPerformed(e: AnActionEvent) {
    CommonDataKeys.PROJECT.getData(e.getDataContext) match {
      case project: Project => {
        val settings = HydraCompilerSettings.getInstance(project)
        settings.isHydraSettingsEnabled = !settings.isHydraSettingsEnabled
      }
      case _ =>
    }
  }
}<commit_msg>small fix in enable hydra action<commit_after>package org.jetbrains.plugins.scala.actions

import com.intellij.openapi.actionSystem.{AnAction, AnActionEvent, CommonDataKeys, ToggleAction}
import com.intellij.openapi.project.Project
import org.jetbrains.plugins.scala.compiler.HydraCompilerSettings

/**
  * @author <NAME>
  */
class EnableHydraSettingsAction extends ToggleAction{

  override def setSelected(e: AnActionEvent, toSet: Boolean): Unit = {
    CommonDataKeys.PROJECT.getData(e.getDataContext) match {
      case project: Project => {
        val settings = HydraCompilerSettings.getInstance(project)
        settings.isHydraSettingsEnabled = toSet
      }
      case _ =>
    }
  }

  override def isSelected(e: AnActionEvent): Boolean = {
    CommonDataKeys.PROJECT.getData(e.getDataContext) match {
      case project: Project => {
        val settings = HydraCompilerSettings.getInstance(project)
        settings.isHydraSettingsEnabled
      }
      case _ => false
    }
  }
}
{'fraction_non_alphanumeric': 0.09272727272727273, 'fraction_numerical': 0.0, 'mean_word_length': 3.957957957957958, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5632847', 'n_tokens_mistral': 494, 'n_tokens_neox': 484, 'n_words': 86}