Skip to content

Commit

Permalink
Fix incorrect files icons
Browse files Browse the repository at this point in the history
  • Loading branch information
giraud committed Jul 5, 2024
1 parent c1284c3 commit e7e54d5
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 38 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/reason/ide/ORIcons.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ public class ORIcons {
public static final Icon RES_FILE = getIcon("/icons/resFile.svg", ORIcons.class);
public static final Icon RES_INTERFACE_FILE = getIcon("/icons/resiFile.svg", ORIcons.class);
public static final Icon OCL_FILE = getIcon("/icons/mlFile.svg", ORIcons.class);
public static final Icon OCL_INTERFACE_FILE = getIcon("/icons/mliFile.png", ORIcons.class);
public static final Icon OCL_INTERFACE_FILE = getIcon("/icons/mliFile.svg", ORIcons.class);
public static final Icon DUNE_FILE = getIcon("/icons/duneFile.svg", ORIcons.class);

public static final Icon OCL_FILE_MODULE = getIcon("/icons/top-module-ocaml.svg", ORIcons.class);
public static final Icon RML_FILE_MODULE = getIcon("/icons/top-module-reasonml.svg", ORIcons.class);
public static final Icon RES_FILE_MODULE = getIcon("/icons/top-module-rescript.svg", ORIcons.class);
public static final Icon OCL_FILE_MODULE_INTERFACE = getIcon("/icons/top-module-interface-ocaml.png", ORIcons.class);
public static final Icon OCL_FILE_MODULE_INTERFACE = getIcon("/icons/top-module-interface-ocaml.svg", ORIcons.class);
public static final Icon RML_FILE_MODULE_INTERFACE = getIcon("/icons/top-module-interface-reasonml.svg", ORIcons.class);
public static final Icon RES_FILE_MODULE_INTERFACE = getIcon("/icons/top-module-interface-rescript.svg", ORIcons.class);

Expand All @@ -57,7 +57,7 @@ public class ORIcons {

public static final Icon OCL_MODULE = getIcon("/icons/ocamlModule.svg", ORIcons.class);
public static final Icon OCL_SDK = getIcon("/icons/ocamlSdk.svg", ORIcons.class);
public static final Icon OCL_GREEN_FILE = getIcon("/icons/ocamlGreen.png", ORIcons.class);
public static final Icon OCL_GREEN_FILE = getIcon("/icons/ocamlGreen.svg", ORIcons.class);

public static final Icon TYPE = getIcon("/icons/type.svg", ORIcons.class);
public static final Icon VARIANT = getIcon("/icons/variant.svg", ORIcons.class);
Expand Down
67 changes: 32 additions & 35 deletions src/main/java/com/reason/ide/files/OclFileType.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,41 @@
import com.intellij.openapi.fileTypes.LanguageFileType;
import com.reason.lang.ocaml.OclLanguage;
import com.reason.ide.ORIcons;

import javax.swing.*;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public class OclFileType extends LanguageFileType {
public static final OclFileType INSTANCE = new OclFileType();

private OclFileType() {
super(OclLanguage.INSTANCE);
}

@NotNull
@Override
public String getName() {
return "OCAML";
}

@NotNull
@Override
public String getDescription() {
return "OCaml language file";
}

@NotNull
@Override
public String getDefaultExtension() {
return "ml";
}

@Nullable
@Override
public Icon getIcon() {
return ORIcons.OCL_FILE;
}

@NotNull
@Override
public String toString() {
return getName();
}
public static final OclFileType INSTANCE = new OclFileType();

private OclFileType() {
super(OclLanguage.INSTANCE);
}

@Override
public @NotNull String getName() {
return "OCAML";
}

@Override
public @NotNull String getDescription() {
return "OCaml language file";
}

@Override
public @NotNull String getDefaultExtension() {
return "ml";
}

@Override
public @Nullable Icon getIcon() {
return ORIcons.OCL_FILE;
}

@Override
public @NotNull String toString() {
return getName();
}
}

0 comments on commit e7e54d5

Please sign in to comment.