diff --git a/compiler/frontend/src/org/jetbrains/jet/plugin/JetFileType.java b/compiler/frontend/src/org/jetbrains/jet/plugin/JetFileType.java index 1dcc9763674..4d9461ae798 100644 --- a/compiler/frontend/src/org/jetbrains/jet/plugin/JetFileType.java +++ b/compiler/frontend/src/org/jetbrains/jet/plugin/JetFileType.java @@ -5,13 +5,20 @@ package org.jetbrains.jet.plugin; import com.intellij.openapi.fileTypes.LanguageFileType; import com.intellij.openapi.util.IconLoader; +import com.intellij.openapi.util.NotNullLazyValue; import org.jetbrains.annotations.NotNull; import javax.swing.*; public class JetFileType extends LanguageFileType { public static final JetFileType INSTANCE = new JetFileType(); - private final Icon myIcon = IconLoader.getIcon("/org/jetbrains/jet/plugin/icons/kotlin16x16.png"); + private final NotNullLazyValue myIcon = new NotNullLazyValue() { + @NotNull + @Override + protected Icon compute() { + return IconLoader.getIcon("/org/jetbrains/jet/plugin/icons/kotlin16x16.png"); + } + }; private JetFileType() { super(JetLanguage.INSTANCE); @@ -33,7 +40,7 @@ public class JetFileType extends LanguageFileType { } public Icon getIcon() { - return myIcon; + return myIcon.getValue(); } @Override