Skip to content

Commit

Permalink
Change the icon for the inline assembly file type
Browse files Browse the repository at this point in the history
  • Loading branch information
nickfromXXII committed Mar 5, 2024
1 parent 2efd9ce commit c8aa265
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ object TinyGoPluginIcons {

@JvmField
val TinyGoLibraryIcon = TinyGoIcon

@JvmField
val TinyGoAsmIcon = IconLoader.getIcon("/icons/fileTypes/asm.svg", javaClass)
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.jetbrains.tinygoplugin.lang.avrAsm

import com.intellij.openapi.fileTypes.LanguageFileType
import icons.GOPlan9Icons
import org.jetbrains.tinygoplugin.icon.TinyGoPluginIcons
import javax.swing.Icon

object AvrAsmFileType : LanguageFileType(AvrAsmLanguage.INSTANCE) {
Expand All @@ -11,5 +11,5 @@ object AvrAsmFileType : LanguageFileType(AvrAsmLanguage.INSTANCE) {

override fun getDefaultExtension(): String = "s"

override fun getIcon(): Icon = GOPlan9Icons.CPU
override fun getIcon(): Icon = TinyGoPluginIcons.TinyGoAsmIcon
}
2 changes: 2 additions & 0 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@
<lang.syntaxHighlighterFactory
language="AVRASM"
implementationClass="org.jetbrains.tinygoplugin.lang.avrAsm.AvrAsmSyntaxHighlighterFactory"/>

<iconMapper mappingFile="TinyGoIconMappings.json"/>
</extensions>
<extensions defaultExtensionNs="com.goide">
<importResolver implementation="org.jetbrains.tinygoplugin.services.TinyGoImportResolver" order="before vgo"/>
Expand Down
9 changes: 9 additions & 0 deletions src/main/resources/TinyGoIconMappings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"icons": {
"expui": {
"fileTypes": {
"asm.svg": "icons/fileTypes/asm.svg"
}
}
}
}
12 changes: 12 additions & 0 deletions src/main/resources/icons/expui/fileTypes/asm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/main/resources/icons/expui/fileTypes/asm_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/main/resources/icons/fileTypes/asm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c8aa265

Please sign in to comment.