mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
copyright: show language display name instead of file type name when possible (IDEA-137178)
(cherry picked from commit 0b5331fc754882308ed84c61551aa3d98c232917)
This commit is contained in:
@@ -19,6 +19,7 @@ package com.maddyhome.idea.copyright.ui;
|
||||
import com.intellij.openapi.editor.colors.EditorColorsManager;
|
||||
import com.intellij.openapi.editor.colors.EditorFontType;
|
||||
import com.intellij.openapi.fileTypes.FileType;
|
||||
import com.intellij.openapi.fileTypes.LanguageFileType;
|
||||
import com.intellij.openapi.fileTypes.StdFileTypes;
|
||||
import com.intellij.openapi.options.ConfigurationException;
|
||||
import com.intellij.openapi.options.SearchableConfigurable;
|
||||
@@ -356,8 +357,10 @@ public class TemplateCommentPanel implements SearchableConfigurable {
|
||||
}
|
||||
|
||||
@Nls
|
||||
public String getDisplayName() { //todo mapped names
|
||||
return fileType.getName();
|
||||
public String getDisplayName() {
|
||||
return fileType instanceof LanguageFileType
|
||||
? ((LanguageFileType)fileType).getLanguage().getDisplayName()
|
||||
: fileType.getName();
|
||||
}
|
||||
|
||||
public String getHelpTopic() {
|
||||
|
||||
Reference in New Issue
Block a user