diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 7922b4d..5c6e581 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -81,6 +81,10 @@ jobs: echo "::set-output name=name::$NAME" echo "::set-output name=artifact::$ARTIFACT" + # Build artifact using build Gradle task + - name: Build + run: ./gradlew build + # Build artifact using buildPlugin Gradle task - name: Build Plugin run: ./gradlew buildPlugin diff --git a/src/IC-222/kotlin/com/amazon/ion/plugin/intellij/formatting/blocks/IonSExpressionBlock.kt b/src/IC-222/kotlin/com/amazon/ion/plugin/intellij/formatting/blocks/IonSExpressionBlock.kt index c7e1c91..7aeff8d 100644 --- a/src/IC-222/kotlin/com/amazon/ion/plugin/intellij/formatting/blocks/IonSExpressionBlock.kt +++ b/src/IC-222/kotlin/com/amazon/ion/plugin/intellij/formatting/blocks/IonSExpressionBlock.kt @@ -20,7 +20,7 @@ class IonSExpressionBlock( ) : AbstractIonBlock(node, formatting = formatting, options = options) { override val childIndentedTypes: Set = setOf( - IonTypes.VALUE, + IonTypes.SEXPRESSION_ATOM, IonTypes.COMMENT ) diff --git a/src/IC-231/kotlin/com/amazon/ion/plugin/intellij/formatting/blocks/IonSExpressionBlock.kt b/src/IC-231/kotlin/com/amazon/ion/plugin/intellij/formatting/blocks/IonSExpressionBlock.kt index 12d64d3..ac0223e 100644 --- a/src/IC-231/kotlin/com/amazon/ion/plugin/intellij/formatting/blocks/IonSExpressionBlock.kt +++ b/src/IC-231/kotlin/com/amazon/ion/plugin/intellij/formatting/blocks/IonSExpressionBlock.kt @@ -20,7 +20,7 @@ class IonSExpressionBlock( ) : AbstractIonBlock(node, formatting = formatting, options = options) { override val childIndentedTypes: Set = setOf( - IonTypes.VALUE, + IonTypes.SEXPRESSION_ATOM, IonTypes.COMMENT ) diff --git a/src/IC-232/kotlin/com/amazon/ion/plugin/intellij/formatting/blocks/IonSExpressionBlock.kt b/src/IC-232/kotlin/com/amazon/ion/plugin/intellij/formatting/blocks/IonSExpressionBlock.kt index 12d64d3..ac0223e 100644 --- a/src/IC-232/kotlin/com/amazon/ion/plugin/intellij/formatting/blocks/IonSExpressionBlock.kt +++ b/src/IC-232/kotlin/com/amazon/ion/plugin/intellij/formatting/blocks/IonSExpressionBlock.kt @@ -20,7 +20,7 @@ class IonSExpressionBlock( ) : AbstractIonBlock(node, formatting = formatting, options = options) { override val childIndentedTypes: Set = setOf( - IonTypes.VALUE, + IonTypes.SEXPRESSION_ATOM, IonTypes.COMMENT ) diff --git a/src/IC-233/kotlin/com/amazon/ion/plugin/intellij/formatting/blocks/IonSExpressionBlock.kt b/src/IC-233/kotlin/com/amazon/ion/plugin/intellij/formatting/blocks/IonSExpressionBlock.kt index 12d64d3..ac0223e 100644 --- a/src/IC-233/kotlin/com/amazon/ion/plugin/intellij/formatting/blocks/IonSExpressionBlock.kt +++ b/src/IC-233/kotlin/com/amazon/ion/plugin/intellij/formatting/blocks/IonSExpressionBlock.kt @@ -20,7 +20,7 @@ class IonSExpressionBlock( ) : AbstractIonBlock(node, formatting = formatting, options = options) { override val childIndentedTypes: Set = setOf( - IonTypes.VALUE, + IonTypes.SEXPRESSION_ATOM, IonTypes.COMMENT ) diff --git a/src/IC-241/kotlin/com/amazon/ion/plugin/intellij/formatting/blocks/IonSExpressionBlock.kt b/src/IC-241/kotlin/com/amazon/ion/plugin/intellij/formatting/blocks/IonSExpressionBlock.kt index 12d64d3..ac0223e 100644 --- a/src/IC-241/kotlin/com/amazon/ion/plugin/intellij/formatting/blocks/IonSExpressionBlock.kt +++ b/src/IC-241/kotlin/com/amazon/ion/plugin/intellij/formatting/blocks/IonSExpressionBlock.kt @@ -20,7 +20,7 @@ class IonSExpressionBlock( ) : AbstractIonBlock(node, formatting = formatting, options = options) { override val childIndentedTypes: Set = setOf( - IonTypes.VALUE, + IonTypes.SEXPRESSION_ATOM, IonTypes.COMMENT ) diff --git a/src/main/kotlin/com/amazon/ion/plugin/intellij/formatting/IonCodeBlockSpacingProvider.kt b/src/main/kotlin/com/amazon/ion/plugin/intellij/formatting/IonCodeBlockSpacingProvider.kt index 49f9e9f..5b96cc6 100644 --- a/src/main/kotlin/com/amazon/ion/plugin/intellij/formatting/IonCodeBlockSpacingProvider.kt +++ b/src/main/kotlin/com/amazon/ion/plugin/intellij/formatting/IonCodeBlockSpacingProvider.kt @@ -97,7 +97,7 @@ private fun createSpaceBuilder(settings: CodeStyleSettings) = before(IonTypes.SEXPRESSION_OPERATOR).none() before(IonTypes.RPAREN).lineBreakInCode() - beforeInside(IonTypes.VALUE, IonTypes.SEXPRESSION).lineBreakInCode() + beforeInside(IonTypes.SEXPRESSION_ATOM, IonTypes.SEXPRESSION).lineBreakInCode() /** * Separator spacing, by default no space before and one space after separator, like JSON. diff --git a/src/test/kotlin/com/amazon/ion/plugin/intellij/parser/IonBasicParsingTest.kt b/src/test/kotlin/com/amazon/ion/plugin/intellij/parser/IonBasicParsingTest.kt index 89cc0ee..b2c21e4 100644 --- a/src/test/kotlin/com/amazon/ion/plugin/intellij/parser/IonBasicParsingTest.kt +++ b/src/test/kotlin/com/amazon/ion/plugin/intellij/parser/IonBasicParsingTest.kt @@ -67,7 +67,7 @@ class IonBasicParsingTest : IonParserTestCaseBase(dataPath = "basic") { IonListImpl(LIST) PsiElement(LBRACKET)('[') PsiWhiteSpace(' ') - IonElementsImpl(ELEMENTS) + IonListElementsImpl(LIST_ELEMENTS) IonValueImpl(VALUE) IonSymbolImpl(SYMBOL) PsiElement(IDENTIFIER)('key') @@ -87,7 +87,7 @@ class IonBasicParsingTest : IonParserTestCaseBase(dataPath = "basic") { IonListImpl(LIST) PsiElement(LBRACKET)('[') PsiWhiteSpace(' ') - IonElementsImpl(ELEMENTS) + IonListElementsImpl(LIST_ELEMENTS) IonValueImpl(VALUE) IonSymbolImpl(SYMBOL) PsiElement(IDENTIFIER)('key') @@ -107,28 +107,31 @@ class IonBasicParsingTest : IonParserTestCaseBase(dataPath = "basic") { IonContainerImpl(CONTAINER) IonSexpressionImpl(SEXPRESSION) PsiElement(LPAREN)('(') - IonAtomsImpl(ATOMS) - IonValueImpl(VALUE) - IonStringImpl(STRING) - IonQqStringImpl(QQ_STRING) - PsiElement(QQ_START)('"') - PsiElement(QQ_VALUE)('first') - PsiElement(QQ_END)('"') + IonSexpressionElementsImpl(SEXPRESSION_ELEMENTS) + IonSexpressionAtomImpl(SEXPRESSION_ATOM) + IonValueImpl(VALUE) + IonStringImpl(STRING) + IonQqStringImpl(QQ_STRING) + PsiElement(QQ_START)('"') + PsiElement(QQ_VALUE)('first') + PsiElement(QQ_END)('"') PsiWhiteSpace(' ') - IonValueImpl(VALUE) - IonStringImpl(STRING) - IonQqStringImpl(QQ_STRING) - PsiElement(QQ_START)('"') - PsiElement(QQ_VALUE)('second') - PsiElement(QQ_END)('"') + IonSexpressionAtomImpl(SEXPRESSION_ATOM) + IonValueImpl(VALUE) + IonStringImpl(STRING) + IonQqStringImpl(QQ_STRING) + PsiElement(QQ_START)('"') + PsiElement(QQ_VALUE)('second') + PsiElement(QQ_END)('"') PsiWhiteSpace(' ') - IonValueImpl(VALUE) - IonContainerImpl(CONTAINER) - IonStructImpl(STRUCT) - PsiElement(LBRACE)('{') - IonMembersImpl(MEMBERS) - - PsiElement(RBRACE)('}') + IonSexpressionAtomImpl(SEXPRESSION_ATOM) + IonValueImpl(VALUE) + IonContainerImpl(CONTAINER) + IonStructImpl(STRUCT) + PsiElement(LBRACE)('{') + IonMembersImpl(MEMBERS) + + PsiElement(RBRACE)('}') PsiElement(RPAREN)(')') """ ) @@ -143,14 +146,15 @@ class IonBasicParsingTest : IonParserTestCaseBase(dataPath = "basic") { IonContainerImpl(CONTAINER) IonSexpressionImpl(SEXPRESSION) PsiElement(LPAREN)('(') - IonSexpressionOperatorImpl(SEXPRESSION_OPERATOR) - IonSymbolImpl(SYMBOL) - PsiElement(IDENTIFIER)('test') - PsiWhiteSpace(' ') - IonAtomsImpl(ATOMS) - IonValueImpl(VALUE) + IonSexpressionElementsImpl(SEXPRESSION_ELEMENTS) + IonSexpressionOperatorImpl(SEXPRESSION_OPERATOR) IonSymbolImpl(SYMBOL) - PsiElement(IDENTIFIER)('element') + PsiElement(IDENTIFIER)('test') + PsiWhiteSpace(' ') + IonSexpressionAtomImpl(SEXPRESSION_ATOM) + IonValueImpl(VALUE) + IonSymbolImpl(SYMBOL) + PsiElement(IDENTIFIER)('element') PsiElement(RPAREN)(')') """ ) diff --git a/src/test/kotlin/com/amazon/ion/plugin/intellij/parser/IonPartialParsingTest.kt b/src/test/kotlin/com/amazon/ion/plugin/intellij/parser/IonPartialParsingTest.kt index 191cdae..e040606 100644 --- a/src/test/kotlin/com/amazon/ion/plugin/intellij/parser/IonPartialParsingTest.kt +++ b/src/test/kotlin/com/amazon/ion/plugin/intellij/parser/IonPartialParsingTest.kt @@ -13,7 +13,7 @@ class IonPartialParsingTest : IonParserTestCaseBase(dataPath = "partial") { IonListImpl(LIST) PsiElement(LBRACKET)('[') PsiWhiteSpace(' ') - IonElementsImpl(ELEMENTS) + IonListElementsImpl(LIST_ELEMENTS) IonValueImpl(VALUE) IonSymbolImpl(SYMBOL) PsiElement(IDENTIFIER)('element') @@ -75,14 +75,15 @@ class IonPartialParsingTest : IonParserTestCaseBase(dataPath = "partial") { IonSexpressionImpl(SEXPRESSION) PsiElement(LPAREN)('(') PsiWhiteSpace(' ') - IonAtomsImpl(ATOMS) - IonValueImpl(VALUE) - IonBlobImpl(BLOB) - PsiElement(LOB_START)('{{') - PsiWhiteSpace(' ') - PsiElement(BAD_CHARACTER)('abcde_not_valid_base64') - PsiWhiteSpace(' ') - PsiElement(LOB_END)('}}') + IonSexpressionElementsImpl(SEXPRESSION_ELEMENTS) + IonSexpressionAtomImpl(SEXPRESSION_ATOM) + IonValueImpl(VALUE) + IonBlobImpl(BLOB) + PsiElement(LOB_START)('{{') + PsiWhiteSpace(' ') + PsiElement(BAD_CHARACTER)('abcde_not_valid_base64') + PsiWhiteSpace(' ') + PsiElement(LOB_END)('}}') PsiWhiteSpace(' ') PsiElement(RPAREN)(')') """