diff --git a/cli/ballerina-cli/src/test/java/io/ballerina/cli/cmd/PackCommandTest.java b/cli/ballerina-cli/src/test/java/io/ballerina/cli/cmd/PackCommandTest.java index dad3c96d18c9..7c9253ba7651 100644 --- a/cli/ballerina-cli/src/test/java/io/ballerina/cli/cmd/PackCommandTest.java +++ b/cli/ballerina-cli/src/test/java/io/ballerina/cli/cmd/PackCommandTest.java @@ -2,8 +2,8 @@ import com.google.gson.Gson; import io.ballerina.cli.launcher.BLauncherException; -import io.ballerina.projects.internal.bala.PackageJson; import io.ballerina.projects.JvmTarget; +import io.ballerina.projects.internal.bala.PackageJson; import io.ballerina.projects.util.BuildToolUtils; import io.ballerina.projects.util.ProjectUtils; import org.ballerinalang.test.BCompileUtil; diff --git a/language-server/modules/langserver-core/src/test/resources/toml/ballerina_toml/completion/config/table_array_context/config1.json b/language-server/modules/langserver-core/src/test/resources/toml/ballerina_toml/completion/config/table_array_context/config1.json index 3e87dec5cb95..eae391c2d3ae 100644 --- a/language-server/modules/langserver-core/src/test/resources/toml/ballerina_toml/completion/config/table_array_context/config1.json +++ b/language-server/modules/langserver-core/src/test/resources/toml/ballerina_toml/completion/config/table_array_context/config1.json @@ -1,125 +1 @@ -{ - "position": { - "line": 7, - "character": 0 - }, - "source": "source/project1/Ballerina.toml", - "items": [ - { - "label": "package", - "kind": "Snippet", - "detail": "Table", - "sortText": "C", - "insertText": "[package]" - }, - { - "label": "platform.java21", - "kind": "Snippet", - "detail": "Table", - "sortText": "C", - "insertText": "[platform.java21]" - }, - { - "label": "platform.java21.dependency", - "kind": "Snippet", - "detail": "Table Array", - "sortText": "C", - "insertText": "[[platform.java21.dependency]]" - }, - { - "label": "platform.java21.repository", - "kind": "Snippet", - "detail": "Table Array", - "sortText": "C", - "insertText": "[[platform.java21.repository]]" - }, - { - "label": "groupId", - "kind": "Snippet", - "detail": "String", - "sortText": "A", - "insertText": "groupId=\"${1:}\"", - "insertTextFormat": "Snippet" - }, - { - "label": "scope", - "kind": "Snippet", - "detail": "String", - "sortText": "A", - "insertText": "scope=\"${1:}\"", - "insertTextFormat": "Snippet" - }, - { - "label": "artifactId", - "kind": "Snippet", - "detail": "String", - "sortText": "A", - "insertText": "artifactId=\"${1:}\"", - "insertTextFormat": "Snippet" - }, - { - "label": "version", - "kind": "Snippet", - "detail": "String", - "sortText": "A", - "insertText": "version=\"${1:}\"", - "insertTextFormat": "Snippet" - }, - { - "label": "dependency", - "kind": "Snippet", - "detail": "Table Array", - "sortText": "C", - "insertText": "[[dependency]]" - }, - { - "label": "format", - "kind": "Snippet", - "detail": "Table", - "sortText": "C", - "insertText": "[format]" - }, - { - "label": "platform.java11.dependency", - "kind": "Snippet", - "detail": "Table Array", - "sortText": "C", - "insertText": "[[platform.java11.dependency]]" - }, - { - "label": "platform.java17.repository", - "kind": "Snippet", - "detail": "Table Array", - "sortText": "C", - "insertText": "[[platform.java17.repository]]" - }, - { - "label": "platform.java11", - "kind": "Snippet", - "detail": "Table", - "sortText": "C", - "insertText": "[platform.java11]" - }, - { - "label": "platform.java17", - "kind": "Snippet", - "detail": "Table", - "sortText": "C", - "insertText": "[platform.java17]" - }, - { - "label": "platform.java11.repository", - "kind": "Snippet", - "detail": "Table Array", - "sortText": "C", - "insertText": "[[platform.java11.repository]]" - }, - { - "label": "platform.java17.dependency", - "kind": "Snippet", - "detail": "Table Array", - "sortText": "C", - "insertText": "[[platform.java17.dependency]]" - } - ] -} +{"position":{"line":7,"character":0},"source":"source/project1/Ballerina.toml","items":[{"label":"package","kind":"Snippet","detail":"Table","sortText":"C","insertText":"[package]"},{"label":"platform.java21","kind":"Snippet","detail":"Table","sortText":"C","insertText":"[platform.java21]"},{"label":"platform.java21.dependency","kind":"Snippet","detail":"Table Array","sortText":"C","insertText":"[[platform.java21.dependency]]"},{"label":"platform.java21.repository","kind":"Snippet","detail":"Table Array","sortText":"C","insertText":"[[platform.java21.repository]]"},{"label":"groupId","kind":"Snippet","detail":"String","sortText":"A","insertText":"groupId=\"${1:}\"","insertTextFormat":"Snippet"},{"label":"scope","kind":"Snippet","detail":"String","sortText":"A","insertText":"scope=\"${1:}\"","insertTextFormat":"Snippet"},{"label":"artifactId","kind":"Snippet","detail":"String","sortText":"A","insertText":"artifactId=\"${1:}\"","insertTextFormat":"Snippet"},{"label":"version","kind":"Snippet","detail":"String","sortText":"A","insertText":"version=\"${1:}\"","insertTextFormat":"Snippet"},{"label":"dependency","kind":"Snippet","detail":"Table Array","sortText":"C","insertText":"[[dependency]]"},{"label":"format","kind":"Snippet","detail":"Table","sortText":"C","insertText":"[format]"},{"label":"platform.java11.dependency","kind":"Snippet","detail":"Table Array","sortText":"C","insertText":"[[platform.java11.dependency]]"},{"label":"platform.java17.repository","kind":"Snippet","detail":"Table Array","sortText":"C","insertText":"[[platform.java17.repository]]"},{"label":"platform.java11","kind":"Snippet","detail":"Table","sortText":"C","insertText":"[platform.java11]"},{"label":"platform.java17","kind":"Snippet","detail":"Table","sortText":"C","insertText":"[platform.java17]"},{"label":"platform.java11.repository","kind":"Snippet","detail":"Table Array","sortText":"C","insertText":"[[platform.java11.repository]]"},{"label":"platform.java17.dependency","kind":"Snippet","detail":"Table Array","sortText":"C","insertText":"[[platform.java17.dependency]]"},{"label":"package.modules","kind":"Snippet","detail":"Table Array","sortText":"C","insertText":"[[package.modules]]"}]} diff --git a/language-server/modules/langserver-core/src/test/resources/toml/ballerina_toml/completion/config/table_context/config1.json b/language-server/modules/langserver-core/src/test/resources/toml/ballerina_toml/completion/config/table_context/config1.json index b3e1c64f162d..54d0824f4f35 100644 --- a/language-server/modules/langserver-core/src/test/resources/toml/ballerina_toml/completion/config/table_context/config1.json +++ b/language-server/modules/langserver-core/src/test/resources/toml/ballerina_toml/completion/config/table_context/config1.json @@ -1,150 +1 @@ -{ - "position": { - "line": 4, - "character": 0 - }, - "source": "source/project2/Ballerina.toml", - "items": [ - { - "label": "platform.java21", - "kind": "Snippet", - "detail": "Table", - "sortText": "C", - "insertText": "[platform.java21]" - }, - { - "label": "platform.java21.dependency", - "kind": "Snippet", - "detail": "Table Array", - "sortText": "C", - "insertText": "[[platform.java21.dependency]]" - }, - { - "label": "platform.java21.repository", - "kind": "Snippet", - "detail": "Table Array", - "sortText": "C", - "insertText": "[[platform.java21.repository]]" - }, - { - "label": "license", - "kind": "Snippet", - "detail": "Array", - "sortText": "A", - "insertText": "license=[${1:}]", - "insertTextFormat": "Snippet" - }, - { - "label": "keywords", - "kind": "Snippet", - "detail": "Array", - "sortText": "A", - "insertText": "keywords=[${1:}]", - "insertTextFormat": "Snippet" - }, - { - "label": "export", - "kind": "Snippet", - "detail": "Array", - "sortText": "A", - "insertText": "export=[${1:}]", - "insertTextFormat": "Snippet" - }, - { - "label": "include", - "kind": "Snippet", - "detail": "Array", - "sortText": "A", - "insertText": "include=[${1:}]", - "insertTextFormat": "Snippet" - }, - { - "label": "dependency", - "kind": "Snippet", - "detail": "Table Array", - "sortText": "C", - "insertText": "[[dependency]]" - }, - { - "label": "distribution", - "kind": "Snippet", - "detail": "String", - "sortText": "A", - "insertText": "distribution=\"${1:}\"", - "insertTextFormat": "Snippet" - }, - { - "label": "visibility", - "kind": "Snippet", - "detail": "String", - "sortText": "A", - "insertText": "visibility=\"${1:}\"", - "insertTextFormat": "Snippet" - }, - { - "label": "icon", - "kind": "Snippet", - "detail": "String", - "sortText": "A", - "insertText": "icon=\"${1:}\"", - "insertTextFormat": "Snippet" - }, - { - "label": "template", - "kind": "Snippet", - "detail": "Boolean", - "sortText": "A", - "insertText": "template=${1:false}", - "insertTextFormat": "Snippet" - }, - { - "label": "format", - "kind": "Snippet", - "detail": "Table", - "sortText": "C", - "insertText": "[format]" - }, - { - "label": "platform.java11.dependency", - "kind": "Snippet", - "detail": "Table Array", - "sortText": "C", - "insertText": "[[platform.java11.dependency]]" - }, - { - "label": "platform.java17.repository", - "kind": "Snippet", - "detail": "Table Array", - "sortText": "C", - "insertText": "[[platform.java17.repository]]" - }, - { - "label": "platform.java11", - "kind": "Snippet", - "detail": "Table", - "sortText": "C", - "insertText": "[platform.java11]" - }, - { - "label": "platform.java17", - "kind": "Snippet", - "detail": "Table", - "sortText": "C", - "insertText": "[platform.java17]" - }, - { - "label": "platform.java11.repository", - "kind": "Snippet", - "detail": "Table Array", - "sortText": "C", - "insertText": "[[platform.java11.repository]]" - }, - { - "label": "platform.java17.dependency", - "kind": "Snippet", - "detail": "Table Array", - "sortText": "C", - "insertText": "[[platform.java17.dependency]]" - } - ] -} +{"position":{"line":4,"character":0},"source":"source/project2/Ballerina.toml","items":[{"label":"platform.java21","kind":"Snippet","detail":"Table","sortText":"C","insertText":"[platform.java21]"},{"label":"platform.java21.dependency","kind":"Snippet","detail":"Table Array","sortText":"C","insertText":"[[platform.java21.dependency]]"},{"label":"platform.java21.repository","kind":"Snippet","detail":"Table Array","sortText":"C","insertText":"[[platform.java21.repository]]"},{"label":"license","kind":"Snippet","detail":"Array","sortText":"A","insertText":"license=[${1:}]","insertTextFormat":"Snippet"},{"label":"keywords","kind":"Snippet","detail":"Array","sortText":"A","insertText":"keywords=[${1:}]","insertTextFormat":"Snippet"},{"label":"export","kind":"Snippet","detail":"Array","sortText":"A","insertText":"export=[${1:}]","insertTextFormat":"Snippet"},{"label":"include","kind":"Snippet","detail":"Array","sortText":"A","insertText":"include=[${1:}]","insertTextFormat":"Snippet"},{"label":"dependency","kind":"Snippet","detail":"Table Array","sortText":"C","insertText":"[[dependency]]"},{"label":"distribution","kind":"Snippet","detail":"String","sortText":"A","insertText":"distribution=\"${1:}\"","insertTextFormat":"Snippet"},{"label":"visibility","kind":"Snippet","detail":"String","sortText":"A","insertText":"visibility=\"${1:}\"","insertTextFormat":"Snippet"},{"label":"icon","kind":"Snippet","detail":"String","sortText":"A","insertText":"icon=\"${1:}\"","insertTextFormat":"Snippet"},{"label":"template","kind":"Snippet","detail":"Boolean","sortText":"A","insertText":"template=${1:false}","insertTextFormat":"Snippet"},{"label":"format","kind":"Snippet","detail":"Table","sortText":"C","insertText":"[format]"},{"label":"platform.java11.dependency","kind":"Snippet","detail":"Table Array","sortText":"C","insertText":"[[platform.java11.dependency]]"},{"label":"platform.java17.repository","kind":"Snippet","detail":"Table Array","sortText":"C","insertText":"[[platform.java17.repository]]"},{"label":"platform.java11","kind":"Snippet","detail":"Table","sortText":"C","insertText":"[platform.java11]"},{"label":"platform.java17","kind":"Snippet","detail":"Table","sortText":"C","insertText":"[platform.java17]"},{"label":"platform.java11.repository","kind":"Snippet","detail":"Table Array","sortText":"C","insertText":"[[platform.java11.repository]]"},{"label":"platform.java17.dependency","kind":"Snippet","detail":"Table Array","sortText":"C","insertText":"[[platform.java17.dependency]]"},{"label":"readme","kind":"Snippet","detail":"String","sortText":"A","insertText":"readme=\"${1:}\"","insertTextFormat":"Snippet"},{"label":"package.modules","kind":"Snippet","detail":"Table Array","sortText":"B","insertText":"[[package.modules]]","insertTextFormat":"Snippet"}]} diff --git a/language-server/modules/langserver-core/src/test/resources/toml/ballerina_toml/completion/config/table_context/config2.json b/language-server/modules/langserver-core/src/test/resources/toml/ballerina_toml/completion/config/table_context/config2.json index def203d01b7e..2a7c3a94edb0 100644 --- a/language-server/modules/langserver-core/src/test/resources/toml/ballerina_toml/completion/config/table_context/config2.json +++ b/language-server/modules/langserver-core/src/test/resources/toml/ballerina_toml/completion/config/table_context/config2.json @@ -1,150 +1 @@ -{ - "position": { - "line": 8, - "character": 0 - }, - "source": "source/project2/Ballerina.toml", - "items": [ - { - "label": "platform.java17", - "kind": "Snippet", - "detail": "Table", - "sortText": "C", - "insertText": "[platform.java17]" - }, - { - "label": "platform.java17.dependency", - "kind": "Snippet", - "detail": "Table Array", - "sortText": "C", - "insertText": "[[platform.java17.dependency]]" - }, - { - "label": "platform.java17.repository", - "kind": "Snippet", - "detail": "Table Array", - "sortText": "C", - "insertText": "[[platform.java17.repository]]" - }, - { - "label": "platform.java11", - "kind": "Snippet", - "detail": "Table", - "sortText": "C", - "insertText": "[platform.java11]" - }, - { - "label": "platform.java11.dependency", - "kind": "Snippet", - "detail": "Table Array", - "sortText": "C", - "insertText": "[[platform.java11.dependency]]" - }, - { - "label": "platform.java11.repository", - "kind": "Snippet", - "detail": "Table Array", - "sortText": "C", - "insertText": "[[platform.java11.repository]]" - }, - { - "label": "license", - "kind": "Snippet", - "detail": "Array", - "sortText": "A", - "insertText": "license=[${1:}]", - "insertTextFormat": "Snippet" - }, - { - "label": "keywords", - "kind": "Snippet", - "detail": "Array", - "sortText": "A", - "insertText": "keywords=[${1:}]", - "insertTextFormat": "Snippet" - }, - { - "label": "export", - "kind": "Snippet", - "detail": "Array", - "sortText": "A", - "insertText": "export=[${1:}]", - "insertTextFormat": "Snippet" - }, - { - "label": "include", - "kind": "Snippet", - "detail": "Array", - "sortText": "A", - "insertText": "include=[${1:}]", - "insertTextFormat": "Snippet" - }, - { - "label": "dependency", - "kind": "Snippet", - "detail": "Table Array", - "sortText": "C", - "insertText": "[[dependency]]" - }, - { - "label": "distribution", - "kind": "Snippet", - "detail": "String", - "sortText": "A", - "insertText": "distribution=\"${1:}\"", - "insertTextFormat": "Snippet" - }, - { - "label": "visibility", - "kind": "Snippet", - "detail": "String", - "sortText": "A", - "insertText": "visibility=\"${1:}\"", - "insertTextFormat": "Snippet" - }, - { - "label": "icon", - "kind": "Snippet", - "detail": "String", - "sortText": "A", - "insertText": "icon=\"${1:}\"", - "insertTextFormat": "Snippet" - }, - { - "label": "template", - "kind": "Snippet", - "detail": "Boolean", - "sortText": "A", - "insertText": "template=${1:false}", - "insertTextFormat": "Snippet" - }, - { - "label": "format", - "kind": "Snippet", - "detail": "Table", - "sortText": "C", - "insertText": "[format]" - }, - { - "label": "platform.java21.dependency", - "kind": "Snippet", - "detail": "Table Array", - "sortText": "C", - "insertText": "[[platform.java21.dependency]]" - }, - { - "label": "platform.java21.repository", - "kind": "Snippet", - "detail": "Table Array", - "sortText": "C", - "insertText": "[[platform.java21.repository]]" - }, - { - "label": "platform.java21", - "kind": "Snippet", - "detail": "Table", - "sortText": "C", - "insertText": "[platform.java21]" - } - ] -} +{"position":{"line":8,"character":0},"source":"source/project2/Ballerina.toml","items":[{"label":"platform.java17","kind":"Snippet","detail":"Table","sortText":"C","insertText":"[platform.java17]"},{"label":"platform.java17.dependency","kind":"Snippet","detail":"Table Array","sortText":"C","insertText":"[[platform.java17.dependency]]"},{"label":"platform.java17.repository","kind":"Snippet","detail":"Table Array","sortText":"C","insertText":"[[platform.java17.repository]]"},{"label":"platform.java11","kind":"Snippet","detail":"Table","sortText":"C","insertText":"[platform.java11]"},{"label":"platform.java11.dependency","kind":"Snippet","detail":"Table Array","sortText":"C","insertText":"[[platform.java11.dependency]]"},{"label":"platform.java11.repository","kind":"Snippet","detail":"Table Array","sortText":"C","insertText":"[[platform.java11.repository]]"},{"label":"license","kind":"Snippet","detail":"Array","sortText":"A","insertText":"license=[${1:}]","insertTextFormat":"Snippet"},{"label":"keywords","kind":"Snippet","detail":"Array","sortText":"A","insertText":"keywords=[${1:}]","insertTextFormat":"Snippet"},{"label":"export","kind":"Snippet","detail":"Array","sortText":"A","insertText":"export=[${1:}]","insertTextFormat":"Snippet"},{"label":"include","kind":"Snippet","detail":"Array","sortText":"A","insertText":"include=[${1:}]","insertTextFormat":"Snippet"},{"label":"dependency","kind":"Snippet","detail":"Table Array","sortText":"C","insertText":"[[dependency]]"},{"label":"distribution","kind":"Snippet","detail":"String","sortText":"A","insertText":"distribution=\"${1:}\"","insertTextFormat":"Snippet"},{"label":"visibility","kind":"Snippet","detail":"String","sortText":"A","insertText":"visibility=\"${1:}\"","insertTextFormat":"Snippet"},{"label":"icon","kind":"Snippet","detail":"String","sortText":"A","insertText":"icon=\"${1:}\"","insertTextFormat":"Snippet"},{"label":"template","kind":"Snippet","detail":"Boolean","sortText":"A","insertText":"template=${1:false}","insertTextFormat":"Snippet"},{"label":"format","kind":"Snippet","detail":"Table","sortText":"C","insertText":"[format]"},{"label":"platform.java21.dependency","kind":"Snippet","detail":"Table Array","sortText":"C","insertText":"[[platform.java21.dependency]]"},{"label":"platform.java21.repository","kind":"Snippet","detail":"Table Array","sortText":"C","insertText":"[[platform.java21.repository]]"},{"label":"platform.java21","kind":"Snippet","detail":"Table","sortText":"C","insertText":"[platform.java21]"},{"label":"readme","kind":"Snippet","detail":"String","sortText":"A","insertText":"readme=\"${1:}\"","insertTextFormat":"Snippet"},{"label":"package.modules","kind":"Snippet","detail":"Table Array","sortText":"B","insertText":"[[package.modules]]","insertTextFormat":"Snippet"}]}