<commit_before>package org.jetbrains.plugins.scala
package configuration.template

import com.intellij.openapi.roots.libraries.NewLibraryConfiguration
import com.intellij.openapi.roots.ui.configuration.libraryEditor.LibraryEditor
import com.intellij.openapi.roots.{JavadocOrderRootType, OrderRootType}
import com.intellij.openapi.vfs.VfsUtilCore.virtualToIoFile
import com.intellij.openapi.vfs.VirtualFile
import org.jetbrains.plugins.scala.configuration.template.JarPattern._
import org.jetbrains.plugins.scala.configuration.{ScalaLanguageLevel, ScalaLibraryProperties, ScalaLibraryType}

/**
 * @author <NAME>
 */
case class ScalaSdkDescriptor(version: String,
                              compilerFiles: Seq[VirtualFile],
                              libraryFiles: Seq[VirtualFile],
                              sourceFiles: Seq[VirtualFile],
                              docFiles: Seq[VirtualFile]) {

  def createNewLibraryConfiguration() = {
    val properties = new ScalaLibraryProperties()

    properties.languageLevel = ScalaLanguageLevel.getDefault<commit_msg>Detect language level in Scala SDK from jars version<commit_after>package org.jetbrains.plugins.scala
package configuration.template

import com.intellij.openapi.roots.libraries.NewLibraryConfiguration
import com.intellij.openapi.roots.ui.configuration.libraryEditor.LibraryEditor
import com.intellij.openapi.roots.{JavadocOrderRootType, OrderRootType}
import com.intellij.openapi.vfs.VfsUtilCore.virtualToIoFile
import com.intellij.openapi.vfs.VirtualFile
import org.jetbrains.plugins.scala.configuration.template.JarPattern._
import org.jetbrains.plugins.scala.configuration.{ScalaLanguageLevel, ScalaLibraryProperties, ScalaLibraryType}

/**
 * @author <NAME>
 */
case class ScalaSdkDescriptor(version: String,
                              compilerFiles: Seq[VirtualFile],
                              libraryFiles: Seq[VirtualFile],
                              sourceFiles: Seq[VirtualFile],
                              docFiles: Seq[VirtualFile]) {

  def createNewLibraryConfiguration() = {
    val properties = new ScalaLibraryProperties()

    properties.languageLevel = ScalaLanguageLevel.from(version, true)
{'fraction_non_alphanumeric': 0.0832575068243858, 'fraction_numerical': 0.0, 'mean_word_length': 3.6588983050847457, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6275459', 'n_tokens_mistral': 610, 'n_tokens_neox': 583, 'n_words': 94}