Skip to content

Commit

Permalink
Merge branch 'release/1.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
0xlau committed Oct 24, 2022
2 parents 57829f5 + 90b3fe2 commit f021784
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 18 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## [Unreleased]

## [1.1.1] - 2022-10-24
- 新增 #I5VMP4 在xml中新增对groovy以及javascript语法的支持
- https://gitee.com/liupeiqiang/LiteFlowX/issues/I5VMP4
- 修复 #I5WQME 无法识别多行注释问题
- https://gitee.com/liupeiqiang/LiteFlowX/issues/I5WQME

## [1.1.0] - 2022-10-09
- 新增 #I5TUH1 LiteFlow 2.9.0 的 data 属性特性的适配
- https://gitee.com/liupeiqiang/LiteFlowX/issues/I5TUH1
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
pluginGroup = top.xystudio.plugin.idea
pluginName = LiteFlowX
# SemVer format -> https://semver.org
pluginVersion = 1.1.0
pluginVersion = 1.1.1

# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
pluginSinceBuild = 201.*
pluginSinceBuild = 202.*
pluginUntilBuild = 222.*

# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
platformType = IC
platformVersion = 2020.3
platformType = IU
platformVersion = 2021.2.1

# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
platformPlugins = com.intellij.java, com.intellij.properties, org.jetbrains.plugins.yaml, org.intellij.intelliLang
platformPlugins = com.intellij.java, com.intellij.properties, org.jetbrains.plugins.yaml, org.intellij.intelliLang, JavaScript

# Java language level used to compile sources and to generate the files for - Java 11 is required since 2020.3
javaVersion = 11
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,10 @@ liteFlowNodeStringSubExpress ::= (node | UNODE) PAREN_LEFT liteFlowNodeStringRef
liteFlowNodeRefSubExpress ::= liteFlowNodeRef {DOT (liteFlowTagExpress | liteFlowDataExpress)}*

// LiteFlow Node引用表达式
liteFlowNodeRefExpress ::= [block_comment | line_comment] (liteFlowNodeRefSubExpress | liteFlowNodeStringSubExpress) [block_comment | line_comment]
liteFlowNodeRefExpress ::= {block_comment | line_comment}* (liteFlowNodeRefSubExpress | liteFlowNodeStringSubExpress) {block_comment | line_comment}*

// LiteFlow Condition 表达式
liteFlowConditionExpress ::= [block_comment | line_comment] (liteFlowThenExpress | liteFlowWhenExpress | liteFlowSwitchExpress | liteFlowPreExpress | liteFlowFinallyExpress | liteFlowIf2Express | liteFlowIf3Express | liteFlowForExpress | liteFlowWhileExpress) [block_comment | line_comment]
liteFlowConditionExpress ::= {block_comment | line_comment}* (liteFlowThenExpress | liteFlowWhenExpress | liteFlowSwitchExpress | liteFlowPreExpress | liteFlowFinallyExpress | liteFlowIf2Express | liteFlowIf3Express | liteFlowForExpress | liteFlowWhileExpress) {block_comment | line_comment}*

// LiteFlow IF(_1, _2).ELIF(_3, _4).ELSE() 表达式
liteFlowIf2Express ::= LIF PAREN_LEFT liteFlowNodeRefExpress COMMA liteFlowAllExpress PAREN_RIGHT [liteFlowIf2SubExpress] {pin=7}
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/META-INF/LiteFlowX-optionalJavaScript.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<idea-plugin>
<extensions defaultExtensionNs="org.intellij.intelliLang">
<!-- LiteFlow Js语法注入Xml -->
<injectionConfig config="language/jsInjections.xml"/>
</extensions>
</idea-plugin>
15 changes: 15 additions & 0 deletions src/main/resources/dtd/liteflow-xml.dtd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>

<!ELEMENT flow ((nodes) , (chain)+)>
<!ELEMENT nodes (node)+>
<!ELEMENT node (#PCDATA | EMPTY)*>
<!ELEMENT chain (#PCDATA)>

<!ATTLIST node
id CDATA #REQUIRED
type (script|if_script|switch_script|while_script|for_script|break_script) #IMPLIED
class CDATA #IMPLIED
language (groovy|js) #IMPLIED
>
<!ATTLIST chain
name CDATA #REQUIRED>
11 changes: 11 additions & 0 deletions src/main/resources/language/jsInjections.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="LanguageInjectionConfiguration">
<injection language="JavaScript" injector-id="xml">
<display-name>NodeScript (XmlTag)</display-name>
<place><![CDATA[
xmlTag().withLocalName(string().equalTo("node")).withAttributeValue("language", "js")
.withParent(xmlTag().withLocalName(string().equalTo("nodes")).withParent(xmlTag().withLocalName(string().equalTo("flow"))))
.inVirtualFile(virtualFile().withName(string().contains(".xml")))
]]></place>
</injection>
</component>
13 changes: 12 additions & 1 deletion src/main/resources/language/xmlInjections.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,18 @@
<injection language="LiteFlow" injector-id="xml">
<display-name>Chain (XmlTag)</display-name>
<place><![CDATA[
xmlTag().withLocalName(string().equalTo("chain")).inVirtualFile(virtualFile().withName(string().contains(".xml")))
xmlTag().withLocalName(string().equalTo("chain"))
.withParent(xmlTag().withLocalName(string().equalTo("flow")))
.inVirtualFile(virtualFile().withName(string().contains(".xml")))
]]></place>
</injection>

<injection language="Groovy" injector-id="xml">
<display-name>NodeScript (XmlTag)</display-name>
<place><![CDATA[
xmlTag().withLocalName(string().equalTo("node")).withAttributeValue("language", "groovy")
.withParent(xmlTag().withLocalName(string().equalTo("nodes")).withParent(xmlTag().withLocalName(string().equalTo("flow"))))
.inVirtualFile(virtualFile().withName(string().contains(".xml")))
]]></place>
</injection>
</component>

0 comments on commit f021784

Please sign in to comment.