// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.editorconfig.language.filetype

import com.intellij.icons.AllIcons
import com.intellij.openapi.fileTypes.LanguageFileType
import org.editorconfig.language.EditorConfigLanguage
import org.editorconfig.language.messages.EditorConfigBundle
import javax.swing.Icon

object EditorConfigFileType : LanguageFileType(EditorConfigLanguage) {
  override fun getName() = EditorConfigFileConstants.FILETYPE_NAME
  override fun getDescription() = EditorConfigBundle.get("file.type.description")
  override fun getDefaultExtension() = EditorConfigFileConstants.FILE_EXTENSION
  override fun getIcon(): Icon? = AllIcons.Nodes.Editorconfig
}

// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.editorconfig.language.filetype

import com.intellij.icons.AllIcons
import com.intellij.openapi.fileTypes.FileType
import com.intellij.openapi.fileTypes.LanguageFileType
import org.editorconfig.language.EditorConfigLanguage
import org.editorconfig.language.messages.EditorConfigBundle
import java.nio.charset.StandardCharsets
import javax.swing.Icon

object EditorConfigFileType : LanguageFileType(EditorConfigLanguage) {
  override fun getName() = EditorConfigFileConstants.FILETYPE_NAME
  override fun getDescription() = EditorConfigBundle.get("file.type.description")
  override fun getDefaultExtension() = EditorConfigFileConstants.FILE_EXTENSION
  override fun getIcon(): Icon? = AllIcons.Nodes.Editorconfig

  override fun getCharsetHint(): FileType.CharsetHint {
    return FileType.CharsetHint.ForcedCharset(StandardCharsets.UTF_8)
  }
}

Return forced UTF-8 charset for .editorconfig
Return forced UTF-8 charset for .editorconfig

GitOrigin-RevId: f2caf5661f4f93dfa789aeba9e7a440e3e302650
allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community