summaryrefslogtreecommitdiffstats
path: root/sd-plugin/src/main/java/org/intellij/sdk/language/SdFileType.java
blob: 0ca8eb332a392b66f5376149570efb54e8a260c5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package org.intellij.sdk.language;

import com.intellij.openapi.fileTypes.LanguageFileType;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.Icon;

/**
 * This class is used for the extension (in plugin.xml), to define SD as a file's type.
 * @author shahariel
 */
public class SdFileType extends LanguageFileType {
    
    public static final SdFileType INSTANCE = new SdFileType();
    
    private SdFileType() {
        super(SdLanguage.INSTANCE);
    }
    
    @NotNull
    @Override
    public String getName() {
        return "Sd File";
    }
    
    @NotNull
    @Override
    public String getDescription() {
        return "Sd language file";
    }
    
    @NotNull
    @Override
    public String getDefaultExtension() {
        return "sd";
    }
    
    @Nullable
    @Override
    public Icon getIcon() {
        return SdIcons.FILE;
    }
    
}