How I can get the Stylus files icon for the files templates shared via plugin?
Answered
I need the "styl" files icon instead of "?" one for my plugin with files templates:
Although I have found the appropriate icon in the icons list, I don't know how to set it.
I suppose, there is no such icon in com.intellij.icons.AllIcons.
class YDF_GUI_ComponentsTemplatesGroupFactory : FileTemplateGroupDescriptorFactory {
override fun getFileTemplatesDescriptor(): FileTemplateGroupDescriptor {
val groupDescriptor = FileTemplateGroupDescriptor("YDF GUI Components", AllIcons.Nodes.Folder)
/* [ Theory ] No ".ft" must be here. */
groupDescriptor.addTemplate(FileTemplateDescriptor("Badge.styl"))
return groupDescriptor
}
}
Please sign in to leave a comment.
This icon is present in
icons.StylusIcons
and you must add a dependency on Stylus plugin (ID:org.jetbrains.plugins.stylus
) to use it (https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html).Yann Cebron
Thank you for answer.
Following the instructions, I have added
plugins.set(listOf("org.jetbrains.plugins.stylus:233.8264.3"))
line to intellij block of build.gradle.kts. and `<depends>org.jetbrains.plugins.stylus</depends>` to plugin.xml. If to try to build the project, it will beerror and same for five last versions of Stylus plugin.
Into what `IC-231.8109.175` referring?
If you need to check my source, I have pushed the newest code to my repository.
You must use the version of Stylus plugin that is compatible with your plugin's compatibility (since/until-build).
https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html