<commit_before>package isabelle.eclipse.ui.preferences

import org.eclipse.core.runtime.Platform
import org.eclipse.core.runtime.preferences.{
  AbstractPreferenceInitializer,
  DefaultScope,
  IScopeContext,
  InstanceScope
}

import isabelle.eclipse.ui.IsabelleUIPlugin


/**
  * @author <NAME> 
  */
object IsabelleUIPreferences {
  
  private def pluginId = IsabelleUIPlugin.PLUGIN_ID
  
  private[preferences] def prefNode(prefScope: IScopeContext) = prefScope.getNode(pluginId)
  
  // Instance scope by itself does not include default values.
  // Need to use IPreferencesService to access values - but can use the prefs for listeners
  lazy val prefs = prefNode(InstanceScope.INSTANCE)
  
  /** Retrieves Boolean value for Isabelle UI preferences (supports Default values) */
  def getBoolean(key: String, default: Boolean) =
    Platform.getPreferencesService.getBoolean(pluginId, key, default, null)
  
  /** Preference indicating whether to show Raw outline tree */
  val OUTLINE_RAW_TREE = pluginId + ".outlineRawTree"
  
}

/**
  * @author <NAME> 
  */
class IsabelleUIPreferenceInitializer extends AbstractPreferenceInitializer {
  
  override def initializeDefaultPreferences() {
    
    import IsabelleUIPreferences._
    
    val prefDefaults = prefNode(DefaultScope.INSTANCE)
    
    // do not show raw outline tree by default
    prefDefaults.putBoolean(OUTLINE_RAW_TREE, false)
    
    ColourPreferenceInitializer.initializeDefaultPreferences()
  }
}
<commit_msg>Isabelle font key<commit_after>package isabelle.eclipse.ui.preferences

import org.eclipse.core.runtime.Platform
import org.eclipse.core.runtime.preferences.{
  AbstractPreferenceInitializer,
  DefaultScope,
  IScopeContext,
  InstanceScope
}

import isabelle.eclipse.ui.IsabelleUIPlugin


/**
  * @author <NAME> 
  */
object IsabelleUIPreferences {
  
  private def pluginId = IsabelleUIPlugin.PLUGIN_ID
  
  private[preferences] def prefNode(prefScope: IScopeContext) = prefScope.getNode(pluginId)
  
  // Instance scope by itself does not include default values.
  // Need to use IPreferencesService to access values - but can use the prefs for listeners
  lazy val prefs = prefNode(InstanceScope.INSTANCE)
  
  /** Retrieves Boolean value for Isabelle UI preferences (supports Default values) */
  def getBoolean(key: String, default: Boolean) =
    Platform.getPreferencesService.getBoolean(pluginId, key, default, null)
  
  /** Preference indicating whether to show Raw outline tree */
  val OUTLINE_RAW_TREE = pluginId + ".outlineRawTree"
  
  def ISABELLE_FONT = "isabelle.eclipse.ui.isabelleFont"
  
}

/**
  * @author <NAME> 
  */
class IsabelleUIPreferenceInitializer extends AbstractPreferenceInitializer {
  
  override def initializeDefaultPreferences() {
    
    import IsabelleUIPreferences._
    
    val prefDefaults = prefNode(DefaultScope.INSTANCE)
    
    // do not show raw outline tree by default
    prefDefaults.putBoolean(OUTLINE_RAW_TREE, false)
    
    ColourPreferenceInitializer.initializeDefaultPreferences()
  }
}

{'fraction_non_alphanumeric': 0.07707509881422925, 'fraction_numerical': 0.0, 'mean_word_length': 4.1561969439728355, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3876575', 'n_tokens_mistral': 892, 'n_tokens_neox': 912, 'n_words': 221}