Language and File Type

This commit is contained in:
2024-03-26 01:57:57 +07:00
commit e5a0ad11cf
18 changed files with 615 additions and 0 deletions
@@ -0,0 +1,41 @@
package ru.crabs.sjson
import com.intellij.lang.Language
import com.intellij.openapi.fileTypes.LanguageFileType
import com.intellij.openapi.util.IconLoader
import javax.swing.Icon
class SJsonIcons {
companion object {
val FILE: Icon = IconLoader.getIcon("/icons/sjson-icon.svg", SJsonIcons::class.java)
}
}
class SJsonLanguage() : Language("SJson") {
companion object {
val INSTANCE: SJsonLanguage = SJsonLanguage()
}
}
class SJsonFileType : LanguageFileType(SJsonLanguage.INSTANCE) {
override fun getName(): String {
return "SJson"
}
override fun getDescription(): String {
return "Super json"
}
override fun getDefaultExtension(): String {
return "sjson"
}
override fun getIcon(): Icon {
return SJsonIcons.FILE
}
companion object {
val INSTANCE: SJsonFileType = SJsonFileType()
}
}
+33
View File
@@ -0,0 +1,33 @@
<!-- Plugin Configuration File. Read more: https://plugins.jetbrains.com/docs/intellij/plugin-configuration-file.html -->
<idea-plugin>
<!-- Unique identifier of the plugin. It should be FQN. It cannot be changed between the plugin versions. -->
<id>ru.crabs.sjson</id>
<!-- Public plugin name should be written in Title Case.
Guidelines: https://plugins.jetbrains.com/docs/marketplace/plugin-overview-page.html#plugin-name -->
<name>Sjson</name>
<!-- A displayed Vendor name or Organization ID displayed on the Plugins Page. -->
<vendor email="vladimir.fodorow@gmail.com" url="https://3crabs.ru">3crabs</vendor>
<!-- Description of the plugin displayed on the Plugin Page and IDE Plugin Manager.
Simple HTML elements (text formatting, paragraphs, and lists) can be added inside of <![CDATA[ ]]> tag.
Guidelines: https://plugins.jetbrains.com/docs/marketplace/plugin-overview-page.html#plugin-description -->
<description>SJson language support. SJson - super json.</description>
<!-- Product and plugin compatibility requirements.
Read more: https://plugins.jetbrains.com/docs/intellij/plugin-compatibility.html -->
<depends>com.intellij.modules.platform</depends>
<depends>org.jetbrains.kotlin</depends>
<!-- Extension points defined by the plugin.
Read more: https://plugins.jetbrains.com/docs/intellij/plugin-extension-points.html -->
<extensions defaultExtensionNs="com.intellij">
<fileType
name="SJson"
implementationClass="ru.crabs.sjson.SJsonFileType"
fieldName="INSTANCE"
language="SJson"
extensions="sjson"/>
</extensions>
</idea-plugin>
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Creator: CorelDRAW 2021 (64-Bit) -->
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="2129px" height="1667px" version="1.1"
style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"
viewBox="0 0 2217.6 1736.02"
>
<defs>
<style type="text/css">
<![CDATA[
.str1 {stroke:#FFED00;stroke-width:217;stroke-miterlimit:22.9256}
.str0 {stroke:#B0CB1F;stroke-width:217;stroke-miterlimit:22.9256}
.fil0 {fill:none}
]]>
</style>
</defs>
<g id="Слой_x0020_1">
<metadata id="CorelCorpID_0Corel-Layer"/>
<path class="fil0 str0"
d="M1325.8 1627.52l217 0c119.85,0 217.01,-97.15 217.01,-217l0 -264.57c0,-99.59 67.77,-186.38 164.36,-210.53l164.38 -41.1c27.39,-6.84 27.39,-45.77 0,-52.62l-164.38 -41.1c-96.59,-24.15 -164.36,-110.94 -164.36,-210.52l0 -481.58 -434.01 0"/>
<path class="fil0 str1"
d="M891.8 108.5l-217.01 0c-119.84,0 -217,97.16 -217,217l0 264.58c0,99.58 -67.77,186.37 -164.37,210.52l-164.37 41.1c-27.4,6.85 -27.4,45.78 0,52.62l164.37 41.1c96.6,24.15 164.37,110.94 164.37,210.53l0 481.57 434.01 0"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

+24
View File
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Creator: CorelDRAW 2021 (64-Bit) -->
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="16px" height="12px" version="1.1"
style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"
viewBox="0 0 2217.6 1736.02"
>
<defs>
<style type="text/css">
<![CDATA[
.str1 {stroke:#FFED00;stroke-width:217;stroke-miterlimit:22.9256}
.str0 {stroke:#B0CB1F;stroke-width:217;stroke-miterlimit:22.9256}
.fil0 {fill:none}
]]>
</style>
</defs>
<g id="Слой_x0020_1">
<metadata id="CorelCorpID_0Corel-Layer"/>
<path class="fil0 str0"
d="M1325.8 1627.52l217 0c119.85,0 217.01,-97.15 217.01,-217l0 -264.57c0,-99.59 67.77,-186.38 164.36,-210.53l164.38 -41.1c27.39,-6.84 27.39,-45.77 0,-52.62l-164.38 -41.1c-96.59,-24.15 -164.36,-110.94 -164.36,-210.52l0 -481.58 -434.01 0"/>
<path class="fil0 str1"
d="M891.8 108.5l-217.01 0c-119.84,0 -217,97.16 -217,217l0 264.58c0,99.58 -67.77,186.37 -164.37,210.52l-164.37 41.1c-27.4,6.85 -27.4,45.78 0,52.62l164.37 41.1c96.6,24.15 164.37,110.94 164.37,210.53l0 481.57 434.01 0"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB