GitOrigin-RevId: 1cfc9ab39da12a2978ff3501241442e0233483da
This commit is contained in:
Vladimir Krivosheev
2020-06-09 00:07:51 +03:00
committed by intellij-monorepo-bot
parent 21278433b3
commit d9503820c9
@@ -1,30 +1,16 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2020 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 com.intellij.ide.highlighter;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.fileTypes.InternalFileType;
import com.intellij.openapi.vfs.CharsetToolkit;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.projectModel.ProjectModelBundle;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.nio.charset.StandardCharsets;
public class ProjectFileType implements InternalFileType {
public final class ProjectFileType implements InternalFileType {
public static final ProjectFileType INSTANCE = new ProjectFileType();
public static final String DEFAULT_EXTENSION = "ipr";
@@ -66,7 +52,7 @@ public class ProjectFileType implements InternalFileType {
}
@Override
public String getCharset(@NotNull VirtualFile file, final byte @NotNull [] content) {
return CharsetToolkit.UTF8;
public String getCharset(@NotNull VirtualFile file, byte @NotNull [] content) {
return StandardCharsets.UTF_8.name();
}
}