From 8aba26fb957a385b21c5d96e9c3eac002c97fb3e Mon Sep 17 00:00:00 2001 From: ushirask Date: Tue, 14 Feb 2023 10:13:36 +0530 Subject: [PATCH 01/67] Remove xml as lax --- .../ballerinalang/compiler/semantics/analyzer/Types.java | 4 ---- .../test/expressions/access/FieldAccessTest.java | 2 ++ .../test-src/expressions/access/field_access_negative.bal | 5 +++++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java index 559bfb9165ba..eb3c27804c63 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java @@ -288,8 +288,6 @@ public int isLaxType(BType type, Set visited) { } switch (type.tag) { case TypeTags.JSON: - case TypeTags.XML: - case TypeTags.XML_ELEMENT: return 1; case TypeTags.MAP: return isLaxType(((BMapType) type).constraint, visited); @@ -322,8 +320,6 @@ public boolean isLaxType(BType type, Map visited) { } switch (type.tag) { case TypeTags.JSON: - case TypeTags.XML: - case TypeTags.XML_ELEMENT: visited.put(type, true); return true; case TypeTags.MAP: diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/expressions/access/FieldAccessTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/expressions/access/FieldAccessTest.java index 573f48760fa7..08bb5c5a6a27 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/expressions/access/FieldAccessTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/expressions/access/FieldAccessTest.java @@ -138,6 +138,8 @@ public void testNegativeCases() { "expression", 375, 15); validateError(negativeResult, i++, "'remote' methods of an object cannot be accessed using the field access " + "expression", 377, 15); + validateError(negativeResult, i++, "invalid operation: type 'map' does not support field access" + , 382, 19); Assert.assertEquals(negativeResult.getErrorCount(), i); } diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access_negative.bal b/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access_negative.bal index e1b3b5d261cd..4d689a9e9aa8 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access_negative.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access_negative.bal @@ -376,3 +376,8 @@ function testInvalidBoundMethodAccessWithRemoteMethod(ServiceClass a, _ = e.ser.fn; } + +function testInvalidXMLMapFieldAccess() { + map m = {a: xml `foo`}; + xml x = check m.a; // error +} \ No newline at end of file From df22d579cdd6607d400a2f00b07506f408d06171 Mon Sep 17 00:00:00 2001 From: ushirask Date: Tue, 14 Feb 2023 11:16:53 +0530 Subject: [PATCH 02/67] Remove map as lax --- .../wso2/ballerinalang/compiler/semantics/analyzer/Types.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java index eb3c27804c63..37bd8b415e03 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java @@ -275,7 +275,7 @@ public BType checkType(Location pos, public boolean isLax(BType type) { Set visited = new HashSet<>(); int result = isLaxType(type, visited); - if (result == 1) { + if (result == 1 || type.tag == TypeTags.XML) { return true; } return false; From 799d5a18862c32c4f2efe0c9f89d267e310ea9ee Mon Sep 17 00:00:00 2001 From: ushirask Date: Tue, 14 Feb 2023 11:39:13 +0530 Subject: [PATCH 03/67] Remove map as lax --- .../wso2/ballerinalang/compiler/semantics/analyzer/Types.java | 2 +- .../test-src/expressions/access/field_access_negative.bal | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java index 37bd8b415e03..be8f232e3e8c 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java @@ -275,7 +275,7 @@ public BType checkType(Location pos, public boolean isLax(BType type) { Set visited = new HashSet<>(); int result = isLaxType(type, visited); - if (result == 1 || type.tag == TypeTags.XML) { + if (result == 1 || type.tag == TypeTags.XML || type.tag == TypeTags.XML_ELEMENT) { return true; } return false; diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access_negative.bal b/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access_negative.bal index 4d689a9e9aa8..73c34da3af2d 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access_negative.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access_negative.bal @@ -380,4 +380,4 @@ function testInvalidBoundMethodAccessWithRemoteMethod(ServiceClass a, function testInvalidXMLMapFieldAccess() { map m = {a: xml `foo`}; xml x = check m.a; // error -} \ No newline at end of file +} From b71b7a3252b39950bf5c3d0124045b118200d0a6 Mon Sep 17 00:00:00 2001 From: ushirask Date: Tue, 14 Feb 2023 13:00:05 +0530 Subject: [PATCH 04/67] Remove map lax tests --- .../types/xml/XMLAttributeAccessTest.java | 15 --------- .../xml/xml-attribute-access-lax-behavior.bal | 33 +++---------------- 2 files changed, 5 insertions(+), 43 deletions(-) diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/types/xml/XMLAttributeAccessTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/types/xml/XMLAttributeAccessTest.java index 6ceccf756bfa..148bb755413d 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/types/xml/XMLAttributeAccessTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/types/xml/XMLAttributeAccessTest.java @@ -82,26 +82,11 @@ public void testXMLAttributeAccessNegative() { BAssertUtil.validateError(negative, 1, "invalid character ':' in field access expression", 10, 13); } - @Test - public void testXMLAsMapContent() { - BArray result = (BArray) BRunUtil.invoke(lexCompileRes, "testXMLAsMapContent"); - Assert.assertEquals(result.get(0).toString(), "val"); - Assert.assertEquals(result.get(1).toString(), "val"); - Assert.assertEquals(result.get(2).toString(), "true"); - } - @Test public void testXMLAttributeWithNSPrefix() { BArray result = (BArray) BRunUtil.invoke(lexCompileRes, "testXMLAttributeWithNSPrefix"); Assert.assertEquals(result.get(0).toString(), "preserve"); Assert.assertEquals(result.get(1).toString(), "preserve"); - Assert.assertEquals(result.get(2).toString(), "error(\"{lang.map}InvalidKey\",key=\"b\")"); - } - - @Test - public void testXMLASMapContentInvalidKey() { - Object result = BRunUtil.invoke(lexCompileRes, "testXMLASMapContentInvalidKey"); - Assert.assertEquals(result.toString(), "error(\"{lang.map}InvalidKey\",key=\"b\")"); } @Test diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/types/xml/xml-attribute-access-lax-behavior.bal b/tests/jballerina-unit-test/src/test/resources/test-src/types/xml/xml-attribute-access-lax-behavior.bal index 5cf64bd32463..267334994fba 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/types/xml/xml-attribute-access-lax-behavior.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/types/xml/xml-attribute-access-lax-behavior.bal @@ -1,36 +1,13 @@ import ballerina/lang.'xml; -function testXMLAsMapContent() returns [string|error?, string|error?, boolean] { - map xmap = getXMLMap(); - string|error val = xmap.a.attr; - string|error? val2 = xmap.a?.attr; - string|error? val3 = xmap.a?.attr2; - return [val, val2, val3 is ()]; -} - -function testXMLASMapContentInvalidKey() returns string|error? { - map xmap = getXMLMap(); - string|error val = xmap.b.attr; - return val; -} - -function testXMLAttributeWithNSPrefix() returns - [string|error?, string|error?, string|error?, boolean, boolean] { - map xmap = {}; - xmap["a"] = xml ``; - string|error val = xmap.a.'xml:space; - string|error? val2 = xmap.a?.'xml:space; - string|error? val3 = xmap.b?.'xml:space; - return [val, val2, val3]; +function testXMLAttributeWithNSPrefix() returns [string|error?, string|error?] { + xml a = xml ``; + string|error val = a.'xml:space; + string|error? val2 = a?.'xml:space; + return [val, val2]; } function testXMLDirectAttributeAccess() returns [boolean, boolean, boolean, boolean] { xml x = xml ``; return [x.attr is string, x?.attr is string, x.attrNon is error, x?.attrNon is ()]; } - -function getXMLMap() returns map { - map xmap = {}; - xmap["a"] = xml ``; - return xmap; -} From 6f20f189b6d4b6013ceb10899c37552828f8c230 Mon Sep 17 00:00:00 2001 From: ushirask Date: Thu, 16 Feb 2023 08:55:39 +0530 Subject: [PATCH 05/67] Fix test case --- .../test/expressions/access/OptionalFieldAccessTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/expressions/access/OptionalFieldAccessTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/expressions/access/OptionalFieldAccessTest.java index 78476af6ae60..8fb333971084 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/expressions/access/OptionalFieldAccessTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/expressions/access/OptionalFieldAccessTest.java @@ -59,6 +59,8 @@ public void testNegativeCases() { "access", 58, 14); validateError(negativeResult, i++, "invalid operation: type 'map?' does not support optional field " + "access", 61, 19); + validateError(negativeResult, i++, "invalid operation: type '(map|map)' does not support" + + " optional field access", 65, 20); validateError(negativeResult, i++, "incompatible types: expected 'json', found '(json|error)'", 71, 15); validateError(negativeResult, i++, "invalid operation: type 'Qux' does not support optional field access", 87 , 9); From b3558275127c01348d86f47d70ba57f0e70ecae8 Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Tue, 31 Jan 2023 17:26:13 +0530 Subject: [PATCH 06/67] Handle partial var inits within onfail (cherry picked from commit 3177740971f1806b67a019e6d493928b2f4ea556) --- .../semantics/analyzer/DataflowAnalyzer.java | 10 ++++---- .../statements/onfail/OnFailClauseTest.java | 3 +++ .../onfail/on-fail-clause-negative-v2.bal | 25 +++++++++++++++++++ 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java index 15294eed0413..9f19e2105f8f 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java @@ -900,13 +900,13 @@ private void analyzeOnFailBranch(BLangOnFailClause onFailClause, BranchResult do // and remove from `uninitializedVars` map if initialized in on-fail branch BranchResult onFailResult = analyzeBranch(onFailClause, env); Set symbols = new HashSet<>(); - for (BSymbol varRef: doResult.uninitializedVars.keySet()) { - InitStatus status = onFailResult.uninitializedVars.get(varRef); - if (status == null) { - symbols.add(varRef); + for (Map.Entry varRef : doResult.uninitializedVars.entrySet()) { + InitStatus status = onFailResult.uninitializedVars.get(varRef.getKey()); + if (status == null && varRef.getValue() != InitStatus.UN_INIT) { + symbols.add(varRef.getKey()); } } - for (BSymbol symbol: symbols) { + for (BSymbol symbol : symbols) { doResult.uninitializedVars.remove(symbol); } } diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java index c9dfbd06f689..7495ab30d5f4 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java @@ -77,6 +77,9 @@ public void testOnFailClauseNegativeCaseV2() { BAssertUtil.validateError(negativeResult, i++, "variable 'resultInt3' may not have been initialized", 159, 5); BAssertUtil.validateError(negativeResult, i++, "variable 'k' may not have been initialized", 174, 9); BAssertUtil.validateError(negativeResult, i++, "variable 'str2' may not have been initialized", 212, 5); + BAssertUtil.validateError(negativeResult, i++, "variable 'str1' is not initialized", 224, 5); + BAssertUtil.validateError(negativeResult, i++, "variable 'str2' is not initialized", 225, 5); + BAssertUtil.validateError(negativeResult, i++, "variable 'str1' is not initialized", 238, 5); Assert.assertEquals(negativeResult.getErrorCount(), i); } diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal b/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal index b9dffd9b97a0..81a7bbed4664 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal @@ -213,3 +213,28 @@ function testUnInitVars8(int[] data) returns string { return str1; } +function testUnInitVars9() { + string str1; + string str2; + do { + } on fail { + str1 = "-> error caught. Hence value returning"; + str2 = "-> error caught. Hence value returning"; + } + str1 += "-> reached end"; + str2 += "-> reached end"; +} + +function testUnInitVars10() { + string str1; + string str2; + do { + check getErrorOrNil(); + str2 = "partial init"; + } on fail { + str1 = "partial init"; + str2 = "-> error caught. Hence value returning"; + } + str1 += "-> reached end"; + str2 += "-> reached end"; +} From 9827f661b49d03d8a1dc4e8469d6908b963ab16e Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Tue, 14 Mar 2023 15:52:48 +0530 Subject: [PATCH 07/67] Improve uninit var analysis for onfail --- .../semantics/analyzer/DataflowAnalyzer.java | 231 +++++++++++++----- 1 file changed, 176 insertions(+), 55 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java index 9f19e2105f8f..816ba0f8bbdb 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java @@ -234,6 +234,7 @@ import java.util.Objects; import java.util.Optional; import java.util.Set; +import java.util.Stack; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -261,9 +262,11 @@ public class DataflowAnalyzer extends BLangNodeVisitor { private Map unusedLocalVariables; private Map> globalNodeDependsOn; private Map> functionToDependency; + private Map> onFailUninitializedVars; + private Stack enclosingOnFailClause; private boolean flowTerminated = false; private boolean possibleFailureReached = false; - private boolean visitingOnFailStmt = false; + private boolean definiteFailureReached = false; private static final CompilerContext.Key DATAFLOW_ANALYZER_KEY = new CompilerContext.Key<>(); private Deque currDependentSymbolDeque; @@ -299,6 +302,8 @@ public BLangPackage analyze(BLangPackage pkgNode) { this.uninitializedVars = new LinkedHashMap<>(); this.globalNodeDependsOn = new LinkedHashMap<>(); this.functionToDependency = new HashMap<>(); + this.onFailUninitializedVars = new LinkedHashMap<>(); + this.enclosingOnFailClause = new Stack<>(); this.dlog.setCurrentPackageId(pkgNode.packageID); SymbolEnv pkgEnv = this.symTable.pkgEnvMap.get(pkgNode.symbol); analyzeNode(pkgNode, pkgEnv); @@ -437,6 +442,7 @@ private void visitFunctionBodyWithDynamicEnv(BLangFunction funcNode, SymbolEnv f this.uninitializedVars = copyUninitializedVars(); this.flowTerminated = false; this.possibleFailureReached = false; + this.definiteFailureReached = false; analyzeNode(funcNode.body, funcEnv); @@ -536,6 +542,7 @@ public void visit(BLangClassDefinition classDef) { this.uninitializedVars = copyUninitializedVars(); this.flowTerminated = false; this.possibleFailureReached = false; + this.definiteFailureReached = false; visitedOCE = true; } SymbolEnv objectEnv = SymbolEnv.createClassEnv(classDef, classDef.symbol.scope, env); @@ -723,7 +730,16 @@ public void visit(BLangAssignment assignment) { public void visit(BLangCompoundAssignment compoundAssignNode) { analyzeNode(compoundAssignNode.expr, env); analyzeNode(compoundAssignNode.varRef, env); + boolean overrideOnFailInit = false; + Map onFailInitStatus = null; + if (!this.enclosingOnFailClause.isEmpty()) { + onFailInitStatus = copyOnFailUninitializedVars(this.enclosingOnFailClause.peek()); + overrideOnFailInit = onFailInitStatus.containsKey(compoundAssignNode.varRef.symbol); + } checkAssignment(compoundAssignNode.varRef); + if (overrideOnFailInit) { + this.onFailUninitializedVars.put(this.enclosingOnFailClause.peek(), onFailInitStatus); + } this.uninitializedVars.remove(compoundAssignNode.varRef.symbol); } @@ -735,7 +751,9 @@ public void visit(BLangBreak breakNode) { @Override public void visit(BLangReturn returnNode) { analyzeNode(returnNode.expr, env); - + //if the do statement returns, what matters after on-fail is the on-fail branch result, + //so we need to set the definiteFailureReached to true + this.definiteFailureReached = true; // return statement will exit from the function. terminateFlow(); } @@ -751,22 +769,43 @@ public void visit(BLangIf ifNode) { BranchResult ifResult = analyzeBranch(ifNode.body, env); BranchResult elseResult = analyzeBranch(ifNode.elseStmt, env); - // If the flow was terminated within 'if' block, then after the if-else block, - // only the results of the 'else' block matters. - if (ifResult.flowTerminated) { - this.uninitializedVars = elseResult.uninitializedVars; - return; - } + if (ifResult.flowTerminated && elseResult.flowTerminated && ifResult.possibleFailureReached && + elseResult.possibleFailureReached) { + this.onFailUninitializedVars.put(this.enclosingOnFailClause.peek(), + mergeUninitializedVars(ifResult.possibleFailureUnInitVars, elseResult.possibleFailureUnInitVars)); + } else { + boolean ifExprConst = ConditionResolver.checkConstCondition(types, symTable, ifNode.expr) == symTable.trueType; + // If the flow was terminated within 'if' block, then after the if-else block, + // only the results of the 'else' block matters. + if (ifResult.flowTerminated) { + this.uninitializedVars = elseResult.uninitializedVars; + if (elseResult.possibleFailureUnInitVars != null) { + this.onFailUninitializedVars.put(this.enclosingOnFailClause.peek(), elseResult.possibleFailureUnInitVars); + } + if (ifExprConst) { + this.flowTerminated = ifResult.flowTerminated; + this.definiteFailureReached = ifResult.definiteFailureReached; + } + return; + } - // If the flow was terminated within 'else' block, then after the if-else block, - // only the results of the 'if' block matters. - if (elseResult.flowTerminated || - ConditionResolver.checkConstCondition(types, symTable, ifNode.expr) == symTable.trueType) { - this.uninitializedVars = ifResult.uninitializedVars; - return; + // If the flow was terminated within 'else' block, then after the if-else block, + // only the results of the 'if' block matters. + if (elseResult.flowTerminated || ifExprConst) { + this.uninitializedVars = ifResult.uninitializedVars; + if (ifResult.possibleFailureUnInitVars != null) { + this.onFailUninitializedVars.put(this.enclosingOnFailClause.peek(), ifResult.possibleFailureUnInitVars); + } + return; + } } - this.uninitializedVars = mergeUninitializedVars(ifResult.uninitializedVars, elseResult.uninitializedVars); + if (ifResult.possibleFailureUnInitVars != null && elseResult.possibleFailureUnInitVars != null) { + this.onFailUninitializedVars.put(this.enclosingOnFailClause.peek(), mergeUninitializedVars(ifResult.possibleFailureUnInitVars, + elseResult.possibleFailureUnInitVars)); + } + this.flowTerminated = ifResult.flowTerminated && elseResult.flowTerminated; + this.definiteFailureReached = ifResult.definiteFailureReached && elseResult.definiteFailureReached; } @Override @@ -854,28 +893,58 @@ public void visit(BLangQueryAction queryAction) { @Override public void visit(BLangWhile whileNode) { Map prevUninitializedVars = this.uninitializedVars; - boolean prevVisitingOnFailStmt = this.visitingOnFailStmt; - if (whileNode.onFailClause != null) { - this.visitingOnFailStmt = true; - } + createUninitializedVarsForOnFailClause(whileNode.onFailClause); analyzeNode(whileNode.expr, env); BranchResult whileResult = analyzeBranch(whileNode.body, env); - analyzeOnFailBranch(whileNode.onFailClause, whileResult); - BType constCondition = ConditionResolver.checkConstCondition(types, symTable, whileNode.expr); + boolean onFailClauseAvailable = whileNode.onFailClause != null; if (constCondition == symTable.falseType) { this.uninitializedVars = prevUninitializedVars; + removeEnclosingOnFail(onFailClauseAvailable); return; } + updateUninitializedVarsForOnFailClause(whileNode.onFailClause, whileResult); + BranchResult onFailResult = null; + if (onFailClauseAvailable) { + onFailResult = analyzeOnFailBranch(whileNode.onFailClause, whileResult); + } - if (whileResult.flowTerminated || constCondition == symTable.trueType) { + if (constCondition == symTable.trueType) { this.uninitializedVars = whileResult.uninitializedVars; + if (whileResult.possibleFailureUnInitVars != null) { + this.onFailUninitializedVars.put(this.enclosingOnFailClause.peek(), whileResult.possibleFailureUnInitVars); + if (onFailClauseAvailable) { + this.uninitializedVars = mergeUninitializedVars(whileResult.uninitializedVars, onFailResult.uninitializedVars); + } + } + removeEnclosingOnFail(onFailClauseAvailable); return; } this.uninitializedVars = mergeUninitializedVars(this.uninitializedVars, whileResult.uninitializedVars); - this.visitingOnFailStmt = prevVisitingOnFailStmt; + removeEnclosingOnFail(onFailClauseAvailable); + } + + private void createUninitializedVarsForOnFailClause(BLangOnFailClause onFailClause) { + if (onFailClause != null) { + this.enclosingOnFailClause.push(onFailClause); + this.onFailUninitializedVars.put(onFailClause, copyUninitializedVars()); + } + } + + private void updateUninitializedVarsForOnFailClause(BLangOnFailClause onFailClause, BranchResult result) { + if (onFailClause == null) { + if (!this.enclosingOnFailClause.isEmpty()) { + this.onFailUninitializedVars.put(this.enclosingOnFailClause.peek(), result.possibleFailureUnInitVars); + } + } + } + + private void removeEnclosingOnFail(boolean onFailAvailable) { + if (onFailAvailable) { + this.onFailUninitializedVars.remove(this.enclosingOnFailClause.pop()); + } } @Override @@ -884,36 +953,62 @@ public void visit(BLangDo doNode) { } private void analyzeErrorHandlingStatement(BLangBlockStmt blockStmt, BLangOnFailClause onFailClause) { - boolean prevVisitingOnFailStmt = this.visitingOnFailStmt; - if (onFailClause != null) { - this.visitingOnFailStmt = true; - } + createUninitializedVarsForOnFailClause(onFailClause); BranchResult doResult = analyzeBranch(blockStmt, env); this.uninitializedVars = doResult.uninitializedVars; - analyzeOnFailBranch(onFailClause, doResult); - this.visitingOnFailStmt = prevVisitingOnFailStmt; - } - - private void analyzeOnFailBranch(BLangOnFailClause onFailClause, BranchResult doResult) { - if (this.visitingOnFailStmt) { - // loop through the partial init variables from statement block - // and remove from `uninitializedVars` map if initialized in on-fail branch - BranchResult onFailResult = analyzeBranch(onFailClause, env); - Set symbols = new HashSet<>(); - for (Map.Entry varRef : doResult.uninitializedVars.entrySet()) { - InitStatus status = onFailResult.uninitializedVars.get(varRef.getKey()); - if (status == null && varRef.getValue() != InitStatus.UN_INIT) { - symbols.add(varRef.getKey()); - } - } - for (BSymbol symbol : symbols) { - doResult.uninitializedVars.remove(symbol); + if (onFailClause == null) { + if (!this.enclosingOnFailClause.isEmpty()) { + this.onFailUninitializedVars.put(this.enclosingOnFailClause.peek(), doResult.possibleFailureUnInitVars); } + return; + } + BranchResult onFailResult = analyzeOnFailBranch(onFailClause, doResult); + if (blockStmt.failureBreakMode == BLangBlockStmt.FailureBreakMode.NOT_BREAKABLE) { + //todo @chiran: check if this is correct, can we remove possibleFailureUnInitVars + this.uninitializedVars = mergeUninitializedVars(doResult.uninitializedVars, doResult.possibleFailureUnInitVars); + removeEnclosingOnFail(true); + return; + } + + // If the flow was terminated within 'onfail' block, then after the do-onfail block, + // only the results of the 'do' block matters. + if (onFailResult.flowTerminated) { + this.uninitializedVars = doResult.uninitializedVars; + } else if (doResult.definiteFailureReached) { + this.uninitializedVars = onFailResult.uninitializedVars; + } else { + //todo @chiran + this.uninitializedVars = mergeUninitializedVars(doResult.uninitializedVars, onFailResult.uninitializedVars); + } + int enclosiveOnFailSize = this.enclosingOnFailClause.size(); + if (enclosiveOnFailSize > 1) { + BLangOnFailClause enclosingOnFail = this.enclosingOnFailClause.get(enclosiveOnFailSize-2); + this.onFailUninitializedVars.put(enclosingOnFail, + mergeUninitializedVars(doResult.uninitializedVars, onFailResult.uninitializedVars)); } + this.onFailUninitializedVars.remove(this.enclosingOnFailClause.pop()); + } + + private BranchResult analyzeOnFailBranch(BLangOnFailClause onFailClause, BranchResult doResult) { + Map prevUninitializedVars = this.uninitializedVars; + if (doResult.possibleFailureUnInitVars != null) { +// this.uninitializedVars = doResult.possibleFailureUnInitVars; + this.uninitializedVars = mergeUninitializedVars(this.uninitializedVars, doResult.possibleFailureUnInitVars); + } + this.onFailUninitializedVars.put(onFailClause, copyUninitializedVars()); + BranchResult onFailResult = analyzeBranch(onFailClause, env); + if (!onFailResult.possibleFailureUnInitVars.isEmpty()) { + onFailResult.uninitializedVars = mergeUninitializedVars(onFailResult.uninitializedVars, + onFailResult.possibleFailureUnInitVars); + } + this.uninitializedVars = prevUninitializedVars; + return onFailResult; } public void visit(BLangFail failNode) { this.possibleFailureReached = true; + this.flowTerminated = true; + this.definiteFailureReached = true; analyzeNode(failNode.expr, env); } @@ -1937,7 +2032,7 @@ public void visit(BLangIsAssignableExpr assignableExpr) { @Override public void visit(BLangCheckedExpr checkedExpr) { - if (this.visitingOnFailStmt) { + if (!this.enclosingOnFailClause.isEmpty()) { this.possibleFailureReached = true; } analyzeNode(checkedExpr.expr, env); @@ -2325,8 +2420,15 @@ public void visit(BLangRegExpTemplateLiteral regExpTemplateLiteral) { */ private BranchResult analyzeBranch(BLangNode node, SymbolEnv env) { Map prevUninitializedVars = this.uninitializedVars; + Map prevOnFailUninitializedVars = null; + if (!this.enclosingOnFailClause.isEmpty() && node != null) { + BLangOnFailClause onFailClause = this.enclosingOnFailClause.peek(); + prevOnFailUninitializedVars = this.onFailUninitializedVars.get(onFailClause); + this.onFailUninitializedVars.put(onFailClause, copyOnFailUninitializedVars(onFailClause)); + } boolean prevFlowTerminated = this.flowTerminated; boolean prevFailureReached = this.possibleFailureReached; + boolean prevDefiniteFailureReached = this.definiteFailureReached; // Get a snapshot of the current uninitialized vars before visiting the node. // This is done so that the original set of uninitialized vars will not be @@ -2334,15 +2436,21 @@ private BranchResult analyzeBranch(BLangNode node, SymbolEnv env) { this.uninitializedVars = copyUninitializedVars(); this.flowTerminated = false; this.possibleFailureReached = false; + this.definiteFailureReached = false; analyzeNode(node, env); - BranchResult branchResult = new BranchResult(this.uninitializedVars, this.flowTerminated); + BranchResult branchResult = new BranchResult(this.uninitializedVars, + this.enclosingOnFailClause.isEmpty() ? null : this.onFailUninitializedVars.get(this.enclosingOnFailClause.peek()), + this.flowTerminated, this.possibleFailureReached, this.definiteFailureReached); // Restore the original set of uninitialized vars this.uninitializedVars = prevUninitializedVars; this.flowTerminated = prevFlowTerminated; this.possibleFailureReached = prevFailureReached; - + this.definiteFailureReached = prevDefiniteFailureReached; + if (!this.enclosingOnFailClause.isEmpty() && node != null) { + this.onFailUninitializedVars.put(this.enclosingOnFailClause.peek(), prevOnFailUninitializedVars); + } return branchResult; } @@ -2350,6 +2458,10 @@ private Map copyUninitializedVars() { return new LinkedHashMap<>(this.uninitializedVars); } + private Map copyOnFailUninitializedVars(BLangOnFailClause onFailClause) { + return new LinkedHashMap<>(this.onFailUninitializedVars.get(onFailClause)); + } + private void analyzeNode(BLangNode node, SymbolEnv env) { SymbolEnv prevEnv = this.env; this.env = env; @@ -2365,8 +2477,8 @@ private Map mergeUninitializedVars(Map intersection.retainAll(secondUninitVars.keySet()); return Stream.concat(firstUninitVars.entrySet().stream(), secondUninitVars.entrySet().stream()) - .collect(Collectors.toMap(entry -> entry.getKey(), - // If only one branch have uninitialized the var, then its a partial initialization + .collect(Collectors.toMap(Map.Entry::getKey, + // If only one branch have uninitialized the var, then it's a partial initialization entry -> intersection.contains(entry.getKey()) ? entry.getValue() : InitStatus.PARTIAL_INIT, (a, b) -> { // If atleast one of the branches have partially initialized the var, @@ -2376,7 +2488,7 @@ private Map mergeUninitializedVars(Map } return InitStatus.UN_INIT; - })); + }, LinkedHashMap::new)); } private void checkVarRef(BSymbol symbol, Location pos) { @@ -2512,10 +2624,11 @@ private void checkAssignment(BLangExpression varRef) { BSymbol symbol = ((BLangVariableReference) varRef).symbol; if (this.possibleFailureReached && this.uninitializedVars.containsKey(symbol)) { - this.uninitializedVars.put(symbol, InitStatus.PARTIAL_INIT); - } else { - this.uninitializedVars.remove(symbol); + this.onFailUninitializedVars.get(this.enclosingOnFailClause.peek()).put(symbol, InitStatus.PARTIAL_INIT); + } else if (!this.possibleFailureReached && !this.onFailUninitializedVars.isEmpty()) { + this.onFailUninitializedVars.get(this.enclosingOnFailClause.peek()).remove(symbol); } + this.uninitializedVars.remove(symbol); } private void checkFinalObjectFieldUpdate(BLangFieldBasedAccess fieldAccess) { @@ -2758,11 +2871,19 @@ private enum InitStatus { private class BranchResult { Map uninitializedVars; + Map possibleFailureUnInitVars; boolean flowTerminated; + boolean definiteFailureReached; + boolean possibleFailureReached; + - BranchResult(Map uninitializedVars, boolean flowTerminated) { + BranchResult(Map uninitializedVars, Map possibleFailureUnInitVars, + boolean flowTerminated, boolean possibleFailureReached, boolean definiteFailureReached) { this.uninitializedVars = uninitializedVars; + this.possibleFailureUnInitVars = possibleFailureUnInitVars; this.flowTerminated = flowTerminated; + this.possibleFailureReached = possibleFailureReached; + this.definiteFailureReached = definiteFailureReached; } } } From d205df8494cb847b09db50ef061c4facf8607a4f Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Tue, 14 Mar 2023 15:53:05 +0530 Subject: [PATCH 08/67] Add unint var tetsts for onfail --- .../statements/onfail/OnFailClauseTest.java | 39 +- .../onfail/on-fail-clause-negative-v2.bal | 592 ++++++++++++++++++ 2 files changed, 630 insertions(+), 1 deletion(-) diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java index 7495ab30d5f4..b19933ebbd7e 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java @@ -79,7 +79,44 @@ public void testOnFailClauseNegativeCaseV2() { BAssertUtil.validateError(negativeResult, i++, "variable 'str2' may not have been initialized", 212, 5); BAssertUtil.validateError(negativeResult, i++, "variable 'str1' is not initialized", 224, 5); BAssertUtil.validateError(negativeResult, i++, "variable 'str2' is not initialized", 225, 5); - BAssertUtil.validateError(negativeResult, i++, "variable 'str1' is not initialized", 238, 5); + BAssertUtil.validateError(negativeResult, i++, "variable 'str1' may not have been initialized", 238, 5); + BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 272, 5); + BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 292, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 295, 5); + BAssertUtil.validateError(negativeResult, i++, "variable 'x' may not have been initialized", 376, 13); + BAssertUtil.validateError(negativeResult, i++, "variable 'y' may not have been initialized", 377, 13); + BAssertUtil.validateError(negativeResult, i++, "variable 'x' may not have been initialized", 380, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'y' may not have been initialized", 381, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'y' may not have been initialized", 406, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'x' may not have been initialized", 427, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'y' may not have been initialized", 428, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'y' may not have been initialized", 451, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'x' may not have been initialized", 473, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'y' is not initialized", 514, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'x' may not have been initialized", 530, 13); + BAssertUtil.validateError(negativeResult, i++, "variable 'x' may not have been initialized", 536, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'x' may not have been initialized", 553, 13); + BAssertUtil.validateError(negativeResult, i++, "variable 'x' may not have been initialized", 557, 13); + BAssertUtil.validateError(negativeResult, i++, "variable 'x' may not have been initialized", 559, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'x' may not have been initialized", 576, 13); + BAssertUtil.validateError(negativeResult, i++, "variable 'x' may not have been initialized", 582, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'i' may not have been initialized", 613, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'x' may not have been initialized", 629, 17); + BAssertUtil.validateError(negativeResult, i++, "variable 'y' may not have been initialized", 630, 17); + BAssertUtil.validateError(negativeResult, i++, "variable 'x' may not have been initialized", 635, 13); + BAssertUtil.validateError(negativeResult, i++, "variable 'y' may not have been initialized", 636, 13); + BAssertUtil.validateError(negativeResult, i++, "variable 'x' may not have been initialized", 641, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'y' may not have been initialized", 642, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'i' is not initialized", 652, 13); + BAssertUtil.validateError(negativeResult, i++, "variable 'i' may not have been initialized", 656, 9); + BAssertUtil.validateError(negativeResult, i++, "unreachable code", 668, 8); + BAssertUtil.validateError(negativeResult, i++, "variable 'c' may not have been initialized", 703, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'i' may not have been initialized", 730, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'i' is not initialized", 753, 17); + BAssertUtil.validateError(negativeResult, i++, "variable 'i' may not have been initialized", 764, 17); + BAssertUtil.validateError(negativeResult, i++, "variable 'i' is not initialized", 787, 17); + BAssertUtil.validateError(negativeResult, i++, "variable 'i' may not have been initialized", 799, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'i' may not have been initialized", 812, 9); Assert.assertEquals(negativeResult.getErrorCount(), i); } diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal b/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal index 81a7bbed4664..94e6f84cade2 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal @@ -238,3 +238,595 @@ function testUnInitVars10() { str1 += "-> reached end"; str2 += "-> reached end"; } + +function testUnInitVars11() { + int i; + int j; + int k; + do { + i = 0; + j = 1; + check getErrorOrNil(); + k = 1; + } on fail { + k = -1; + } + i += 1; + j += 1; + k += 1; +} + +function testUnInitVars12() { + int i; + int j; + int k; + do { + i = 0; + j = check getErrorOrInt(); + k = 1; + j += 1; + } on fail { + k = -1; + } + i += 1; + j += 1; + k += 1; +} + +function testUnInitVars13() { + boolean bool = true; + int i; + int j; + do { + if (bool) { + i = 1; + check getErrorOrNil(); + j = 1; + } else { + i = 2; + j = 2; + } + i += 1; + j += 1; + } on fail { + j += 1; + } + i += 1; + j += 1; +} + +function testUnInitVars14() { + int[] x; + int[] y; + int[] z; + do { + z = []; + x = check getErrorOrIntArr(); + y = []; + _ = x[0]; + _ = y[0]; + _ = z[0]; + } on fail { + return; + } + _ = x[0]; + _ = y[0]; + _ = z[0]; +} + +function testUnInitVars15(boolean bool) { + int[] x; + int[] y; + int[] z; + do { + if bool { + z = []; + x = check getErrorOrIntArr(); + y = []; + } else { + z = []; + x = []; + y = []; + } + _ = x[0]; + _ = y[0]; + _ = z[0]; + } on fail { + return; + } + _ = x[0]; + _ = y[0]; + _ = z[0]; +} + +function testUnInitVars16(boolean bool) { + int[] i; + do { + do { + i = check getErrorOrIntArr(); + } + } on fail { + if bool { + i = []; + } else { + i = []; + } + } + _ = i[0]; +} + +function testUnInitVars17(boolean bool) { + int[] x; + int[] y; + int[] z; + do { + if bool { + z = []; + x = check getErrorOrIntArr(); + y = []; + } else { + z = []; + x = []; + y = []; + } + _ = x[0]; + _ = y[0]; + _ = z[0]; + } on fail { + _ = x[0]; + _ = y[0]; + _ = z[0]; + } + _ = x[0]; + _ = y[0]; + _ = z[0]; +} + +function testUnInitVars18(boolean bool) { + int[] x; + int[] y; + int[] z; + do { + if bool { + z = []; + x = check getErrorOrIntArr(); + y = []; + } else { + z = []; + x = []; + y = []; + } + _ = x[0]; + _ = y[0]; + _ = z[0]; + } on fail { + x = []; + } + _ = x[0]; + _ = y[0]; + _ = z[0]; +} + +function testUnInitVars19() { + int[] x; + int[] y; + int[] z; + do { + do { + z = []; + x = check getErrorOrIntArr(); + y = []; + } on fail error e { + fail e; + } + _ = x[0]; //no compilation error + _ = y[0]; + _ = z[0]; + } on fail { + } + _ = x[0]; // compilation error for x, y + _ = y[0]; + _ = z[0]; +} + +function testUnInitVars20() { + int[] x; + int[] y; + int[] z; + do { + do { + z = []; + x = check getErrorOrIntArr(); + y = []; + } on fail error e { + fail e; + } + _ = x[0]; //no compilation error + _ = y[0]; + _ = z[0]; + } on fail { + x = []; + } + _ = x[0]; + _ = y[0]; // compilation error for uninit var y + _ = z[0]; +} + +function testUnInitVars21() { + int[] x; + int[] y; + int[] z; + do { + do { + z = []; + x = check getErrorOrIntArr(); + y = []; + } on fail error e { + y = []; + fail e; + } + _ = x[0]; //no compilation error + _ = y[0]; + _ = z[0]; + } on fail { + } + _ = x[0]; // compilation error for uninit var x + _ = y[0]; + _ = z[0]; +} + +function testUnInitVars22() { + int[] x; + int[] y; + int[] z; + do { + do { + z = []; + x = check getErrorOrIntArr(); + y = []; + } on fail error e { + y = []; + fail e; + } + _ = x[0]; + _ = y[0]; + _ = z[0]; + } on fail { + return; + } + _ = x[0]; + _ = y[0]; + _ = z[0]; +} + +function testUnInitVars23() { + int[] x; + int[] y; + int[] z; + + do { + z = []; + x = []; + } on fail { + y = []; + } + _ = x[0]; + _ = y[0]; //compilation error for uninit var x + _ = z[0]; +} + +function testUnInitVars24() { + int[] x; + int[] y; + int[] z; + do { + do { + z = []; + x = check getErrorOrIntArr(); + y = []; + } on fail { + y = []; + } + _ = x[0]; //compilation error for uninit var x + _ = y[0]; + _ = z[0]; + } on fail { + x = []; + } + _ = x[0]; //compilation error for uninit var x + _ = y[0]; + _ = z[0]; +} + +function testUnInitVars25() { + int[] x; + int[] y; + int[] z; + do { + do { + z = []; + x = check getErrorOrIntArr(); + y = []; + } on fail { + y = []; + } + _ = x[0]; //compilation error for uninit var x + _ = y[0]; + _ = z[0]; + } on fail { + _ = x[0]; + } + _ = x[0]; //compilation error for uninit var x + _ = y[0]; + _ = z[0]; +} + +function testUnInitVars26() { + int[] x; + int[] y; + int[] z; + do { + do { + z = []; + x = check getErrorOrIntArr(); + y = []; + } on fail { + y = []; + } + _ = x[0]; //compilation error for uninit var x + _ = y[0]; + _ = z[0]; + } on fail { + x = []; + } + _ = x[0]; //compilation error for uninit var x + _ = y[0]; + _ = z[0]; +} + +function testUnInitVars27(boolean bool) { + int i; + do { + if (bool) { + fail error("Dummy 1"); + } else { + i = 0; + fail error("Dummy 2"); + } + } on fail { + i = 0; + } + _ = i; +} + +function testUnInitVars28(boolean bool) { + int i; + do { + if (bool) { + fail error("Dummy 1"); + } else { + i = 0; + fail error("Dummy 2"); + } + } on fail { + } + _ = i; +} + +function testUnInitVars29(boolean bool) returns error? { + int[] x; + int[] y; + int[] z; + + do { + do { + z = []; + if bool { + x = check getErrorOrIntArr(); + } else { + y = []; + } + _ = x[0]; + _ = y[0]; + _ = z[0]; + } on fail error e { + fail e; + } + _ = x[0]; + _ = y[0]; + _ = z[0]; + } on fail error e { + return e; + } + _ = x[0]; + _ = y[0]; + _ = z[0]; +} + +function testUnInitVars30(boolean bool) returns error? { + int i; + do { + if bool { + fail error("Dummy error"); + } + _ = i; + } on fail { + i = 0; + } + _ = i; +} + +function testUnInitVars31(boolean bool) { + int i; + do { + i = 0; + if bool { + fail error("Dummy 1"); + } else { + fail error("Dummy 2"); + } + _ = i; //unreachable code + } on fail { + i = 0; + } + // the following line should not result in a compile-time error + _ = i; +} + +function testUnInitVars32(boolean bool) { + int i; + do { + i = 0; + if bool { + fail error("Dummy 1"); + } else { + fail error("Dummy 2"); + } + } on fail { + } + // the following line should not result in a compile-time error + _ = i; +} + +function testUnInitVars33(boolean bool) { + int a = 1; + final int c; + do { + if (a == 3) { + fail error("Dummy error"); + } + } on fail { + c = 0; + } + // the following line should result in a compile-time error + // variable c may not have been initialized + _ = c; +} + +function testUnInitVars34() { + int i; + do { + if true { + fail error("Dummy error"); + } + } on fail { + i = 0; + } + // the following line should not result in a compile-time error + _ = i; +} + +function testUnInitVars35(boolean bool) { + int i; + do { + if bool { + fail error("Dummy error"); + } + } on fail { + i = 0; + } + // the following line should result in a compile-time error + // variable i may not have been initialized + _ = i; +} + +function testUnInitVars36() { + int i; + int j; + do { + i = check getErrorOrInt(); + return; + } on fail { + i = 0; + j = 0; + } + // the following line should not result in a compile-time error + _ = i; + _ = j; +} + +function testUnInitVars37() { + int[] i; + do { + } on fail { + lock { + _ = i[0]; //variable 'i' is not initialized + } + } +} + +function testUnInitVars38() { + int[] i; + do { + i = check getErrorOrIntArr(); + } on fail { + lock { + _ = i[0]; //variable 'i' may not have been initialized + } + } +} + +function testUnInitVars39() { + int[] i; + do { + i = []; + i = check getErrorOrIntArr(); + } on fail { + lock { + _ = i[0]; //no compilation error + } + } +} + +function testUnInitVars40() returns error? { + int[] i; + transaction { + check commit; + } on fail { + lock { + _ = i[0]; //variable 'i' is not initialized + } + } +} + +function testUnInitVars41() returns error? { + int[] i; + transaction { + check commit; + } on fail { + i = []; + } + _ = i[0]; //variable 'i' may not have been initialized +} + +function testUnInitVars42(boolean bool) { + int[] i; + foreach int j in 1 ... 3 { + if bool { + i = [check getErrorOrInt()]; + } + break; + } on fail { + i = []; + } + _ = i[0]; //variable 'i' may not have been initialized +} + +function testUnInitVars43(boolean bool) returns error? { + int[] i; + foreach int j in 1 ... 3 { + if bool { + i = [check getErrorOrInt()]; + } else { + i = [check getErrorOrInt()]; + } + break; + } on fail { + i = []; + } + _ = i[0]; //no compilation error +} + +function getErrorOrIntArr() returns int[]|error { + return getError(); +} From 57b65f9ae5796c5720746ed66f9489299d237507 Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Tue, 14 Mar 2023 21:52:39 +0530 Subject: [PATCH 09/67] Improve readability --- .../semantics/analyzer/DataflowAnalyzer.java | 147 ++++++++++-------- 1 file changed, 80 insertions(+), 67 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java index 816ba0f8bbdb..ae8538b1d65b 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java @@ -262,7 +262,7 @@ public class DataflowAnalyzer extends BLangNodeVisitor { private Map unusedLocalVariables; private Map> globalNodeDependsOn; private Map> functionToDependency; - private Map> onFailUninitializedVars; + private Map> possibleFailureUnInitVars; private Stack enclosingOnFailClause; private boolean flowTerminated = false; private boolean possibleFailureReached = false; @@ -302,7 +302,7 @@ public BLangPackage analyze(BLangPackage pkgNode) { this.uninitializedVars = new LinkedHashMap<>(); this.globalNodeDependsOn = new LinkedHashMap<>(); this.functionToDependency = new HashMap<>(); - this.onFailUninitializedVars = new LinkedHashMap<>(); + this.possibleFailureUnInitVars = new LinkedHashMap<>(); this.enclosingOnFailClause = new Stack<>(); this.dlog.setCurrentPackageId(pkgNode.packageID); SymbolEnv pkgEnv = this.symTable.pkgEnvMap.get(pkgNode.symbol); @@ -730,15 +730,17 @@ public void visit(BLangAssignment assignment) { public void visit(BLangCompoundAssignment compoundAssignNode) { analyzeNode(compoundAssignNode.expr, env); analyzeNode(compoundAssignNode.varRef, env); - boolean overrideOnFailInit = false; + //compound statement can have assignment to itself. eg: x += x; + //so we need to avoid removing the symbol from possibleFailureUnInitVars list after analyzing the expression. + boolean resetOnFailInits = false; Map onFailInitStatus = null; - if (!this.enclosingOnFailClause.isEmpty()) { + if (isOnFailEnclosed()) { onFailInitStatus = copyOnFailUninitializedVars(this.enclosingOnFailClause.peek()); - overrideOnFailInit = onFailInitStatus.containsKey(compoundAssignNode.varRef.symbol); + resetOnFailInits = onFailInitStatus.containsKey(compoundAssignNode.varRef.symbol); } checkAssignment(compoundAssignNode.varRef); - if (overrideOnFailInit) { - this.onFailUninitializedVars.put(this.enclosingOnFailClause.peek(), onFailInitStatus); + if (resetOnFailInits) { + updateUnInitVarsForOnFailClause(onFailInitStatus); } this.uninitializedVars.remove(compoundAssignNode.varRef.symbol); } @@ -751,8 +753,8 @@ public void visit(BLangBreak breakNode) { @Override public void visit(BLangReturn returnNode) { analyzeNode(returnNode.expr, env); - //if the do statement returns, what matters after on-fail is the on-fail branch result, - //so we need to set the definiteFailureReached to true + // If the regular block of code within a failure-handling statement + // ends with a "return" statement, we only care about the outcome of the on-fail branch. this.definiteFailureReached = true; // return statement will exit from the function. terminateFlow(); @@ -769,18 +771,20 @@ public void visit(BLangIf ifNode) { BranchResult ifResult = analyzeBranch(ifNode.body, env); BranchResult elseResult = analyzeBranch(ifNode.elseStmt, env); - if (ifResult.flowTerminated && elseResult.flowTerminated && ifResult.possibleFailureReached && - elseResult.possibleFailureReached) { - this.onFailUninitializedVars.put(this.enclosingOnFailClause.peek(), - mergeUninitializedVars(ifResult.possibleFailureUnInitVars, elseResult.possibleFailureUnInitVars)); - } else { + //if both if and else blocks contains uninitialized variables due to possible failure, then merge them. + if (ifResult.possibleFailureUnInitVars != null && elseResult.possibleFailureUnInitVars != null) { + updateUnInitVarsForOnFailClause(mergeUninitializedVars(ifResult.possibleFailureUnInitVars, + elseResult.possibleFailureUnInitVars)); + } + if (!isOnFailEnclosed() || !ifResult.definiteFailureReached + || !elseResult.definiteFailureReached) { boolean ifExprConst = ConditionResolver.checkConstCondition(types, symTable, ifNode.expr) == symTable.trueType; // If the flow was terminated within 'if' block, then after the if-else block, // only the results of the 'else' block matters. if (ifResult.flowTerminated) { this.uninitializedVars = elseResult.uninitializedVars; if (elseResult.possibleFailureUnInitVars != null) { - this.onFailUninitializedVars.put(this.enclosingOnFailClause.peek(), elseResult.possibleFailureUnInitVars); + updateUnInitVarsForOnFailClause(elseResult.possibleFailureUnInitVars); } if (ifExprConst) { this.flowTerminated = ifResult.flowTerminated; @@ -794,18 +798,14 @@ public void visit(BLangIf ifNode) { if (elseResult.flowTerminated || ifExprConst) { this.uninitializedVars = ifResult.uninitializedVars; if (ifResult.possibleFailureUnInitVars != null) { - this.onFailUninitializedVars.put(this.enclosingOnFailClause.peek(), ifResult.possibleFailureUnInitVars); + updateUnInitVarsForOnFailClause(ifResult.possibleFailureUnInitVars); } return; } } this.uninitializedVars = mergeUninitializedVars(ifResult.uninitializedVars, elseResult.uninitializedVars); - if (ifResult.possibleFailureUnInitVars != null && elseResult.possibleFailureUnInitVars != null) { - this.onFailUninitializedVars.put(this.enclosingOnFailClause.peek(), mergeUninitializedVars(ifResult.possibleFailureUnInitVars, - elseResult.possibleFailureUnInitVars)); - } this.flowTerminated = ifResult.flowTerminated && elseResult.flowTerminated; - this.definiteFailureReached = ifResult.definiteFailureReached && elseResult.definiteFailureReached; + this.definiteFailureReached = isDefiniteFailureCase(ifResult, elseResult); } @Override @@ -880,7 +880,7 @@ public void visit(BLangForeach foreach) { } analyzeNode(collection, env); - analyzeErrorHandlingStatement(foreach.body, foreach.onFailClause); + analyzeStmtWithOnFail(foreach.body, foreach.onFailClause); } @Override @@ -904,18 +904,19 @@ public void visit(BLangWhile whileNode) { removeEnclosingOnFail(onFailClauseAvailable); return; } - updateUninitializedVarsForOnFailClause(whileNode.onFailClause, whileResult); BranchResult onFailResult = null; if (onFailClauseAvailable) { + updateUnInitVarsForOnFailClause(whileResult.possibleFailureUnInitVars); onFailResult = analyzeOnFailBranch(whileNode.onFailClause, whileResult); } if (constCondition == symTable.trueType) { this.uninitializedVars = whileResult.uninitializedVars; if (whileResult.possibleFailureUnInitVars != null) { - this.onFailUninitializedVars.put(this.enclosingOnFailClause.peek(), whileResult.possibleFailureUnInitVars); + updateUnInitVarsForOnFailClause(whileResult.possibleFailureUnInitVars); if (onFailClauseAvailable) { - this.uninitializedVars = mergeUninitializedVars(whileResult.uninitializedVars, onFailResult.uninitializedVars); + this.uninitializedVars + = mergeUninitializedVars(whileResult.uninitializedVars, onFailResult.uninitializedVars); } } removeEnclosingOnFail(onFailClauseAvailable); @@ -929,73 +930,73 @@ public void visit(BLangWhile whileNode) { private void createUninitializedVarsForOnFailClause(BLangOnFailClause onFailClause) { if (onFailClause != null) { this.enclosingOnFailClause.push(onFailClause); - this.onFailUninitializedVars.put(onFailClause, copyUninitializedVars()); + this.possibleFailureUnInitVars.put(onFailClause, copyUninitializedVars()); } } - private void updateUninitializedVarsForOnFailClause(BLangOnFailClause onFailClause, BranchResult result) { - if (onFailClause == null) { - if (!this.enclosingOnFailClause.isEmpty()) { - this.onFailUninitializedVars.put(this.enclosingOnFailClause.peek(), result.possibleFailureUnInitVars); - } + private void updateUnInitVarsForOnFailClause(Map uninitializedVars) { + if (isOnFailEnclosed()) { + this.possibleFailureUnInitVars.put(this.enclosingOnFailClause.peek(), uninitializedVars); } } private void removeEnclosingOnFail(boolean onFailAvailable) { if (onFailAvailable) { - this.onFailUninitializedVars.remove(this.enclosingOnFailClause.pop()); + this.possibleFailureUnInitVars.remove(this.enclosingOnFailClause.pop()); } } @Override public void visit(BLangDo doNode) { - analyzeErrorHandlingStatement(doNode.body, doNode.onFailClause); + analyzeStmtWithOnFail(doNode.body, doNode.onFailClause); } - private void analyzeErrorHandlingStatement(BLangBlockStmt blockStmt, BLangOnFailClause onFailClause) { + private void analyzeStmtWithOnFail(BLangBlockStmt blockStmt, BLangOnFailClause onFailClause) { createUninitializedVarsForOnFailClause(onFailClause); BranchResult doResult = analyzeBranch(blockStmt, env); this.uninitializedVars = doResult.uninitializedVars; if (onFailClause == null) { - if (!this.enclosingOnFailClause.isEmpty()) { - this.onFailUninitializedVars.put(this.enclosingOnFailClause.peek(), doResult.possibleFailureUnInitVars); - } + updateUnInitVarsForOnFailClause(doResult.possibleFailureUnInitVars); return; } + + // Analyze the on-fail block BranchResult onFailResult = analyzeOnFailBranch(onFailClause, doResult); if (blockStmt.failureBreakMode == BLangBlockStmt.FailureBreakMode.NOT_BREAKABLE) { - //todo @chiran: check if this is correct, can we remove possibleFailureUnInitVars + // If the failureBreakMode is NOT_BREAKABLE, then the on-fail block is not reachable this.uninitializedVars = mergeUninitializedVars(doResult.uninitializedVars, doResult.possibleFailureUnInitVars); removeEnclosingOnFail(true); return; } - // If the flow was terminated within 'onfail' block, then after the do-onfail block, - // only the results of the 'do' block matters. + Map mergedUninitializedVars = + mergeUninitializedVars(doResult.uninitializedVars, onFailResult.uninitializedVars); + // If the control flow is interrupted inside the 'onfail' block, + // only the results of the 'do' block are relevant after the execution + // of the entire 'stmt-with-on-fail' statement. if (onFailResult.flowTerminated) { this.uninitializedVars = doResult.uninitializedVars; } else if (doResult.definiteFailureReached) { this.uninitializedVars = onFailResult.uninitializedVars; } else { - //todo @chiran - this.uninitializedVars = mergeUninitializedVars(doResult.uninitializedVars, onFailResult.uninitializedVars); + this.uninitializedVars = mergedUninitializedVars; } - int enclosiveOnFailSize = this.enclosingOnFailClause.size(); - if (enclosiveOnFailSize > 1) { - BLangOnFailClause enclosingOnFail = this.enclosingOnFailClause.get(enclosiveOnFailSize-2); - this.onFailUninitializedVars.put(enclosingOnFail, - mergeUninitializedVars(doResult.uninitializedVars, onFailResult.uninitializedVars)); + + // Update the enclosing on-fail clause's possible failure uninitialized variables + int enclosingOnFailSize = this.enclosingOnFailClause.size(); + if (enclosingOnFailSize > 1) { + BLangOnFailClause enclosingOnFail = this.enclosingOnFailClause.get(enclosingOnFailSize - 2); + this.possibleFailureUnInitVars.put(enclosingOnFail, mergedUninitializedVars); } - this.onFailUninitializedVars.remove(this.enclosingOnFailClause.pop()); + this.possibleFailureUnInitVars.remove(this.enclosingOnFailClause.pop()); } private BranchResult analyzeOnFailBranch(BLangOnFailClause onFailClause, BranchResult doResult) { Map prevUninitializedVars = this.uninitializedVars; if (doResult.possibleFailureUnInitVars != null) { -// this.uninitializedVars = doResult.possibleFailureUnInitVars; this.uninitializedVars = mergeUninitializedVars(this.uninitializedVars, doResult.possibleFailureUnInitVars); } - this.onFailUninitializedVars.put(onFailClause, copyUninitializedVars()); + this.possibleFailureUnInitVars.put(onFailClause, copyUninitializedVars()); BranchResult onFailResult = analyzeBranch(onFailClause, env); if (!onFailResult.possibleFailureUnInitVars.isEmpty()) { onFailResult.uninitializedVars = mergeUninitializedVars(onFailResult.uninitializedVars, @@ -1005,21 +1006,29 @@ private BranchResult analyzeOnFailBranch(BLangOnFailClause onFailClause, BranchR return onFailResult; } + private boolean isOnFailEnclosed() { + return !this.enclosingOnFailClause.isEmpty(); + } + + private boolean isDefiniteFailureCase(BranchResult ifResult, BranchResult elseResult) { + return ifResult.definiteFailureReached && elseResult.definiteFailureReached; + } + public void visit(BLangFail failNode) { this.possibleFailureReached = true; - this.flowTerminated = true; this.definiteFailureReached = true; + terminateFlow(); analyzeNode(failNode.expr, env); } @Override public void visit(BLangLock lockNode) { - analyzeErrorHandlingStatement(lockNode.body, lockNode.onFailClause); + analyzeStmtWithOnFail(lockNode.body, lockNode.onFailClause); } @Override public void visit(BLangTransaction transactionNode) { - analyzeErrorHandlingStatement(transactionNode.transactionBody, transactionNode.onFailClause); + analyzeStmtWithOnFail(transactionNode.transactionBody, transactionNode.onFailClause); // marks the injected import as used Name transactionPkgName = names.fromString(Names.DOT.value + Names.TRANSACTION_PACKAGE.value); @@ -2032,7 +2041,7 @@ public void visit(BLangIsAssignableExpr assignableExpr) { @Override public void visit(BLangCheckedExpr checkedExpr) { - if (!this.enclosingOnFailClause.isEmpty()) { + if (isOnFailEnclosed()) { this.possibleFailureReached = true; } analyzeNode(checkedExpr.expr, env); @@ -2063,7 +2072,7 @@ public void visit(BLangAnnotationAttachment annAttachmentNode) { @Override public void visit(BLangRetry retryNode) { - analyzeErrorHandlingStatement(retryNode.retryBody, retryNode.onFailClause); + analyzeStmtWithOnFail(retryNode.retryBody, retryNode.onFailClause); } @Override @@ -2421,10 +2430,10 @@ public void visit(BLangRegExpTemplateLiteral regExpTemplateLiteral) { private BranchResult analyzeBranch(BLangNode node, SymbolEnv env) { Map prevUninitializedVars = this.uninitializedVars; Map prevOnFailUninitializedVars = null; - if (!this.enclosingOnFailClause.isEmpty() && node != null) { + if (node != null && isOnFailEnclosed()) { BLangOnFailClause onFailClause = this.enclosingOnFailClause.peek(); - prevOnFailUninitializedVars = this.onFailUninitializedVars.get(onFailClause); - this.onFailUninitializedVars.put(onFailClause, copyOnFailUninitializedVars(onFailClause)); + prevOnFailUninitializedVars = this.possibleFailureUnInitVars.get(onFailClause); + this.possibleFailureUnInitVars.put(onFailClause, copyOnFailUninitializedVars(onFailClause)); } boolean prevFlowTerminated = this.flowTerminated; boolean prevFailureReached = this.possibleFailureReached; @@ -2439,8 +2448,7 @@ private BranchResult analyzeBranch(BLangNode node, SymbolEnv env) { this.definiteFailureReached = false; analyzeNode(node, env); - BranchResult branchResult = new BranchResult(this.uninitializedVars, - this.enclosingOnFailClause.isEmpty() ? null : this.onFailUninitializedVars.get(this.enclosingOnFailClause.peek()), + BranchResult branchResult = new BranchResult(this.uninitializedVars, getPossibleFailureUnInitVars(), this.flowTerminated, this.possibleFailureReached, this.definiteFailureReached); // Restore the original set of uninitialized vars @@ -2448,9 +2456,7 @@ private BranchResult analyzeBranch(BLangNode node, SymbolEnv env) { this.flowTerminated = prevFlowTerminated; this.possibleFailureReached = prevFailureReached; this.definiteFailureReached = prevDefiniteFailureReached; - if (!this.enclosingOnFailClause.isEmpty() && node != null) { - this.onFailUninitializedVars.put(this.enclosingOnFailClause.peek(), prevOnFailUninitializedVars); - } + updateUnInitVarsForOnFailClause(prevOnFailUninitializedVars); return branchResult; } @@ -2459,7 +2465,14 @@ private Map copyUninitializedVars() { } private Map copyOnFailUninitializedVars(BLangOnFailClause onFailClause) { - return new LinkedHashMap<>(this.onFailUninitializedVars.get(onFailClause)); + return new LinkedHashMap<>(this.possibleFailureUnInitVars.get(onFailClause)); + } + + private Map getPossibleFailureUnInitVars() { + if (isOnFailEnclosed()) { + return this.possibleFailureUnInitVars.get(this.enclosingOnFailClause.peek()); + } + return null; } private void analyzeNode(BLangNode node, SymbolEnv env) { @@ -2624,9 +2637,9 @@ private void checkAssignment(BLangExpression varRef) { BSymbol symbol = ((BLangVariableReference) varRef).symbol; if (this.possibleFailureReached && this.uninitializedVars.containsKey(symbol)) { - this.onFailUninitializedVars.get(this.enclosingOnFailClause.peek()).put(symbol, InitStatus.PARTIAL_INIT); - } else if (!this.possibleFailureReached && !this.onFailUninitializedVars.isEmpty()) { - this.onFailUninitializedVars.get(this.enclosingOnFailClause.peek()).remove(symbol); + this.possibleFailureUnInitVars.get(this.enclosingOnFailClause.peek()).put(symbol, InitStatus.PARTIAL_INIT); + } else if (!this.possibleFailureReached && !this.possibleFailureUnInitVars.isEmpty()) { + this.possibleFailureUnInitVars.get(this.enclosingOnFailClause.peek()).remove(symbol); } this.uninitializedVars.remove(symbol); } From 50b7eeb02aba892a34615ddf513d3c930ae1a908 Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Tue, 14 Mar 2023 23:42:31 +0530 Subject: [PATCH 10/67] Mark possible failure iff enclosed within onfail --- .../semantics/analyzer/DataflowAnalyzer.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java index ae8538b1d65b..b158cbb6330f 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java @@ -1015,8 +1015,10 @@ private boolean isDefiniteFailureCase(BranchResult ifResult, BranchResult elseRe } public void visit(BLangFail failNode) { - this.possibleFailureReached = true; - this.definiteFailureReached = true; + if (isOnFailEnclosed()) { + this.possibleFailureReached = true; + this.definiteFailureReached = true; + } terminateFlow(); analyzeNode(failNode.expr, env); } @@ -2637,9 +2639,9 @@ private void checkAssignment(BLangExpression varRef) { BSymbol symbol = ((BLangVariableReference) varRef).symbol; if (this.possibleFailureReached && this.uninitializedVars.containsKey(symbol)) { - this.possibleFailureUnInitVars.get(this.enclosingOnFailClause.peek()).put(symbol, InitStatus.PARTIAL_INIT); - } else if (!this.possibleFailureReached && !this.possibleFailureUnInitVars.isEmpty()) { - this.possibleFailureUnInitVars.get(this.enclosingOnFailClause.peek()).remove(symbol); + getPossibleFailureUnInitVars().put(symbol, InitStatus.PARTIAL_INIT); + } else if (!this.possibleFailureUnInitVars.isEmpty() && !this.possibleFailureReached) { + getPossibleFailureUnInitVars().remove(symbol); } this.uninitializedVars.remove(symbol); } From d4a77b9a55ccb2345bc8705835c893b066590bce Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Wed, 15 Mar 2023 13:22:08 +0530 Subject: [PATCH 11/67] Fix checkstyle failure --- .../compiler/semantics/analyzer/DataflowAnalyzer.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java index b158cbb6330f..4a03da9f894e 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java @@ -778,7 +778,8 @@ public void visit(BLangIf ifNode) { } if (!isOnFailEnclosed() || !ifResult.definiteFailureReached || !elseResult.definiteFailureReached) { - boolean ifExprConst = ConditionResolver.checkConstCondition(types, symTable, ifNode.expr) == symTable.trueType; + boolean ifExprConst + = ConditionResolver.checkConstCondition(types, symTable, ifNode.expr) == symTable.trueType; // If the flow was terminated within 'if' block, then after the if-else block, // only the results of the 'else' block matters. if (ifResult.flowTerminated) { @@ -964,7 +965,8 @@ private void analyzeStmtWithOnFail(BLangBlockStmt blockStmt, BLangOnFailClause o BranchResult onFailResult = analyzeOnFailBranch(onFailClause, doResult); if (blockStmt.failureBreakMode == BLangBlockStmt.FailureBreakMode.NOT_BREAKABLE) { // If the failureBreakMode is NOT_BREAKABLE, then the on-fail block is not reachable - this.uninitializedVars = mergeUninitializedVars(doResult.uninitializedVars, doResult.possibleFailureUnInitVars); + this.uninitializedVars + = mergeUninitializedVars(doResult.uninitializedVars, doResult.possibleFailureUnInitVars); removeEnclosingOnFail(true); return; } From 66f523fbca770af1d4d4d7872e58398c2f7826aa Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Wed, 15 Mar 2023 13:36:27 +0530 Subject: [PATCH 12/67] Add comments for compiler errors in tests --- .../onfail/on-fail-clause-negative-v2.bal | 76 +++++++++---------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal b/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal index 94e6f84cade2..8f68a339cfca 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal @@ -221,8 +221,8 @@ function testUnInitVars9() { str1 = "-> error caught. Hence value returning"; str2 = "-> error caught. Hence value returning"; } - str1 += "-> reached end"; - str2 += "-> reached end"; + str1 += "-> reached end"; //error: variable 'str1' is not initialized + str2 += "-> reached end"; //error: variable 'str2' is not initialized } function testUnInitVars10() { @@ -235,7 +235,7 @@ function testUnInitVars10() { str1 = "partial init"; str2 = "-> error caught. Hence value returning"; } - str1 += "-> reached end"; + str1 += "-> reached end"; //error: variable 'str1' may not have been initialized str2 += "-> reached end"; } @@ -269,7 +269,7 @@ function testUnInitVars12() { k = -1; } i += 1; - j += 1; + j += 1; //error: variable 'j' may not have been initialized k += 1; } @@ -289,10 +289,10 @@ function testUnInitVars13() { i += 1; j += 1; } on fail { - j += 1; + j += 1; //error: variable 'j' may not have been initialized } i += 1; - j += 1; + j += 1; //error: variable 'j' may not have been initialized } function testUnInitVars14() { @@ -373,12 +373,12 @@ function testUnInitVars17(boolean bool) { _ = y[0]; _ = z[0]; } on fail { - _ = x[0]; - _ = y[0]; + _ = x[0]; //error: variable 'x' may not have been initialized + _ = y[0]; //error: variable 'y' may not have been initialized _ = z[0]; } - _ = x[0]; - _ = y[0]; + _ = x[0]; //error: variable 'x' may not have been initialized + _ = y[0]; //error: variable 'y' may not have been initialized _ = z[0]; } @@ -403,7 +403,7 @@ function testUnInitVars18(boolean bool) { x = []; } _ = x[0]; - _ = y[0]; + _ = y[0]; //error: variable 'y' may not have been initialized _ = z[0]; } @@ -424,8 +424,8 @@ function testUnInitVars19() { _ = z[0]; } on fail { } - _ = x[0]; // compilation error for x, y - _ = y[0]; + _ = x[0]; //error: variable 'x' may not have been initialized + _ = y[0]; //error: variable 'y' may not have been initialized _ = z[0]; } @@ -448,7 +448,7 @@ function testUnInitVars20() { x = []; } _ = x[0]; - _ = y[0]; // compilation error for uninit var y + _ = y[0]; //error: variable 'y' may not have been initialized _ = z[0]; } @@ -470,7 +470,7 @@ function testUnInitVars21() { _ = z[0]; } on fail { } - _ = x[0]; // compilation error for uninit var x + _ = x[0]; //error: variable 'x' may not have been initialized _ = y[0]; _ = z[0]; } @@ -511,7 +511,7 @@ function testUnInitVars23() { y = []; } _ = x[0]; - _ = y[0]; //compilation error for uninit var x + _ = y[0]; //error: variable 'y' is not initialized" _ = z[0]; } @@ -527,13 +527,13 @@ function testUnInitVars24() { } on fail { y = []; } - _ = x[0]; //compilation error for uninit var x + _ = x[0]; //error: variable 'x' may not have been initialized _ = y[0]; _ = z[0]; } on fail { x = []; } - _ = x[0]; //compilation error for uninit var x + _ = x[0]; //error: variable 'x' may not have been initialized _ = y[0]; _ = z[0]; } @@ -550,13 +550,13 @@ function testUnInitVars25() { } on fail { y = []; } - _ = x[0]; //compilation error for uninit var x + _ = x[0]; //error: variable 'x' may not have been initialized _ = y[0]; _ = z[0]; } on fail { - _ = x[0]; + _ = x[0]; //error: variable 'x' may not have been initialized } - _ = x[0]; //compilation error for uninit var x + _ = x[0]; //error: variable 'x' may not have been initialized _ = y[0]; _ = z[0]; } @@ -573,13 +573,13 @@ function testUnInitVars26() { } on fail { y = []; } - _ = x[0]; //compilation error for uninit var x + _ = x[0]; //error: variable 'x' may not have been initialized _ = y[0]; _ = z[0]; } on fail { x = []; } - _ = x[0]; //compilation error for uninit var x + _ = x[0]; //error: variable 'x' may not have been initialized _ = y[0]; _ = z[0]; } @@ -610,7 +610,7 @@ function testUnInitVars28(boolean bool) { } } on fail { } - _ = i; + _ = i; //error: variable 'i' may not have been initialized } function testUnInitVars29(boolean bool) returns error? { @@ -626,20 +626,20 @@ function testUnInitVars29(boolean bool) returns error? { } else { y = []; } - _ = x[0]; - _ = y[0]; + _ = x[0]; //error: variable 'x' may not have been initialized + _ = y[0]; //error: variable 'y' may not have been initialized _ = z[0]; } on fail error e { fail e; } - _ = x[0]; - _ = y[0]; + _ = x[0]; //error: variable 'x' may not have been initialized + _ = y[0]; //error: variable 'y' may not have been initialized _ = z[0]; } on fail error e { return e; } - _ = x[0]; - _ = y[0]; + _ = x[0]; //error: variable 'x' may not have been initialized + _ = y[0]; //error: variable 'y' may not have been initialized _ = z[0]; } @@ -649,11 +649,11 @@ function testUnInitVars30(boolean bool) returns error? { if bool { fail error("Dummy error"); } - _ = i; + _ = i; //error: variable 'x' is not initialized } on fail { i = 0; } - _ = i; + _ = i; //error: variable 'x' may not have been initialized } function testUnInitVars31(boolean bool) { @@ -665,7 +665,7 @@ function testUnInitVars31(boolean bool) { } else { fail error("Dummy 2"); } - _ = i; //unreachable code + _ = i; //error: unreachable code } on fail { i = 0; } @@ -750,7 +750,7 @@ function testUnInitVars37() { do { } on fail { lock { - _ = i[0]; //variable 'i' is not initialized + _ = i[0]; //error: variable 'i' is not initialized } } } @@ -761,7 +761,7 @@ function testUnInitVars38() { i = check getErrorOrIntArr(); } on fail { lock { - _ = i[0]; //variable 'i' may not have been initialized + _ = i[0]; //error: variable 'i' may not have been initialized } } } @@ -784,7 +784,7 @@ function testUnInitVars40() returns error? { check commit; } on fail { lock { - _ = i[0]; //variable 'i' is not initialized + _ = i[0]; //error: variable 'i' is not initialized } } } @@ -796,7 +796,7 @@ function testUnInitVars41() returns error? { } on fail { i = []; } - _ = i[0]; //variable 'i' may not have been initialized + _ = i[0]; //error: variable 'i' may not have been initialized } function testUnInitVars42(boolean bool) { @@ -809,7 +809,7 @@ function testUnInitVars42(boolean bool) { } on fail { i = []; } - _ = i[0]; //variable 'i' may not have been initialized + _ = i[0]; //error: variable 'i' may not have been initialized } function testUnInitVars43(boolean bool) returns error? { From 6d544ecfc27445073f75ad0a010b77a48a2dff22 Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Wed, 15 Mar 2023 22:09:50 +0530 Subject: [PATCH 13/67] Fix incorrect override of merged un-inits --- .../semantics/analyzer/DataflowAnalyzer.java | 5 +---- .../test/statements/onfail/OnFailClauseTest.java | 1 + .../onfail/on-fail-clause-negative-v2.bal | 13 +++++++++++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java index 4a03da9f894e..cd4fff73bcb8 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java @@ -784,11 +784,8 @@ public void visit(BLangIf ifNode) { // only the results of the 'else' block matters. if (ifResult.flowTerminated) { this.uninitializedVars = elseResult.uninitializedVars; - if (elseResult.possibleFailureUnInitVars != null) { - updateUnInitVarsForOnFailClause(elseResult.possibleFailureUnInitVars); - } if (ifExprConst) { - this.flowTerminated = ifResult.flowTerminated; + this.flowTerminated = true; this.definiteFailureReached = ifResult.definiteFailureReached; } return; diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java index b19933ebbd7e..57f891e3d793 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java @@ -117,6 +117,7 @@ public void testOnFailClauseNegativeCaseV2() { BAssertUtil.validateError(negativeResult, i++, "variable 'i' is not initialized", 787, 17); BAssertUtil.validateError(negativeResult, i++, "variable 'i' may not have been initialized", 799, 9); BAssertUtil.validateError(negativeResult, i++, "variable 'i' may not have been initialized", 812, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'i' may not have been initialized", 840, 9); Assert.assertEquals(negativeResult.getErrorCount(), i); } diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal b/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal index 8f68a339cfca..7cccb8c58e65 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal @@ -827,6 +827,19 @@ function testUnInitVars43(boolean bool) returns error? { _ = i[0]; //no compilation error } +function testUnInitVars44(boolean bool) { + int i; + do { + if bool { + fail error("", message = "error"); + } else { + i = 1; + } + } on fail { + } + _ = i; //error: variable 'i' may not have been initialized +} + function getErrorOrIntArr() returns int[]|error { return getError(); } From 2a356c593f481a5f16976a3ba60d8d0e7914757a Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Thu, 16 Mar 2023 16:20:45 +0530 Subject: [PATCH 14/67] Improve while dataflow analysis --- .../semantics/analyzer/DataflowAnalyzer.java | 61 +++--- .../statements/onfail/OnFailClauseTest.java | 9 + .../onfail/on-fail-clause-negative-v2.bal | 204 ++++++++++++++++++ 3 files changed, 245 insertions(+), 29 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java index cd4fff73bcb8..7431e595ea5d 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java @@ -891,38 +891,37 @@ public void visit(BLangQueryAction queryAction) { @Override public void visit(BLangWhile whileNode) { Map prevUninitializedVars = this.uninitializedVars; - createUninitializedVarsForOnFailClause(whileNode.onFailClause); - analyzeNode(whileNode.expr, env); - BranchResult whileResult = analyzeBranch(whileNode.body, env); - BType constCondition = ConditionResolver.checkConstCondition(types, symTable, whileNode.expr); - boolean onFailClauseAvailable = whileNode.onFailClause != null; - if (constCondition == symTable.falseType) { - this.uninitializedVars = prevUninitializedVars; - removeEnclosingOnFail(onFailClauseAvailable); - return; - } - BranchResult onFailResult = null; - if (onFailClauseAvailable) { - updateUnInitVarsForOnFailClause(whileResult.possibleFailureUnInitVars); - onFailResult = analyzeOnFailBranch(whileNode.onFailClause, whileResult); - } + analyzeNode(whileNode.expr, env); - if (constCondition == symTable.trueType) { - this.uninitializedVars = whileResult.uninitializedVars; - if (whileResult.possibleFailureUnInitVars != null) { - updateUnInitVarsForOnFailClause(whileResult.possibleFailureUnInitVars); - if (onFailClauseAvailable) { + BType constCondition = ConditionResolver.checkConstCondition(types, symTable, whileNode.expr); + boolean ifExprConst = constCondition == symTable.trueType; + boolean failuresSelfHandled = whileNode.onFailClause != null; + if (ifExprConst) { + //if the condition is always true, we don't have to consider it as a branch. + analyzeStmtWithOnFail(whileNode.body, whileNode.onFailClause); + } else { + createUninitializedVarsForOnFailClause(whileNode.onFailClause); + BranchResult whileResult = analyzeBranch(whileNode.body, env); + if (constCondition == symTable.falseType) { + //if the condition is always false, we can reset to the previous state. + this.uninitializedVars = prevUninitializedVars; + removeEnclosingOnFail(failuresSelfHandled); + return; + } + this.uninitializedVars = mergeUninitializedVars(this.uninitializedVars, whileResult.uninitializedVars); + if (failuresSelfHandled) { + BranchResult onfailResult = analyzeOnFailBranch(whileNode.onFailClause, whileResult); + if (whileResult.definiteFailureReached) { + this.uninitializedVars = onfailResult.uninitializedVars; + } else { this.uninitializedVars - = mergeUninitializedVars(whileResult.uninitializedVars, onFailResult.uninitializedVars); + = mergeUninitializedVars(this.uninitializedVars, onfailResult.uninitializedVars); } + updateEnclosingOnFailUnInits(this.uninitializedVars); + removeEnclosingOnFail(true); } - removeEnclosingOnFail(onFailClauseAvailable); - return; } - - this.uninitializedVars = mergeUninitializedVars(this.uninitializedVars, whileResult.uninitializedVars); - removeEnclosingOnFail(onFailClauseAvailable); } private void createUninitializedVarsForOnFailClause(BLangOnFailClause onFailClause) { @@ -981,13 +980,17 @@ private void analyzeStmtWithOnFail(BLangBlockStmt blockStmt, BLangOnFailClause o this.uninitializedVars = mergedUninitializedVars; } + updateEnclosingOnFailUnInits(mergedUninitializedVars); + removeEnclosingOnFail(true); + } + + private void updateEnclosingOnFailUnInits(Map possibleUninitializedVars) { // Update the enclosing on-fail clause's possible failure uninitialized variables int enclosingOnFailSize = this.enclosingOnFailClause.size(); if (enclosingOnFailSize > 1) { BLangOnFailClause enclosingOnFail = this.enclosingOnFailClause.get(enclosingOnFailSize - 2); - this.possibleFailureUnInitVars.put(enclosingOnFail, mergedUninitializedVars); + this.possibleFailureUnInitVars.put(enclosingOnFail, possibleUninitializedVars); } - this.possibleFailureUnInitVars.remove(this.enclosingOnFailClause.pop()); } private BranchResult analyzeOnFailBranch(BLangOnFailClause onFailClause, BranchResult doResult) { @@ -2430,7 +2433,7 @@ public void visit(BLangRegExpTemplateLiteral regExpTemplateLiteral) { */ private BranchResult analyzeBranch(BLangNode node, SymbolEnv env) { Map prevUninitializedVars = this.uninitializedVars; - Map prevOnFailUninitializedVars = null; + Map prevOnFailUninitializedVars = getPossibleFailureUnInitVars(); if (node != null && isOnFailEnclosed()) { BLangOnFailClause onFailClause = this.enclosingOnFailClause.peek(); prevOnFailUninitializedVars = this.possibleFailureUnInitVars.get(onFailClause); diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java index 57f891e3d793..8371dff1ad6a 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java @@ -118,6 +118,15 @@ public void testOnFailClauseNegativeCaseV2() { BAssertUtil.validateError(negativeResult, i++, "variable 'i' may not have been initialized", 799, 9); BAssertUtil.validateError(negativeResult, i++, "variable 'i' may not have been initialized", 812, 9); BAssertUtil.validateError(negativeResult, i++, "variable 'i' may not have been initialized", 840, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 851, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 863, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 886, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 898, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 910, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 951, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 981, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 1013, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 1044, 9); Assert.assertEquals(negativeResult.getErrorCount(), i); } diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal b/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal index 7cccb8c58e65..1514ce3eab21 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal @@ -840,6 +840,210 @@ function testUnInitVars44(boolean bool) { _ = i; //error: variable 'i' may not have been initialized } +function testUnInitVars45(int count) { + int i = 0; + int j; + while count > i { + check getErrorOrNil(); + j = i; + } on fail { + } + _ = j; //error: variable 'j' may not have been initialized +} + +function testUnInitVars46(int count) { + int i = 0; + int j; + while count > i { + check getErrorOrNil(); + j = i; + } on fail { + j = 1; + } + _ = j; //error: variable 'j' may not have been initialized +} + +function testUnInitVars47() { + int i = 0; + int j; + while true { + check getErrorOrNil(); + j = i; + } on fail { + j = 1; + } + _ = j; //no compile error +} + +function testUnInitVars48() { + int i = 0; + int j; + while true { + check getErrorOrNil(); + j = i; + } on fail { + } + _ = j; //error: variable 'j' may not have been initialized +} + +function testUnInitVars49() { + int i = 0; + int j; + while true { + check getErrorOrNil(); + j = i; + return; + } on fail { + } + _ = j; //error: variable 'j' may not have been initialized +} + +function testUnInitVars50() { + int i = 0; + int j; + while true { + check getErrorOrNil(); + j = i; + return; + } on fail { + } + _ = j; //error: variable 'j' may not have been initialized +} + +function testUnInitVars51() { + int i = 0; + int j; + while true { + check getErrorOrNil(); + j = i; + return; + } on fail { + j = 1; + } + _ = j; //no compilation error +} + +function testUnInitVars52(boolean bool) { + int i = 0; + int j; + while bool { + check getErrorOrNil(); + j = i; + return; + } on fail { + j = 1; + } + _ = j; //no compilation error +} + +function testUnInitVars53(boolean bool) { + int i = 0; + int j; + do { + while bool { + check getErrorOrNil(); + j = i; + } on fail { + j = 1; + } + } on fail { + } + _ = j; //error: variable 'j' may not have been initialized +} + +function testUnInitVars54() { + int i = 0; + int j; + do { + while true { + check getErrorOrNil(); + j = i; + } on fail { + j = 1; + } + } on fail { + } + _ = j; //no compilation error +} + +function testUnInitVars55() { + int i = 0; + int j; + do { + while true { + check getErrorOrNil(); + j = i; + } on fail error e { + fail e; + } + } on fail { + } + _ = j; //error: variable 'j' may not have been initialized +} + +function testUnInitVars56() { + int i = 0; + int j; + do { + while true { + check getErrorOrNil(); + j = i; + } on fail error e { + fail e; + } + } on fail { + j = 1; + } + _ = j; //no compilation error +} + +function testUnInitVars57(boolean bool) { + int i = 0; + int j; + do { + while bool { + check getErrorOrNil(); + j = i; + } on fail error e { + fail e; + } + } on fail { + j = 1; + } + _ = j; //error: variable 'j' may not have been initialized +} + +function testUnInitVars58() { + int i = 0; + int j; + do { + foreach int _ in [1] { + check getErrorOrNil(); + j = i; + } on fail error e { + fail e; + } + } on fail { + j = 1; + } + _ = j; //no compilation error +} + +function testUnInitVars59() { + int i = 0; + int j; + do { + foreach int _ in [1] { + check getErrorOrNil(); + j = i; + } on fail { + } + } on fail { + j = 1; + } + _ = j; //error: variable 'j' may not have been initialized +} + function getErrorOrIntArr() returns int[]|error { return getError(); } From 49d7ce088d28c63af7359d252d7a2bd7d7bb1099 Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Fri, 17 Mar 2023 00:08:18 +0530 Subject: [PATCH 15/67] Add destructuring tests --- .../statements/onfail/OnFailClauseTest.java | 4 ++ .../onfail/on-fail-clause-negative-v2.bal | 45 +++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java index 8371dff1ad6a..8b375ed37c07 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java @@ -127,6 +127,10 @@ public void testOnFailClauseNegativeCaseV2() { BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 981, 9); BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 1013, 9); BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 1044, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'i' may not have been initialized", 1055, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 1056, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'i' may not have been initialized", 1071, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 1072, 9); Assert.assertEquals(negativeResult.getErrorCount(), i); } diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal b/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal index 1514ce3eab21..aefb215b6684 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal @@ -1044,6 +1044,51 @@ function testUnInitVars59() { _ = j; //error: variable 'j' may not have been initialized } +function testUnInitVars60() { + int i; + int j; + do { + check getErrorOrNil(); + [i, j] = [1, 2]; + } on fail { + } + _ = i; //error: variable 'i' may not have been initialized + _ = j; //error: variable 'j' may not have been initialized +} + +function testUnInitVars61() { + int i; + int j; + do { + foreach int _ in [1] { + check getErrorOrNil(); + [i, j] = [1, 2]; + } on fail { + } + } on fail { + [i, j] = [1, 2]; + } + _ = i; //error: variable 'i' may not have been initialized + _ = j; //error: variable 'j' may not have been initialized +} + +function testUnInitVars62() { + int i; + int j; + do { + foreach int _ in [1] { + check getErrorOrNil(); + [i, j] = [1, 2]; + } on fail error e { + fail e; + } + } on fail { + [i, j] = [1, 2]; + } + _ = i; //no compilation error + _ = j; //no compilation error +} + function getErrorOrIntArr() returns int[]|error { return getError(); } From 9ee1072d913d048e02f225069254f6696e575393 Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Fri, 17 Mar 2023 18:43:44 +0530 Subject: [PATCH 16/67] Add possible un-init after if --- .../semantics/analyzer/DataflowAnalyzer.java | 1 + .../statements/onfail/OnFailClauseTest.java | 1 + .../onfail/on-fail-clause-negative-v2.bal | 27 +++++++++++++++++++ 3 files changed, 29 insertions(+) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java index 7431e595ea5d..f209be60b0dc 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java @@ -784,6 +784,7 @@ public void visit(BLangIf ifNode) { // only the results of the 'else' block matters. if (ifResult.flowTerminated) { this.uninitializedVars = elseResult.uninitializedVars; + this.possibleFailureReached = ifResult.possibleFailureReached; if (ifExprConst) { this.flowTerminated = true; this.definiteFailureReached = ifResult.definiteFailureReached; diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java index 8b375ed37c07..08bce7c5a89c 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java @@ -131,6 +131,7 @@ public void testOnFailClauseNegativeCaseV2() { BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 1056, 9); BAssertUtil.validateError(negativeResult, i++, "variable 'i' may not have been initialized", 1071, 9); BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 1072, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 1102, 9); Assert.assertEquals(negativeResult.getErrorCount(), i); } diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal b/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal index aefb215b6684..a95fc040404d 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal @@ -1089,6 +1089,33 @@ function testUnInitVars62() { _ = j; //no compilation error } +public function testUnInitVars63() returns error? { + int i; + do { + error? e = getError(); + if e is error { + fail e; + } + i = 1; + } on fail { + } + _ = i; //error: variable 'i' may not have been initialized +} + +public function testUnInitVars64() returns error? { + int i; + do { + error? e = getError(); + if e is error { + fail e; + } + i = 1; + } on fail { + i = -1; + } + _ = i; //error: variable 'i' may not have been initialized +} + function getErrorOrIntArr() returns int[]|error { return getError(); } From 83b5bfc67c04c13aaa7beefd4bb4beb4a50ff901 Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Fri, 17 Mar 2023 19:37:28 +0530 Subject: [PATCH 17/67] Fix test failure --- .../ballerinalang/test/statements/onfail/OnFailClauseTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java index 08bce7c5a89c..03c1c6262aff 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java @@ -131,7 +131,7 @@ public void testOnFailClauseNegativeCaseV2() { BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 1056, 9); BAssertUtil.validateError(negativeResult, i++, "variable 'i' may not have been initialized", 1071, 9); BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 1072, 9); - BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 1102, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'i' may not have been initialized", 1102, 9); Assert.assertEquals(negativeResult.getErrorCount(), i); } From 572ae982b6ae5e6112f8b0b2445c1e524c2a4f54 Mon Sep 17 00:00:00 2001 From: ushirask Date: Wed, 22 Mar 2023 14:35:14 +0530 Subject: [PATCH 18/67] Refactor function name --- .../compiler/desugar/Desugar.java | 2 +- .../semantics/analyzer/TypeChecker.java | 8 ++++---- .../compiler/semantics/analyzer/Types.java | 2 +- .../expressions/access/FieldAccessTest.java | 6 ++++++ .../access/field_access_negative.bal | 19 ++++++++++++++++++- 5 files changed, 30 insertions(+), 7 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/desugar/Desugar.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/desugar/Desugar.java index ddbb77c0bfe0..139f9d3d4f86 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/desugar/Desugar.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/desugar/Desugar.java @@ -6080,7 +6080,7 @@ private void rewriteFieldBasedAccess(BLangFieldBasedAccess fieldAccessExpr) { targetVarRef = new BLangStructFieldAccessExpr(fieldAccessExpr.pos, fieldAccessExpr.expr, stringLit, (BVarSymbol) fieldAccessExpr.symbol, false, fieldAccessExpr.isStoreOnCreation); } - } else if (types.isLax(refType)) { + } else if (types.isLaxFieldAccessAllowed(refType)) { if (!(refType.tag == TypeTags.XML || refType.tag == TypeTags.XML_ELEMENT)) { if (refType.tag == TypeTags.MAP && TypeTags.isXMLTypeTag(((BMapType) refType).constraint.tag)) { result = rewriteExpr(rewriteLaxMapAccess(fieldAccessExpr)); diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/TypeChecker.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/TypeChecker.java index 52d4ec25a07f..b460ef1ebd46 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/TypeChecker.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/TypeChecker.java @@ -6797,7 +6797,7 @@ private void rewriteWithEnsureTypeFunc(BLangCheckedExpr checkedExpr, BType type, rhsType = getCandidateType(checkedExpr, rhsType, data); } BType candidateLaxType = getCandidateLaxType(checkedExpr.expr, rhsType); - if (!types.isLax(candidateLaxType)) { + if (!types.isLaxFieldAccessAllowed(candidateLaxType)) { return; } ArrayList argExprs = new ArrayList<>(); @@ -8834,7 +8834,7 @@ private BType checkFieldAccessExpr(BLangFieldBasedAccess fieldAccessExpr, BType fieldName, varRefType.getKind() == TypeKind.UNION ? "union" : varRefType.getKind().typeName(), varRefType); } - } else if (types.isLax(varRefType)) { + } else if (types.isLaxFieldAccessAllowed(varRefType)) { if (fieldAccessExpr.isLValue) { dlog.error(fieldAccessExpr.pos, DiagnosticErrorCode.OPERATION_DOES_NOT_SUPPORT_FIELD_ACCESS_FOR_ASSIGNMENT, @@ -8892,7 +8892,7 @@ private void resolveXMLNamespace(BLangFieldBasedAccess.BLangNSPrefixedFieldBased } private boolean hasLaxOriginalType(BLangFieldBasedAccess fieldBasedAccess) { - return fieldBasedAccess.originalType != null && types.isLax(fieldBasedAccess.originalType); + return fieldBasedAccess.originalType != null && types.isLaxFieldAccessAllowed(fieldBasedAccess.originalType); } private BType getLaxFieldAccessType(BType exprType) { @@ -8956,7 +8956,7 @@ private BType checkOptionalFieldAccessExpr(BLangFieldBasedAccess fieldAccessExpr fieldAccessExpr.nilSafeNavigation = nillableExprType; fieldAccessExpr.originalType = fieldAccessExpr.leafNode || !nillableExprType ? actualType : types.getTypeWithoutNil(actualType); - } else if (types.isLax(effectiveType)) { + } else if (types.isLaxFieldAccessAllowed(effectiveType)) { BType laxFieldAccessType = getLaxFieldAccessType(effectiveType); actualType = accessCouldResultInError(effectiveType) ? BUnionType.create(null, laxFieldAccessType, symTable.errorType) : laxFieldAccessType; diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java index be8f232e3e8c..344cdd924fe8 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java @@ -272,7 +272,7 @@ public BType checkType(Location pos, return symTable.semanticError; } - public boolean isLax(BType type) { + public boolean isLaxFieldAccessAllowed(BType type) { Set visited = new HashSet<>(); int result = isLaxType(type, visited); if (result == 1 || type.tag == TypeTags.XML || type.tag == TypeTags.XML_ELEMENT) { diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/expressions/access/FieldAccessTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/expressions/access/FieldAccessTest.java index 08bb5c5a6a27..97bb3730314d 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/expressions/access/FieldAccessTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/expressions/access/FieldAccessTest.java @@ -140,6 +140,12 @@ public void testNegativeCases() { "expression", 377, 15); validateError(negativeResult, i++, "invalid operation: type 'map' does not support field access" , 382, 19); + validateError(negativeResult, i++, "invalid operation: type 'map' does not support field access" + , 387, 19); + validateError(negativeResult, i++, "invalid operation: type 'map' does not support field access" + , 393, 19); + validateError(negativeResult, i++, "invalid operation: type 'map<(xml|json)>' does not support field access" + , 399, 24); Assert.assertEquals(negativeResult.getErrorCount(), i); } diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access_negative.bal b/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access_negative.bal index 73c34da3af2d..19d6e119d70f 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access_negative.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access_negative.bal @@ -377,7 +377,24 @@ function testInvalidBoundMethodAccessWithRemoteMethod(ServiceClass a, _ = e.ser.fn; } -function testInvalidXMLMapFieldAccess() { +function testInvalidXMLMapFieldAccess1() { map m = {a: xml `foo`}; xml x = check m.a; // error } + +function testInvalidXMLMapFieldAccess2() { + map m = {a: xml `foo`}; + xml x = check m.b; // error +} + +function testInvalidXMLMapFieldAccess3() { + map m = {}; + m["a"] = xml `foo`; + xml x = check m.a; // error +} + +function testInvalidXMLMapFieldAccess4() { + map m = {}; + m["a"] = xml `foo`; + xml|json x = check m.a; // error +} From 922beb94220b465da2bb7b2b4220b6c7372ee77e Mon Sep 17 00:00:00 2001 From: ushirask Date: Fri, 31 Mar 2023 12:41:11 +0530 Subject: [PATCH 19/67] Fix test cases --- .../test-src/expressions/access/field_access_negative.bal | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access_negative.bal b/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access_negative.bal index 19d6e119d70f..bf4718b37087 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access_negative.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access_negative.bal @@ -377,23 +377,23 @@ function testInvalidBoundMethodAccessWithRemoteMethod(ServiceClass a, _ = e.ser.fn; } -function testInvalidXMLMapFieldAccess1() { +function testInvalidXMLMapFieldAccess1() returns error? { map m = {a: xml `foo`}; xml x = check m.a; // error } -function testInvalidXMLMapFieldAccess2() { +function testInvalidXMLMapFieldAccess2() returns error? { map m = {a: xml `foo`}; xml x = check m.b; // error } -function testInvalidXMLMapFieldAccess3() { +function testInvalidXMLMapFieldAccess3() returns error? { map m = {}; m["a"] = xml `foo`; xml x = check m.a; // error } -function testInvalidXMLMapFieldAccess4() { +function testInvalidXMLMapFieldAccess4() returns error? { map m = {}; m["a"] = xml `foo`; xml|json x = check m.a; // error From a6538fc821a7a3e2f94e46577453e4c3af42e7d4 Mon Sep 17 00:00:00 2001 From: Dulaj Date: Wed, 31 May 2023 06:29:09 +0530 Subject: [PATCH 20/67] Fix no warning in deprecated field-name --- .../semantics/analyzer/CodeAnalyzer.java | 51 ++++++++++++++++++- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java index 4b2d41e23a0a..e8722bd61668 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java @@ -31,6 +31,7 @@ import org.ballerinalang.model.tree.expressions.XMLNavigationAccess; import org.ballerinalang.model.tree.statements.StatementNode; import org.ballerinalang.model.tree.statements.VariableDefinitionNode; +import org.ballerinalang.model.types.TypeKind; import org.ballerinalang.util.diagnostic.DiagnosticErrorCode; import org.ballerinalang.util.diagnostic.DiagnosticHintCode; import org.ballerinalang.util.diagnostic.DiagnosticWarningCode; @@ -2228,11 +2229,57 @@ public void visit(BLangRecordLiteral recordLiteral, AnalyzerData data) { for (RecordLiteralNode.RecordField field : fields) { if (field.isKeyValueField()) { + BVarSymbol fieldSymbol = ((BLangRecordKeyValueField) field).key.fieldSymbol; + analyzeExpr(((BLangRecordKeyValueField) field).valueExpr, data); + + if (fieldSymbol != null && Symbols.isFlagOn(fieldSymbol.flags, Flags.DEPRECATED)) { + String deprecatedConstruct = generateDeprecatedConstructString(recordLiteral, + fieldSymbol.toString(), fieldSymbol); + dlog.warning(((BLangRecordKeyValueField) field).pos, + DiagnosticWarningCode.USAGE_OF_DEPRECATED_CONSTRUCT, deprecatedConstruct); + } } else if (field.getKind() == NodeKind.SIMPLE_VARIABLE_REF) { - analyzeExpr((BLangRecordLiteral.BLangRecordVarNameField) field, data); + BLangRecordLiteral.BLangRecordVarNameField recField + = (BLangRecordLiteral.BLangRecordVarNameField) field; + analyzeExpr(recField, data); + + if (recordLiteral.getBType().tsymbol != null + && recordLiteral.getBType().tsymbol.type.getKind() == TypeKind.RECORD) { + + BRecordType recordType = (BRecordType) recordLiteral.getBType().tsymbol.type; + BField matchingField = recordType.getFields().get(recField.symbol.getName().getValue()); + + if (matchingField != null && Symbols.isFlagOn(matchingField.symbol.flags, Flags.DEPRECATED)) { + String deprecatedConstruct = generateDeprecatedConstructString(recordLiteral, + matchingField.name.getValue(), matchingField.symbol); + dlog.warning(((BLangRecordLiteral.BLangRecordVarNameField) field).pos, + DiagnosticWarningCode.USAGE_OF_DEPRECATED_CONSTRUCT, deprecatedConstruct); + } + } } else { - analyzeExpr(((BLangRecordLiteral.BLangRecordSpreadOperatorField) field).expr, data); + BLangRecordLiteral.BLangRecordSpreadOperatorField spreadField + = (BLangRecordLiteral.BLangRecordSpreadOperatorField) field; + analyzeExpr(spreadField.expr, data); + + BType spreadFieldType = Types.getReferredType(spreadField.expr.getBType()); + BType contextType = Types.getReferredType(recordLiteral.getBType()); + + if (spreadFieldType != null && spreadFieldType.getKind() == TypeKind.RECORD + && contextType.getKind() == TypeKind.RECORD) { + for (BField fieldEntry: ((BRecordType) spreadFieldType).getFields().values()) { + BRecordType recordType = (BRecordType) contextType; + BField matchingField = recordType.getFields().get(fieldEntry.getName().getValue()); + + if (matchingField != null && Symbols.isFlagOn(matchingField.symbol.flags, Flags.DEPRECATED)) { + String deprecatedConstruct = generateDeprecatedConstructString(recordLiteral, + matchingField.name.getValue(), matchingField.symbol); + dlog.warning(spreadField.expr.pos, + DiagnosticWarningCode.USAGE_OF_DEPRECATED_CONSTRUCT, deprecatedConstruct); + } + } + } + } } From 5ca75c720a38269f26e6b356036d9d76dd375e12 Mon Sep 17 00:00:00 2001 From: Dulaj Date: Wed, 31 May 2023 06:29:31 +0530 Subject: [PATCH 21/67] Add tests --- .../test/annotations/DeprecationAnnotationTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java index 9118b6c9c291..48702359603b 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java @@ -86,15 +86,25 @@ public void testDeprecationAnnotation() { BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Person.name' is deprecated", 287, 16); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Person.getName' is deprecated", 288, 16); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'myFunction' is deprecated", 298, 5); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee.name' is deprecated", 316, 26); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee.job' is deprecated", 316, 49); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Job.experiance' is deprecated", 316, 68); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee.name' is deprecated", 317, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee.job' is deprecated", 319, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee.job' is deprecated", 320, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee.job' is deprecated", 321, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Job.experiance' is deprecated", 321, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee2.name' is deprecated", 343, 28); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee2.job' is deprecated", 343, 51); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Job.experiance' is deprecated", 343, 70); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee2.name' is deprecated", 344, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee2.job' is deprecated", 346, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'name' is deprecated", 354, 17); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'name' is deprecated", 357, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'name' is deprecated", 370, 17); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'name' is deprecated", 373, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee5.address' is deprecated", + 393, 28); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee5.address' is deprecated", 394, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee5.address' is deprecated", From 9d1530cc39e99e71202bbf38b7d488ca8689ef5c Mon Sep 17 00:00:00 2001 From: Dulaj Date: Tue, 6 Jun 2023 10:20:54 +0530 Subject: [PATCH 22/67] Fix naming grammar --- .../test/annotations/DeprecationAnnotationTest.java | 6 +++--- .../test-src/annotations/deprecation_annotation.bal | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java index 48702359603b..034e974debf8 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java @@ -88,15 +88,15 @@ public void testDeprecationAnnotation() { BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'myFunction' is deprecated", 298, 5); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee.name' is deprecated", 316, 26); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee.job' is deprecated", 316, 49); - BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Job.experiance' is deprecated", 316, 68); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Job.experience' is deprecated", 316, 68); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee.name' is deprecated", 317, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee.job' is deprecated", 319, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee.job' is deprecated", 320, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee.job' is deprecated", 321, 9); - BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Job.experiance' is deprecated", 321, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Job.experience' is deprecated", 321, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee2.name' is deprecated", 343, 28); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee2.job' is deprecated", 343, 51); - BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Job.experiance' is deprecated", 343, 70); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Job.experience' is deprecated", 343, 70); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee2.name' is deprecated", 344, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee2.job' is deprecated", 346, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'name' is deprecated", 354, 17); diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal b/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal index da78250773c1..fdf6aed0999a 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal @@ -309,16 +309,16 @@ type Employee record {| type Job record {| string title; @deprecated - int experiance; + int experience; |}; public function testDeprecatedRecordFields() { - Employee employee = {name: "John", id: 112, job: {title: "SE", experiance: 2}}; + Employee employee = {name: "John", id: 112, job: {title: "SE", experience: 2}}; _ = employee.name; // warning _ = employee.id; _ = employee.job; // warning _ = employee.job.title; // warning - _ = employee.job.experiance; // warning + _ = employee.job.experience; // warning } # Employee2 record @@ -340,7 +340,7 @@ type Employee2 record {| |}; public function testDeprecatedRecordFieldsWithDocumentation() { - Employee2 employee2 = {name: "John", id: 112, job: {title: "SE", experiance: 2}}; + Employee2 employee2 = {name: "John", id: 112, job: {title: "SE", experience: 2}}; _ = employee2.name; // warning _ = employee2.id; _ = employee2.job; // warning From c1aae3e6fbcf54345425daf670e535577b7adaf7 Mon Sep 17 00:00:00 2001 From: Dulaj Date: Tue, 6 Jun 2023 10:42:27 +0530 Subject: [PATCH 23/67] Add more tests --- .../test/annotations/DeprecationAnnotationTest.java | 4 ++++ .../test-src/annotations/deprecation_annotation.bal | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java index 034e974debf8..8506c91500dd 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java @@ -110,6 +110,10 @@ public void testDeprecationAnnotation() { BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee5.address' is deprecated", 395, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'line02' is deprecated", 395, 9); + BAssertUtil.validateWarning(compileResult, i++, "unused variable 'job1'", 400, 5); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Job.experience' is deprecated", 400, 30); + BAssertUtil.validateWarning(compileResult, i++, "unused variable 'job2'", 403, 5); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Job.experience' is deprecated", 403, 33); Assert.assertEquals(compileResult.getWarnCount(), i); } diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal b/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal index fdf6aed0999a..a7becc596c7b 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal @@ -394,3 +394,11 @@ public function testDeprecatedAnonStructAsStructField() { _ = employee5.address; // warning _ = employee5.address.line02; // warning } + +public function testDeprecatedAnonRecordFieldWithVarRef() { + int experience = 2; + Job job1 = {title: "SE", experience}; // warning + + var details = {experience: 1}; + Job job2 = {title: "SE", ...details}; // warning +} From 9585a240bc67b9f34f7f5caff2a586e68c947e00 Mon Sep 17 00:00:00 2001 From: Dulaj Date: Tue, 4 Jul 2023 07:37:36 +0530 Subject: [PATCH 24/67] Improve tests --- .../DeprecationAnnotationTest.java | 11 +++-- .../annotations/deprecation_annotation.bal | 41 +++++++++++++++++-- 2 files changed, 44 insertions(+), 8 deletions(-) diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java index 8506c91500dd..04833ef6b10f 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java @@ -110,10 +110,13 @@ public void testDeprecationAnnotation() { BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Employee5.address' is deprecated", 395, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'line02' is deprecated", 395, 9); - BAssertUtil.validateWarning(compileResult, i++, "unused variable 'job1'", 400, 5); - BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Job.experience' is deprecated", 400, 30); - BAssertUtil.validateWarning(compileResult, i++, "unused variable 'job2'", 403, 5); - BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Job.experience' is deprecated", 403, 33); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Job.experience' is deprecated", 414, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Job.experience' is deprecated", 420, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Job.experience' is deprecated", 426, 12); + + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Company.name' is deprecated", 433, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Company.city' is deprecated", 434, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Company.country' is deprecated", 435, 12); Assert.assertEquals(compileResult.getWarnCount(), i); } diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal b/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal index a7becc596c7b..68e00c7316c8 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal @@ -395,10 +395,43 @@ public function testDeprecatedAnonStructAsStructField() { _ = employee5.address.line02; // warning } -public function testDeprecatedAnonRecordFieldWithVarRef() { +type Company record { + int companyId; + + @deprecated + string name; + + @deprecated + string city; + + @deprecated + string country; +}; + +public function testDeprecatedAnonRecordFieldInInitialization() { + Job _ = { + title: "SE", + experience: 1 // warning + }; + int experience = 2; - Job job1 = {title: "SE", experience}; // warning + Job _ = { + title: "SE", + experience // warning + }; - var details = {experience: 1}; - Job job2 = {title: "SE", ...details}; // warning + var details = {experience: 2}; + Job _ = { + title: "SE", + ...details // warning + }; + + string city = "Berlin"; + var companyDetails = {country: "Germany"}; + Company _ = { + companyId: 1, + name: "Foo", // warning + city: city, // warning + ...companyDetails // warning + }; } From c04ac71595817df1c50e9348423b08d35d1b873a Mon Sep 17 00:00:00 2001 From: MaryamZi Date: Thu, 6 Jul 2023 09:40:11 +0530 Subject: [PATCH 25/67] Fix typing with optional fields and open records --- .../io/ballerina/runtime/internal/TypeChecker.java | 12 ++++++++++++ .../compiler/semantics/analyzer/Types.java | 5 +++++ .../test/types/never/NeverTypeTest.java | 10 ++++++---- .../test-src/types/never/never-type-negative.bal | 3 +++ .../test-src/types/never/never_type_runtime.bal | 7 ++----- 5 files changed, 28 insertions(+), 9 deletions(-) diff --git a/bvm/ballerina-runtime/src/main/java/io/ballerina/runtime/internal/TypeChecker.java b/bvm/ballerina-runtime/src/main/java/io/ballerina/runtime/internal/TypeChecker.java index 0881a70cc5d7..4fa0cde4d6ec 100644 --- a/bvm/ballerina-runtime/src/main/java/io/ballerina/runtime/internal/TypeChecker.java +++ b/bvm/ballerina-runtime/src/main/java/io/ballerina/runtime/internal/TypeChecker.java @@ -1152,6 +1152,12 @@ private static boolean checkIsRecordType(BRecordType sourceRecordType, BRecordTy if (!SymbolFlags.isFlagOn(targetField.getFlags(), SymbolFlags.OPTIONAL)) { return false; } + + if (!sourceRecordType.sealed && !checkIsType(sourceRecordType.restFieldType, targetField.getFieldType(), + unresolvedTypes)) { + return false; + } + continue; } @@ -1313,6 +1319,12 @@ private static boolean checkIsRecordType(MapValue sourceRecordValue, BRecordType if (!SymbolFlags.isFlagOn(targetField.getFlags(), SymbolFlags.OPTIONAL)) { return false; } + + if (!sourceRecordType.sealed && !checkIsType(sourceRecordType.restFieldType, targetField.getFieldType(), + unresolvedTypes)) { + return false; + } + continue; } diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java index c24a3ec6a61b..05f3c7b25f13 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java @@ -3502,6 +3502,11 @@ private boolean checkFieldEquivalency(BRecordType lhsType, BRecordType rhsType, if (!Symbols.isOptional(lhsField.symbol) || isInvalidNeverField(lhsField, rhsType)) { return false; } + + if (!rhsType.sealed && !isAssignable(rhsType.restFieldType, lhsField.type, unresolvedTypes)) { + return false; + } + continue; } if (hasIncompatibleReadOnlyFlags(lhsField.symbol.flags, rhsField.symbol.flags)) { diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/types/never/NeverTypeTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/types/never/NeverTypeTest.java index 2aff89049805..82d4baf52344 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/types/never/NeverTypeTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/types/never/NeverTypeTest.java @@ -209,14 +209,16 @@ public void testNeverTypeNegative() { "'record {| |} & readonly', found 'record {| int x; never?...; |}'", 258, 25); BAssertUtil.validateError(negativeCompileResult, i++, "incompatible types: expected " + "'record {| int x; never...; |}', found 'record {| |} & readonly'", 261, 41); + BAssertUtil.validateError(negativeCompileResult, i++, "incompatible types: expected 'record {| never i?; " + + "anydata...; |}', found 'record {| never?...; |}'", 264, 28); BAssertUtil.validateError(negativeCompileResult, i++, "cannot define a variable of type 'never' or " + - "equivalent to type 'never'", 264, 1); + "equivalent to type 'never'", 267, 1); BAssertUtil.validateError(negativeCompileResult, i++, "cannot define a variable of type 'never' or " + - "equivalent to type 'never'", 267, 5); + "equivalent to type 'never'", 270, 5); BAssertUtil.validateError(negativeCompileResult, i++, "cannot define a variable of type 'never' or " + - "equivalent to type 'never'", 268, 5); + "equivalent to type 'never'", 271, 5); BAssertUtil.validateError(negativeCompileResult, i++, "cannot define a variable of type 'never' or " + - "equivalent to type 'never'", 272, 1); + "equivalent to type 'never'", 275, 1); Assert.assertEquals(negativeCompileResult.getErrorCount(), i); } diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/types/never/never-type-negative.bal b/tests/jballerina-unit-test/src/test/resources/test-src/types/never/never-type-negative.bal index 362830ddc35b..9d548c01e552 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/types/never/never-type-negative.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/types/never/never-type-negative.bal @@ -259,6 +259,9 @@ function testNeverRestFieldType() { record {||} a3 = {}; record {|int x;never...; |} copy4 = a3; + + record {|never?...; |} a4 = {}; + record {never i?;} _ = a4; } never N = check error("Error"); // error diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/types/never/never_type_runtime.bal b/tests/jballerina-unit-test/src/test/resources/test-src/types/never/never_type_runtime.bal index 8e0d703da520..645ac4b21f79 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/types/never/never_type_runtime.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/types/never/never_type_runtime.bal @@ -160,7 +160,8 @@ function testNeverFieldTypeCheck() { assertEquality(true, r7 is record {never x?;}); record {|never?...; |} r8 = {}; - assertEquality(true, r8 is record {never x?;}); + assertEquality(false, r8 is record {never x?;}); + assertEquality(true, r8 is record {never? x?;}); record {|int?...; |} r9 = {}; assertEquality(false, r9 is record {never x?;}); @@ -191,10 +192,6 @@ function testNeverFieldTypeCheck() { record {never i?;} y1 = x1; assertEquality(true, y1 is record {|never...; |}); - record {|never?...; |} x2 = {}; - record {never i?;} y2 = x2; - assertEquality(true, y2 is record {|never?...; |}); - record {||} x3 = {}; record {never i?;} y3 = x3; assertEquality(true, y3 is record {||}); From 4d86338a2ee3d2d8640e9538c426d2eb8d8de80c Mon Sep 17 00:00:00 2001 From: MaryamZi Date: Mon, 10 Jul 2023 11:00:08 +0530 Subject: [PATCH 26/67] Add tests --- .../test/record/RecordAssignabilityTest.java | 50 ++++++-- .../test-src/record/record_assignability.bal | 116 ++++++++++++++++++ .../record/record_assignability_negative.bal | 28 +++++ 3 files changed, 181 insertions(+), 13 deletions(-) create mode 100644 tests/jballerina-unit-test/src/test/resources/test-src/record/record_assignability.bal diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/record/RecordAssignabilityTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/record/RecordAssignabilityTest.java index 1e52e6487b59..4a49dff81991 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/record/RecordAssignabilityTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/record/RecordAssignabilityTest.java @@ -17,11 +17,13 @@ */ package org.ballerinalang.test.record; -import org.ballerinalang.test.BAssertUtil; import org.ballerinalang.test.BCompileUtil; +import org.ballerinalang.test.BRunUtil; import org.ballerinalang.test.CompileResult; +import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +import static org.ballerinalang.test.BAssertUtil.validateError; import static org.testng.Assert.assertEquals; /** @@ -29,46 +31,68 @@ */ public class RecordAssignabilityTest { + private final CompileResult result = BCompileUtil.compile("test-src/record/record_assignability.bal"); + + @DataProvider + public static Object[] recordAssignabilityTestFunctions() { + return new String[]{ + "testOpenRecordToRecordWithOptionalFieldTypingRuntimeNegative", + "testRecordToRecordWithOptionalFieldTypingRuntimePositive" + }; + } + + @Test(dataProvider = "recordAssignabilityTestFunctions") + public void testRecordAssignability(String testFunction) { + BRunUtil.invoke(result, testFunction); + } + @Test public void testRecordAssignabilityNegative() { CompileResult negativeResult = BCompileUtil.compile("test-src/record/record_assignability_negative.bal"); int i = 0; - BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected " + + validateError(negativeResult, i++, "incompatible types: expected " + "'record {| (int|string|boolean) a; (int|string) b; anydata...; |}'," + " found 'record {| (int|string|boolean) a; (int|boolean) b; anydata...; |}'", 19, 55); - BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected " + + validateError(negativeResult, i++, "incompatible types: expected " + "'record {| (int|string|boolean) a; (int|string) b; anydata...; |}'," + " found 'record {| (int|string|boolean) a; (int|boolean) b; anydata...; |}'", 20, 54); - BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected " + + validateError(negativeResult, i++, "incompatible types: expected " + "'(boolean|string|int|record {| (boolean|int) b; anydata...; |})'," + " found '(boolean|string|int|record {| (boolean|string) b; anydata...; |})'", 23, 53); - BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected " + + validateError(negativeResult, i++, "incompatible types: expected " + "'(boolean|string|int|record {| (boolean|int) b; anydata...; |})'," + " found '(boolean|string|int|record {| (boolean|string) b; anydata...; |})'", 24, 52); - BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected " + + validateError(negativeResult, i++, "incompatible types: expected " + "'record {| (int|string|boolean) a; (int|string) b; |}'," + " found 'record {| (int|string|boolean) a; (int|boolean) b; |}'", 29, 57); - BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected " + + validateError(negativeResult, i++, "incompatible types: expected " + "'record {| (int|string|boolean) a; (int|string) b; |}'," + " found 'record {| (int|string|boolean) a; (int|boolean) b; |}'", 30, 56); - BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected " + + validateError(negativeResult, i++, "incompatible types: expected " + "'record {| (int|string|boolean) a; (int|string)...; |}'," + " found 'record {| (int|string|boolean) a; (int|boolean)...; |}'", 33, 58); - BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected " + + validateError(negativeResult, i++, "incompatible types: expected " + "'record {| (int|string|boolean) a; (int|string)...; |}'," + " found 'record {| (int|string|boolean) a; (int|boolean)...; |}'", 34, 57); - BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected " + + validateError(negativeResult, i++, "incompatible types: expected " + "'record {| (int|string|boolean) a; (int|string) b; (int|string)...; |}'," + " found 'record {| (int|string|boolean) a; (int|boolean) b; (int|boolean)...; |}'", 37, 72); - BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected " + + validateError(negativeResult, i++, "incompatible types: expected " + "'record {| (int|string|boolean) a; (int|string) b; (int|string)...; |}'," + " found 'record {| (int|string|boolean) a; (int|boolean) b; (int|boolean)...; |}'", 38, 71); - BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected " + + validateError(negativeResult, i++, "incompatible types: expected " + "'(boolean|string|int|record {| (boolean|int) b; |})'," + " found '(boolean|string|int|record {| (boolean|string) b; |})'", 41, 55); - BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected " + + validateError(negativeResult, i++, "incompatible types: expected " + "'(boolean|string|int|record {| (boolean|int) b; |})'," + " found '(boolean|string|int|record {| (boolean|string) b; |})'", 42, 54); + validateError(negativeResult, i++, "incompatible types: expected 'R1', found 'R2'", 60, 12); + validateError(negativeResult, i++, "incompatible types: expected 'R1', found 'record {| (int|string)...; |}'", + 63, 12); + validateError(negativeResult, i++, "incompatible types: expected 'R1', found 'record {| int...; |}'", 66, 12); + validateError(negativeResult, i++, "incompatible types: expected 'R3', found 'record {| int...; |}'", 67, 12); + validateError(negativeResult, i++, "incompatible types: expected 'record {| int a?; int b; anydata...; |}', " + + "found 'record {| readonly int? b; int...; |}'", 70, 35); assertEquals(negativeResult.getErrorCount(), i); } } diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/record/record_assignability.bal b/tests/jballerina-unit-test/src/test/resources/test-src/record/record_assignability.bal new file mode 100644 index 000000000000..0fa71ec2bc4d --- /dev/null +++ b/tests/jballerina-unit-test/src/test/resources/test-src/record/record_assignability.bal @@ -0,0 +1,116 @@ +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org) All Rights Reserved. +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +type R1 record { + string y?; +}; + +type R2 record { + int x?; +}; + +type R3 record {| + string y?; + int...; +|}; + +type R4 record { + int a?; + string b; +}; + +type R5 record { + string b; +}; + +type R6 record { + int a?; + int b; +}; + +type R7 record { + readonly int? b; +}; + +function testOpenRecordToRecordWithOptionalFieldTypingRuntimeNegative() { + R2 a = {x: 1, "y": 10}; + assertFalse(a is R1); + + record {| int|string...; |} b = {}; + assertFalse(b is R1); + + record {| int...; |} c = {}; + assertFalse(c is R1); + assertFalse(c is R3); + + R5[] d = []; + assertFalse(d is R4[]); + + R7 e = {b: 1}; + assertFalse(e is R6); +} + +type R8 record { + string y?; +}; + +type R9 record {| + int x?; + string...; +|}; + +type R10 record { + int a?; + int b; +}; + +type R11 record {| + readonly int? b; + int...; +|}; + +function testRecordToRecordWithOptionalFieldTypingRuntimePositive() { + R9 a = {}; + R8 _ = a; // OK + assertTrue( a is R8); + + record {| int x?; |} b = {}; + assertTrue( b is R8); + + record {| int x?; never...; |} c = {}; + assertTrue( c is R8); + + R9[] d = []; + R8[] _ = d; // OK + assertTrue( d is R8[]); + + record {| readonly int? b; int...; |} e = {b: 1}; + assertTrue(e is record { int a?; int b; }); +} + +function assertTrue(anydata actual) { + assertEquality(true, actual); +} + +function assertFalse(anydata actual) { + assertEquality(false, actual); +} + +function assertEquality(anydata expected, anydata actual) { + if expected != actual { + panic error(string `expected ${expected.toBalString()}, found ${actual.toBalString()}`); + } +} diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/record/record_assignability_negative.bal b/tests/jballerina-unit-test/src/test/resources/test-src/record/record_assignability_negative.bal index a1fd57e5e6bb..0345d0cab08f 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/record/record_assignability_negative.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/record/record_assignability_negative.bal @@ -41,3 +41,31 @@ function testClosedRecordAssignabilityNegative() { boolean|string|int|record {|boolean|int b;|} r8 = r7; boolean|string|int|record {|boolean|int b;|} _ = r7; } + +type R1 record { + string y?; +}; + +type R2 record { + int x?; +}; + +type R3 record {| + string y?; + int...; +|}; + +function testOpenRecordToRecordWithIncompatibleOptionalFieldTyping() { + R2 r1 = {x: 1, "y": 10}; + R1 _ = r1; + + record {| int|string...; |} r2 = {}; + R1 _ = r2; + + record {| int...; |} r3 = {}; + R1 _ = r3; + R3 _ = r3; + + record {| readonly int? b; int...; |} r4 = {b: 1}; + record { int a?; int b; } _ = r4; +} From 7e30760ed7498752d0bec433ab5c35961ff4be5e Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Thu, 13 Jul 2023 18:35:04 +0530 Subject: [PATCH 27/67] Add few more onfail negative tests --- .../semantics/analyzer/DataflowAnalyzer.java | 2 +- .../statements/onfail/OnFailClauseTest.java | 1 + .../onfail/on-fail-clause-negative-v2.bal | 40 +++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java index 56e95859a30d..e8732d2c7f17 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java @@ -978,7 +978,7 @@ private void analyzeStmtWithOnFail(BLangBlockStmt blockStmt, BLangOnFailClause o // If the control flow is interrupted inside the 'onfail' block, // only the results of the 'do' block are relevant after the execution // of the entire 'stmt-with-on-fail' statement. - if (onFailResult.flowTerminated) { + if (onFailResult.flowTerminated || onFailResult.possibleFailureReached) { this.uninitializedVars = doResult.uninitializedVars; } else if (doResult.definiteFailureReached) { this.uninitializedVars = onFailResult.uninitializedVars; diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java index 03c1c6262aff..e88270b29e7e 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/statements/onfail/OnFailClauseTest.java @@ -132,6 +132,7 @@ public void testOnFailClauseNegativeCaseV2() { BAssertUtil.validateError(negativeResult, i++, "variable 'i' may not have been initialized", 1071, 9); BAssertUtil.validateError(negativeResult, i++, "variable 'j' may not have been initialized", 1072, 9); BAssertUtil.validateError(negativeResult, i++, "variable 'i' may not have been initialized", 1102, 9); + BAssertUtil.validateError(negativeResult, i++, "variable 'resultInt2' may not have been initialized", 1160, 5); Assert.assertEquals(negativeResult.getErrorCount(), i); } diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal b/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal index a95fc040404d..deccd7cf20bd 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/statements/onfail/on-fail-clause-negative-v2.bal @@ -1119,3 +1119,43 @@ public function testUnInitVars64() returns error? { function getErrorOrIntArr() returns int[]|error { return getError(); } + +public function testUnInitVars65() returns error? { + int resultInt; + do { + resultInt = check getErrorOrInt(); + } on fail { + resultInt = check getErrorOrInt(); + } + resultInt += 1; +} + +public function testUnInitVars66() returns error? { + int resultInt; + do { + resultInt = check getErrorOrInt(); + do { + resultInt = check getErrorOrInt(); + } on fail { + } + } on fail { + resultInt = check getErrorOrInt(); + } + resultInt += 1; +} + +public function testUnInitVars67() returns error? { + int resultInt1; + int resultInt2; + do { + resultInt1 = check getErrorOrInt(); + do { + resultInt2 = check getErrorOrInt(); + } on fail { + } + } on fail { + resultInt1 = check getErrorOrInt(); + } + resultInt1 += 1; + resultInt2 += 1; +} From 621b44be08bbf649b95054284980dda3e7ee933e Mon Sep 17 00:00:00 2001 From: Dulaj Date: Fri, 14 Jul 2023 11:18:12 +0530 Subject: [PATCH 28/67] Extract deprecate warning to a method --- .../semantics/analyzer/CodeAnalyzer.java | 50 ++++++++++--------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java index 86945d41b183..1613cb8414fb 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java @@ -2234,35 +2234,31 @@ public void visit(BLangTableConstructorExpr tableConstructorExpr, AnalyzerData d @Override public void visit(BLangRecordLiteral recordLiteral, AnalyzerData data) { List fields = recordLiteral.fields; + BType recLiteralType = recordLiteral.getBType(); for (RecordLiteralNode.RecordField field : fields) { if (field.isKeyValueField()) { - BVarSymbol fieldSymbol = ((BLangRecordKeyValueField) field).key.fieldSymbol; - analyzeExpr(((BLangRecordKeyValueField) field).valueExpr, data); - if (fieldSymbol != null && Symbols.isFlagOn(fieldSymbol.flags, Flags.DEPRECATED)) { - String deprecatedConstruct = generateDeprecatedConstructString(recordLiteral, - fieldSymbol.toString(), fieldSymbol); - dlog.warning(((BLangRecordKeyValueField) field).pos, - DiagnosticWarningCode.USAGE_OF_DEPRECATED_CONSTRUCT, deprecatedConstruct); + BVarSymbol fieldSymbol = ((BLangRecordKeyValueField) field).key.fieldSymbol; + if (fieldSymbol != null) { + reportIfDeprecatedUsage(fieldSymbol, fieldSymbol.toString(), + recordLiteral, ((BLangRecordKeyValueField) field).pos); } } else if (field.getKind() == NodeKind.SIMPLE_VARIABLE_REF) { BLangRecordLiteral.BLangRecordVarNameField recField = (BLangRecordLiteral.BLangRecordVarNameField) field; analyzeExpr(recField, data); - if (recordLiteral.getBType().tsymbol != null - && recordLiteral.getBType().tsymbol.type.getKind() == TypeKind.RECORD) { + if (recLiteralType.tsymbol != null && recLiteralType.tsymbol.type != null + && recLiteralType.tsymbol.type.getKind() == TypeKind.RECORD) { - BRecordType recordType = (BRecordType) recordLiteral.getBType().tsymbol.type; + BRecordType recordType = (BRecordType) recLiteralType.tsymbol.type; BField matchingField = recordType.getFields().get(recField.symbol.getName().getValue()); - if (matchingField != null && Symbols.isFlagOn(matchingField.symbol.flags, Flags.DEPRECATED)) { - String deprecatedConstruct = generateDeprecatedConstructString(recordLiteral, - matchingField.name.getValue(), matchingField.symbol); - dlog.warning(((BLangRecordLiteral.BLangRecordVarNameField) field).pos, - DiagnosticWarningCode.USAGE_OF_DEPRECATED_CONSTRUCT, deprecatedConstruct); + if (matchingField != null && matchingField.symbol != null) { + reportIfDeprecatedUsage(matchingField.symbol, matchingField.name.getValue(), + recordLiteral, ((BLangRecordLiteral.BLangRecordVarNameField) field).pos); } } } else { @@ -2271,7 +2267,7 @@ public void visit(BLangRecordLiteral recordLiteral, AnalyzerData data) { analyzeExpr(spreadField.expr, data); BType spreadFieldType = Types.getReferredType(spreadField.expr.getBType()); - BType contextType = Types.getReferredType(recordLiteral.getBType()); + BType contextType = Types.getReferredType(recLiteralType); if (spreadFieldType != null && spreadFieldType.getKind() == TypeKind.RECORD && contextType.getKind() == TypeKind.RECORD) { @@ -2279,22 +2275,18 @@ public void visit(BLangRecordLiteral recordLiteral, AnalyzerData data) { BRecordType recordType = (BRecordType) contextType; BField matchingField = recordType.getFields().get(fieldEntry.getName().getValue()); - if (matchingField != null && Symbols.isFlagOn(matchingField.symbol.flags, Flags.DEPRECATED)) { - String deprecatedConstruct = generateDeprecatedConstructString(recordLiteral, - matchingField.name.getValue(), matchingField.symbol); - dlog.warning(spreadField.expr.pos, - DiagnosticWarningCode.USAGE_OF_DEPRECATED_CONSTRUCT, deprecatedConstruct); + if (matchingField != null && matchingField.symbol != null) { + reportIfDeprecatedUsage(matchingField.symbol, matchingField.name.getValue(), + recordLiteral, spreadField.expr.pos); } } } - } } Set names = new HashSet<>(); Set neverTypedKeys = new HashSet<>(); - BType literalBType = recordLiteral.getBType(); - BType type = Types.getReferredType(literalBType); + BType type = Types.getReferredType(recLiteralType); boolean isRecord = type.tag == TypeTags.RECORD; boolean isOpenRecord = isRecord && !((BRecordType) type).sealed; @@ -3972,6 +3964,16 @@ private BType getErrorTypes(BType bType) { return errorType; } + private void reportIfDeprecatedUsage(BSymbol constructSymbol, + String constructName, + BLangExpression expr, + Location usagePos) { + if (Symbols.isFlagOn(constructSymbol.flags, Flags.DEPRECATED)) { + dlog.warning(usagePos, DiagnosticWarningCode.USAGE_OF_DEPRECATED_CONSTRUCT, + generateDeprecatedConstructString(expr, constructName, constructSymbol)); + } + } + /** * This class contains the state machines for a set of workers. */ From a20ca5d6695aaba25a467f72189fca02922e35f7 Mon Sep 17 00:00:00 2001 From: Dulaj Date: Fri, 14 Jul 2023 13:40:39 +0530 Subject: [PATCH 29/67] Implement deprecated usage warnings for func params --- .../semantics/analyzer/CodeAnalyzer.java | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java index 1613cb8414fb..d6c4c822b03e 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java @@ -2535,6 +2535,7 @@ public void visit(BLangInvocation invocationExpr, AnalyzerData data) { logDeprecatedWarningForInvocation(invocationExpr); } } + analyzeInvocationParams(invocationExpr, data); } @Override @@ -3914,6 +3915,107 @@ private boolean checkReturnValidityInTransaction(AnalyzerData data) { && data.withinTransactionScope; } + private void analyzeInvocationParams(BLangInvocation iExpr, AnalyzerData data) { + if (iExpr.symbol == null) { + return; + } + + BType invocableType = Types.getReferredType(iExpr.symbol.type); + if (invocableType.tag != TypeTags.INVOKABLE) { + return; + } + + BInvokableSymbol invokableSymbol = ((BInvokableSymbol) iExpr.symbol); + + List nonRestParams = new ArrayList<>(invokableSymbol.params); + List incRecordParams = new ArrayList<>(); + + getIncRecordFields(iExpr, nonRestParams, incRecordParams); + + List paramTypes = ((BInvokableType) invocableType).getParameterTypes(); + int parameterCountForPositionalArgs = paramTypes.size(); + int parameterCountForNamedArgs = parameterCountForPositionalArgs + incRecordParams.size(); + for (BVarSymbol symbol : nonRestParams) { + if (!Symbols.isFlagOn(Flags.asMask(symbol.getFlags()), Flags.INCLUDED) || + Types.getReferredType(symbol.type).tag != TypeTags.RECORD) { + continue; + } + LinkedHashMap fields = + ((BRecordType) Types.getReferredType(symbol.type)).fields; + if (fields.isEmpty()) { + continue; + } + for (String field : fields.keySet()) { + if (Types.getReferredType(fields.get(field).type).tag != TypeTags.NEVER) { + parameterCountForNamedArgs = parameterCountForNamedArgs - 1; + break; + } + } + } + + int i = 0; + boolean foundNamedArg = false; + for (BLangExpression expr : iExpr.argExprs) { + switch (expr.getKind()) { + case NAMED_ARGS_EXPR: + foundNamedArg = true; + BLangNamedArgsExpression namedArgsExpression = (BLangNamedArgsExpression) expr; + if (namedArgsExpression.varSymbol != null + && Symbols.isFlagOn(namedArgsExpression.varSymbol.flags, Flags.DEPRECATED)) { + String deprecatedConstruct = generateDeprecatedConstructString(expr, + namedArgsExpression.varSymbol.toString(), namedArgsExpression.varSymbol); + dlog.warning(expr.pos, DiagnosticWarningCode.USAGE_OF_DEPRECATED_CONSTRUCT, + deprecatedConstruct); + } + i++; + break; + case REST_ARGS_EXPR: + if (foundNamedArg) { + continue; + } + analyzeExpr(expr, data); + break; + default: // positional args + if (foundNamedArg) { + continue; + } + if (i < parameterCountForPositionalArgs) { + BVarSymbol paramSymbol = invokableSymbol.params.get(i); + if (Symbols.isFlagOn(invokableSymbol.params.get(i).flags, Flags.INCLUDED)) { + analyzeExpr(expr, data); + } + else if (Symbols.isFlagOn(paramSymbol.flags, Flags.DEPRECATED)) { + String deprecatedConstruct = generateDeprecatedConstructString(expr, + paramSymbol.toString(), paramSymbol); + dlog.warning(expr.pos, DiagnosticWarningCode.USAGE_OF_DEPRECATED_CONSTRUCT, + deprecatedConstruct); + } + } + i++; + + } + } + } + + private void getIncRecordFields(BLangInvocation iExpr, List nonRestParams, List incRecordParams) { + if (iExpr.argExprs.size() > 0) { + return; + } + + for (BVarSymbol param : nonRestParams) { + BType paramType = Types.getReferredType(param.type); + if (!Symbols.isFlagOn(Flags.asMask(param.getFlags()), Flags.INCLUDED) || + paramType.getKind() != TypeKind.RECORD) { + continue; + } + for (BField field: ((BRecordType) paramType).fields.values()) { + if (field.symbol.type.tag != TypeTags.NEVER) { + incRecordParams.add(field.symbol); + } + } + } + } + private void validateModuleInitFunction(BLangFunction funcNode) { if (funcNode.attachedFunction || !Names.USER_DEFINED_INIT_SUFFIX.value.equals(funcNode.name.value)) { return; From f8469b7c945e7a22d8ad54274c596cfebd8852b0 Mon Sep 17 00:00:00 2001 From: Dulaj Date: Fri, 14 Jul 2023 13:40:49 +0530 Subject: [PATCH 30/67] Add more tests --- .../DeprecationAnnotationTest.java | 16 ++++++++++- .../annotations/deprecation_annotation.bal | 27 ++++++++++++++++++- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java index 04833ef6b10f..9c20f8ac5890 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java @@ -67,7 +67,13 @@ public void testDeprecationAnnotation() { BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Object3.fieldOne' is deprecated", 194, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Object3.t' is deprecated", 195, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'add1' is deprecated", 200, 13); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'x' is deprecated", 200, 18); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'y' is deprecated", 200, 21); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'z' is deprecated", 200, 24); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'add2' is deprecated", 201, 13); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'x' is deprecated", 201, 18); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'y' is deprecated", 201, 21); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'z' is deprecated", 201, 24); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Object1' is deprecated", 202, 5); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'z' is deprecated", 213, 13); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Foo' is deprecated", 216, 38); @@ -113,10 +119,18 @@ public void testDeprecationAnnotation() { BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Job.experience' is deprecated", 414, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Job.experience' is deprecated", 420, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Job.experience' is deprecated", 426, 12); - BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Company.name' is deprecated", 433, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Company.city' is deprecated", 434, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Company.country' is deprecated", 435, 12); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'x2' is deprecated", 446, 15); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'x2' is deprecated", 447, 15); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'x2' is deprecated", 448, 20); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Company.city' is deprecated", 451, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Company.country' is deprecated", 452, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Company.name' is deprecated", 453, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'city' is deprecated", 458, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'country' is deprecated", 459, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'name' is deprecated", 460, 9); Assert.assertEquals(compileResult.getWarnCount(), i); } diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal b/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal index 68e00c7316c8..360c6314f9b9 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal @@ -390,7 +390,7 @@ type Employee5 record { }; public function testDeprecatedAnonStructAsStructField() { - Employee5 employee5 = {address: {}}; + Employee5 employee5 = {address: {}}; // warning _ = employee5.address; // warning _ = employee5.address.line02; // warning } @@ -435,3 +435,28 @@ public function testDeprecatedAnonRecordFieldInInitialization() { ...companyDetails // warning }; } + +function fooFn(int x1, @deprecated int x2){ +} + +function barFn(string s, *Company company) { +} + +public function testDeprecatedParamUsages() { + fooFn(10, 11); + fooFn(12, x2 = 13); + fooFn(x1 = 14, x2 = 15); + barFn("bar", { + companyId: 1, + city: "Berlin", // Warning + country: "Germany", // Warning + name: "Bar" // Warning + }); + barFn( + "bar", + companyId = 1, + city = "Berlin", // Warning + country = "Germany", // Warning + name = "Bar" // Warning + ); +} From a05e734aa51643793cd46452fea92b406f11de9c Mon Sep 17 00:00:00 2001 From: Dulaj Date: Fri, 14 Jul 2023 17:31:12 +0530 Subject: [PATCH 31/67] Improve deprecate warning logic --- .../semantics/analyzer/CodeAnalyzer.java | 70 +++---------------- 1 file changed, 9 insertions(+), 61 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java index d6c4c822b03e..a8b385ee81c0 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java @@ -2504,10 +2504,8 @@ private void analyzeFieldBasedAccessExpr(BLangFieldBasedAccess fieldAccessExpr, BLangExpression expr = fieldAccessExpr.expr; analyzeExpr(expr, data); BSymbol symbol = fieldAccessExpr.symbol; - if (symbol != null && Symbols.isFlagOn(fieldAccessExpr.symbol.flags, Flags.DEPRECATED)) { - String deprecatedConstruct = generateDeprecatedConstructString(expr, fieldAccessExpr.field.toString(), - symbol); - dlog.warning(fieldAccessExpr.pos, DiagnosticWarningCode.USAGE_OF_DEPRECATED_CONSTRUCT, deprecatedConstruct); + if (symbol != null) { + reportIfDeprecatedUsage(symbol, fieldAccessExpr.field.toString(), expr, fieldAccessExpr.pos); } } @@ -3926,32 +3924,7 @@ private void analyzeInvocationParams(BLangInvocation iExpr, AnalyzerData data) { } BInvokableSymbol invokableSymbol = ((BInvokableSymbol) iExpr.symbol); - - List nonRestParams = new ArrayList<>(invokableSymbol.params); - List incRecordParams = new ArrayList<>(); - - getIncRecordFields(iExpr, nonRestParams, incRecordParams); - - List paramTypes = ((BInvokableType) invocableType).getParameterTypes(); - int parameterCountForPositionalArgs = paramTypes.size(); - int parameterCountForNamedArgs = parameterCountForPositionalArgs + incRecordParams.size(); - for (BVarSymbol symbol : nonRestParams) { - if (!Symbols.isFlagOn(Flags.asMask(symbol.getFlags()), Flags.INCLUDED) || - Types.getReferredType(symbol.type).tag != TypeTags.RECORD) { - continue; - } - LinkedHashMap fields = - ((BRecordType) Types.getReferredType(symbol.type)).fields; - if (fields.isEmpty()) { - continue; - } - for (String field : fields.keySet()) { - if (Types.getReferredType(fields.get(field).type).tag != TypeTags.NEVER) { - parameterCountForNamedArgs = parameterCountForNamedArgs - 1; - break; - } - } - } + int parameterCountForPositionalArgs = ((BInvokableType) invocableType).getParameterTypes().size(); int i = 0; boolean foundNamedArg = false; @@ -3960,12 +3933,9 @@ private void analyzeInvocationParams(BLangInvocation iExpr, AnalyzerData data) { case NAMED_ARGS_EXPR: foundNamedArg = true; BLangNamedArgsExpression namedArgsExpression = (BLangNamedArgsExpression) expr; - if (namedArgsExpression.varSymbol != null - && Symbols.isFlagOn(namedArgsExpression.varSymbol.flags, Flags.DEPRECATED)) { - String deprecatedConstruct = generateDeprecatedConstructString(expr, - namedArgsExpression.varSymbol.toString(), namedArgsExpression.varSymbol); - dlog.warning(expr.pos, DiagnosticWarningCode.USAGE_OF_DEPRECATED_CONSTRUCT, - deprecatedConstruct); + if (namedArgsExpression.varSymbol != null) { + reportIfDeprecatedUsage(namedArgsExpression.varSymbol, namedArgsExpression.varSymbol.toString(), + expr, expr.pos); } i++; break; @@ -3981,15 +3951,12 @@ private void analyzeInvocationParams(BLangInvocation iExpr, AnalyzerData data) { } if (i < parameterCountForPositionalArgs) { BVarSymbol paramSymbol = invokableSymbol.params.get(i); + if (paramSymbol != null && Symbols.isFlagOn(paramSymbol.flags, Flags.DEPRECATED)) { + logDeprecatedWaring(paramSymbol.toString(), paramSymbol, expr.pos); + } if (Symbols.isFlagOn(invokableSymbol.params.get(i).flags, Flags.INCLUDED)) { analyzeExpr(expr, data); } - else if (Symbols.isFlagOn(paramSymbol.flags, Flags.DEPRECATED)) { - String deprecatedConstruct = generateDeprecatedConstructString(expr, - paramSymbol.toString(), paramSymbol); - dlog.warning(expr.pos, DiagnosticWarningCode.USAGE_OF_DEPRECATED_CONSTRUCT, - deprecatedConstruct); - } } i++; @@ -3997,25 +3964,6 @@ else if (Symbols.isFlagOn(paramSymbol.flags, Flags.DEPRECATED)) { } } - private void getIncRecordFields(BLangInvocation iExpr, List nonRestParams, List incRecordParams) { - if (iExpr.argExprs.size() > 0) { - return; - } - - for (BVarSymbol param : nonRestParams) { - BType paramType = Types.getReferredType(param.type); - if (!Symbols.isFlagOn(Flags.asMask(param.getFlags()), Flags.INCLUDED) || - paramType.getKind() != TypeKind.RECORD) { - continue; - } - for (BField field: ((BRecordType) paramType).fields.values()) { - if (field.symbol.type.tag != TypeTags.NEVER) { - incRecordParams.add(field.symbol); - } - } - } - } - private void validateModuleInitFunction(BLangFunction funcNode) { if (funcNode.attachedFunction || !Names.USER_DEFINED_INIT_SUFFIX.value.equals(funcNode.name.value)) { return; From 1cf644807b04de5f947cc8b148a7176839599e1b Mon Sep 17 00:00:00 2001 From: Tharushi Jayasekara Date: Wed, 28 Jun 2023 11:32:37 +0530 Subject: [PATCH 32/67] Remove the check for ignoring comment minutiae --- .../codeaction/providers/imports/ImportModuleCodeAction.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/ImportModuleCodeAction.java b/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/ImportModuleCodeAction.java index 3bbc72cc924a..30ad68ef734a 100644 --- a/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/ImportModuleCodeAction.java +++ b/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/ImportModuleCodeAction.java @@ -193,9 +193,6 @@ private static Position getImportPosition(CodeActionContext context) { // And no further processing is required insertPosition = new Position(minutiae.lineRange().startLine().line(), 0); break; - } else if (minutiae.kind() == SyntaxKind.COMMENT_MINUTIAE) { - // If we find a comment, consider the import's position to be the next line - insertPosition = new Position(minutiae.lineRange().endLine().line() + 1, 0); } } From 32583fd710734e9e4374133f6e07e7bd55dee276 Mon Sep 17 00:00:00 2001 From: Tharushi Jayasekara Date: Thu, 29 Jun 2023 18:48:17 +0530 Subject: [PATCH 33/67] Add unit test --- .../ImportModuleCodeActionTest.java | 3 +- .../importModuleWithTopLevelComment.json | 28 +++++++++++++++++++ .../importModuleWithTopLevelComment.bal | 8 ++++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/import-module/config/importModuleWithTopLevelComment.json create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/import-module/source/importModuleWithTopLevelComment.bal diff --git a/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/ImportModuleCodeActionTest.java b/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/ImportModuleCodeActionTest.java index 93f63e1d70d1..766cece200a1 100644 --- a/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/ImportModuleCodeActionTest.java +++ b/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/ImportModuleCodeActionTest.java @@ -66,7 +66,8 @@ public Object[][] dataProvider() { {"importModuleWithMultipleModAliases2.json"}, {"importModuleWithLicenceHeader1.json"}, {"importModuleWithLicenceHeader2.json"}, - {"importModuleWithIgnoredImport.json"} + {"importModuleWithIgnoredImport.json"}, + {"importModuleWithTopLevelComment.json"} }; } diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/import-module/config/importModuleWithTopLevelComment.json b/language-server/modules/langserver-core/src/test/resources/codeaction/import-module/config/importModuleWithTopLevelComment.json new file mode 100644 index 000000000000..40a354ad53fe --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/import-module/config/importModuleWithTopLevelComment.json @@ -0,0 +1,28 @@ +{ + "position": { + "line": 6, + "character": 24 + }, + "source": "importModuleWithTopLevelComment.bal", + "expected": [ + { + "title": "Import module 'ballerina/lang.array'", + "kind": "quickfix", + "edits": [ + { + "range": { + "start": { + "line": 0, + "character": 0 + }, + "end": { + "line": 0, + "character": 0 + } + }, + "newText": "import ballerina/lang.array;\n" + } + ] + } + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/import-module/source/importModuleWithTopLevelComment.bal b/language-server/modules/langserver-core/src/test/resources/codeaction/import-module/source/importModuleWithTopLevelComment.bal new file mode 100644 index 000000000000..8e1cfcd22853 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/import-module/source/importModuleWithTopLevelComment.bal @@ -0,0 +1,8 @@ +// Foo is a record +type Foo record {| + string name; +|}; + +public function main() { + int length = array:length([1,2,3]); +} From 29ce6d90a46416851a51e5d51a33d86518b67c56 Mon Sep 17 00:00:00 2001 From: Tharushi Jayasekara Date: Mon, 17 Jul 2023 16:18:42 +0530 Subject: [PATCH 34/67] Consider license header in add import completion item --- .../imports/ImportModuleCodeAction.java | 36 +----------------- .../langserver/common/utils/CommonUtil.java | 38 ++++++++++++++++--- 2 files changed, 34 insertions(+), 40 deletions(-) diff --git a/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/ImportModuleCodeAction.java b/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/ImportModuleCodeAction.java index 30ad68ef734a..fa10cf60b3c4 100644 --- a/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/ImportModuleCodeAction.java +++ b/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/ImportModuleCodeAction.java @@ -18,14 +18,10 @@ import io.ballerina.compiler.api.symbols.ModuleSymbol; import io.ballerina.compiler.syntax.tree.ImportDeclarationNode; import io.ballerina.compiler.syntax.tree.ImportPrefixNode; -import io.ballerina.compiler.syntax.tree.Minutiae; -import io.ballerina.compiler.syntax.tree.ModulePartNode; -import io.ballerina.compiler.syntax.tree.NodeList; import io.ballerina.compiler.syntax.tree.NodeVisitor; import io.ballerina.compiler.syntax.tree.NonTerminalNode; import io.ballerina.compiler.syntax.tree.QualifiedNameReferenceNode; import io.ballerina.compiler.syntax.tree.SyntaxKind; -import io.ballerina.compiler.syntax.tree.SyntaxTree; import io.ballerina.compiler.syntax.tree.Token; import io.ballerina.tools.diagnostics.Diagnostic; import org.ballerinalang.annotation.JavaSPIService; @@ -148,7 +144,7 @@ public List getCodeActions(Diagnostic diagnostic, String orgName = pkgEntry.packageOrg().value(); String pkgName = pkgEntry.packageName().value(); String moduleName = ModuleUtil.escapeModuleName(pkgName); - Position insertPos = getImportPosition(context); + Position insertPos = CommonUtil.getImportPosition(context); String importText = orgName.isEmpty() ? String.format("%s %s;%n", ItemResolverConstants.IMPORT, moduleName) : String.format("%s %s/%s;%n", ItemResolverConstants.IMPORT, orgName, moduleName); @@ -169,36 +165,6 @@ public String getName() { return NAME; } - private static Position getImportPosition(CodeActionContext context) { - // Calculate initial import insertion line - Optional syntaxTree = context.currentSyntaxTree(); - ModulePartNode modulePartNode = syntaxTree.orElseThrow().rootNode(); - NodeList imports = modulePartNode.imports(); - // If there is already an import, add the new import after the last import - if (!imports.isEmpty()) { - ImportDeclarationNode lastImport = imports.get(imports.size() - 1); - return new Position(lastImport.lineRange().endLine().line() + 1, 0); - } - - // If the module part has no children, add the import at the beginning of the file - if (modulePartNode.members().isEmpty()) { - return new Position(0, 0); - } - - Position insertPosition = new Position(0, 0); - for (Minutiae minutiae : modulePartNode.leadingMinutiae()) { - if (minutiae.kind() == SyntaxKind.END_OF_LINE_MINUTIAE - && minutiae.lineRange().startLine().offset() == 0) { - // If we find a new line character with offset 0 (a blank line), add the import after that - // And no further processing is required - insertPosition = new Position(minutiae.lineRange().startLine().line(), 0); - break; - } - } - - return insertPosition; - } - /** * A visitor to find the qualified name reference node within an expression. */ diff --git a/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/common/utils/CommonUtil.java b/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/common/utils/CommonUtil.java index f1c0ee2139bc..76949b967db0 100644 --- a/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/common/utils/CommonUtil.java +++ b/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/common/utils/CommonUtil.java @@ -36,6 +36,7 @@ import io.ballerina.compiler.syntax.tree.ModulePartNode; import io.ballerina.compiler.syntax.tree.ModuleVariableDeclarationNode; import io.ballerina.compiler.syntax.tree.Node; +import io.ballerina.compiler.syntax.tree.NodeList; import io.ballerina.compiler.syntax.tree.NonTerminalNode; import io.ballerina.compiler.syntax.tree.ObjectFieldNode; import io.ballerina.compiler.syntax.tree.ObjectTypeDescriptorNode; @@ -173,10 +174,6 @@ public static List getAutoImportTextEdits(@Nonnull String orgName, Str */ public static List getAutoImportTextEdits(@Nonnull String orgName, String pkgName, String alias, DocumentServiceContext context) { - Map currentDocImports = context.currentDocImportsMap(); - Optional last = CommonUtil.getLastItem(new ArrayList<>(currentDocImports.keySet())); - int endLine = last.map(node -> node.lineRange().endLine().line()).orElse(0); - Position start = new Position(endLine, 0); StringBuilder builder = new StringBuilder(ItemResolverConstants.IMPORT + " " + (!orgName.isEmpty() ? orgName + SLASH_KEYWORD_KEY : orgName) @@ -186,7 +183,38 @@ public static List getAutoImportTextEdits(@Nonnull String orgName, Str } builder.append(SEMI_COLON_SYMBOL_KEY).append(CommonUtil.LINE_SEPARATOR); - return Collections.singletonList(new TextEdit(new Range(start, start), builder.toString())); + Position insertPos = getImportPosition(context); + return Collections.singletonList(new TextEdit(new Range(insertPos, insertPos), builder.toString())); + } + + public static Position getImportPosition(DocumentServiceContext context) { + // Calculate initial import insertion line + Optional syntaxTree = context.currentSyntaxTree(); + ModulePartNode modulePartNode = syntaxTree.orElseThrow().rootNode(); + NodeList imports = modulePartNode.imports(); + // If there is already an import, add the new import after the last import + if (!imports.isEmpty()) { + ImportDeclarationNode lastImport = imports.get(imports.size() - 1); + return new Position(lastImport.lineRange().endLine().line() + 1, 0); + } + + // If the module part has no children, add the import at the beginning of the file + if (modulePartNode.members().isEmpty()) { + return new Position(0, 0); + } + + Position insertPosition = new Position(0, 0); + for (Minutiae minutiae : modulePartNode.leadingMinutiae()) { + if (minutiae.kind() == SyntaxKind.END_OF_LINE_MINUTIAE + && minutiae.lineRange().startLine().offset() == 0) { + // If we find a new line character with offset 0 (a blank line), add the import after that + // And no further processing is required + insertPosition = new Position(minutiae.lineRange().startLine().line(), 0); + break; + } + } + + return insertPosition; } /** From 1afddce6b6904533e62e58013e5a3c2b8b367b2d Mon Sep 17 00:00:00 2001 From: Tharushi Jayasekara Date: Mon, 17 Jul 2023 16:18:53 +0530 Subject: [PATCH 35/67] Add unit test --- .../import_decl/config/config27.json | 907 ++++++++++++++++++ .../import_decl/source/source15.bal | 5 + 2 files changed, 912 insertions(+) create mode 100644 language-server/modules/langserver-core/src/test/resources/completion/import_decl/config/config27.json create mode 100644 language-server/modules/langserver-core/src/test/resources/completion/import_decl/source/source15.bal diff --git a/language-server/modules/langserver-core/src/test/resources/completion/import_decl/config/config27.json b/language-server/modules/langserver-core/src/test/resources/completion/import_decl/config/config27.json new file mode 100644 index 000000000000..cbb078f94c96 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/completion/import_decl/config/config27.json @@ -0,0 +1,907 @@ +{ + "position": { + "line": 3, + "character": 11 + }, + "source": "import_decl/source/source15.bal", + "description": "", + "items": [ + { + "label": "xmlns", + "kind": "Snippet", + "detail": "Snippet", + "sortText": "P", + "filterText": "xmlns", + "insertText": "xmlns \"${1}\" as ${2:ns};", + "insertTextFormat": "Snippet" + }, + { + "label": "xmlns", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "xmlns", + "insertText": "xmlns ", + "insertTextFormat": "Snippet" + }, + { + "label": "var", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "var", + "insertText": "var ", + "insertTextFormat": "Snippet" + }, + { + "label": "wait", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "wait", + "insertText": "wait ", + "insertTextFormat": "Snippet" + }, + { + "label": "start", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "start", + "insertText": "start ", + "insertTextFormat": "Snippet" + }, + { + "label": "flush", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "flush", + "insertText": "flush ", + "insertTextFormat": "Snippet" + }, + { + "label": "isolated", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "isolated", + "insertText": "isolated ", + "insertTextFormat": "Snippet" + }, + { + "label": "transactional", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "transactional", + "insertText": "transactional", + "insertTextFormat": "Snippet" + }, + { + "label": "checkpanic", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "checkpanic", + "insertText": "checkpanic ", + "insertTextFormat": "Snippet" + }, + { + "label": "check", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "check", + "insertText": "check ", + "insertTextFormat": "Snippet" + }, + { + "label": "final", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "final", + "insertText": "final ", + "insertTextFormat": "Snippet" + }, + { + "label": "fail", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "fail", + "insertText": "fail ", + "insertTextFormat": "Snippet" + }, + { + "label": "from", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "from", + "insertText": "from ", + "insertTextFormat": "Snippet" + }, + { + "label": "if", + "kind": "Snippet", + "detail": "Statement", + "sortText": "P", + "filterText": "if", + "insertText": "if ${1:true} {\n\t${2}\n}", + "insertTextFormat": "Snippet" + }, + { + "label": "while", + "kind": "Snippet", + "detail": "Statement", + "sortText": "P", + "filterText": "while", + "insertText": "while ${1:true} {\n\t${2}\n}", + "insertTextFormat": "Snippet" + }, + { + "label": "do", + "kind": "Snippet", + "detail": "Statement", + "sortText": "P", + "filterText": "do", + "insertText": "do {\n\t${1}\n}", + "insertTextFormat": "Snippet" + }, + { + "label": "lock", + "kind": "Snippet", + "detail": "Statement", + "sortText": "P", + "filterText": "lock", + "insertText": "lock {\n\t${1}\n}", + "insertTextFormat": "Snippet" + }, + { + "label": "foreach", + "kind": "Snippet", + "detail": "Statement", + "sortText": "P", + "filterText": "foreach", + "insertText": "foreach ${1:var} ${2:item} in ${3:itemList} {\n\t${4}\n}", + "insertTextFormat": "Snippet" + }, + { + "label": "foreach i", + "kind": "Snippet", + "detail": "Statement", + "sortText": "P", + "filterText": "foreach", + "insertText": "foreach ${1:int} ${2:i} in ${3:0}...${4:9} {\n\t${5}\n}", + "insertTextFormat": "Snippet" + }, + { + "label": "fork", + "kind": "Snippet", + "detail": "Statement", + "sortText": "P", + "filterText": "fork", + "insertText": "fork {\n\t${1}\n}", + "insertTextFormat": "Snippet" + }, + { + "label": "transaction", + "kind": "Snippet", + "detail": "Statement", + "sortText": "P", + "filterText": "transaction", + "insertText": "transaction {\n\t${1}\n}", + "insertTextFormat": "Snippet" + }, + { + "label": "retry", + "kind": "Snippet", + "detail": "Statement", + "sortText": "P", + "filterText": "retry", + "insertText": "retry {\n\t${1}\n}", + "insertTextFormat": "Snippet" + }, + { + "label": "retry transaction", + "kind": "Snippet", + "detail": "Statement", + "sortText": "P", + "filterText": "retry_transaction", + "insertText": "retry transaction {\n\t${1}\n}", + "insertTextFormat": "Snippet" + }, + { + "label": "match", + "kind": "Snippet", + "detail": "Statement", + "sortText": "P", + "filterText": "match", + "insertText": "match ", + "insertTextFormat": "Snippet" + }, + { + "label": "panic", + "kind": "Snippet", + "detail": "Statement", + "sortText": "P", + "filterText": "panic", + "insertText": "panic ", + "insertTextFormat": "Snippet" + }, + { + "label": "stream<> streamName = new;", + "kind": "Snippet", + "detail": "Snippet", + "sortText": "P", + "filterText": "stream", + "insertText": "stream<${1}> ${2:streamName} = new;", + "insertTextFormat": "Snippet" + }, + { + "label": "return;", + "kind": "Snippet", + "detail": "Statement", + "sortText": "P", + "filterText": "return;", + "insertText": "return;", + "insertTextFormat": "Snippet" + }, + { + "label": "StrandData", + "kind": "Struct", + "detail": "Record", + "documentation": { + "left": "Describes Strand execution details for the runtime.\n" + }, + "sortText": "M", + "insertText": "StrandData", + "insertTextFormat": "Snippet" + }, + { + "label": "Thread", + "kind": "TypeParameter", + "detail": "Union", + "sortText": "N", + "insertText": "Thread", + "insertTextFormat": "Snippet" + }, + { + "label": "record", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "record", + "insertText": "record ", + "insertTextFormat": "Snippet" + }, + { + "label": "function", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "function", + "insertText": "function ", + "insertTextFormat": "Snippet" + }, + { + "label": "record {}", + "kind": "Snippet", + "detail": "Snippet", + "sortText": "P", + "filterText": "record", + "insertText": "record {${1}}", + "insertTextFormat": "Snippet" + }, + { + "label": "record {||}", + "kind": "Snippet", + "detail": "Snippet", + "sortText": "P", + "filterText": "record", + "insertText": "record {|${1}|}", + "insertTextFormat": "Snippet" + }, + { + "label": "distinct", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "distinct", + "insertText": "distinct", + "insertTextFormat": "Snippet" + }, + { + "label": "object constructor", + "kind": "Snippet", + "detail": "Snippet", + "sortText": "P", + "filterText": "object", + "insertText": "object {${1}}", + "insertTextFormat": "Snippet" + }, + { + "label": "true", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "true", + "insertText": "true", + "insertTextFormat": "Snippet" + }, + { + "label": "false", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "false", + "insertText": "false", + "insertTextFormat": "Snippet" + }, + { + "label": "map", + "kind": "Unit", + "detail": "type", + "sortText": "R", + "insertText": "map", + "insertTextFormat": "Snippet" + }, + { + "label": "object", + "kind": "Unit", + "detail": "type", + "sortText": "R", + "insertText": "object", + "insertTextFormat": "Snippet" + }, + { + "label": "stream", + "kind": "Unit", + "detail": "type", + "sortText": "R", + "insertText": "stream", + "insertTextFormat": "Snippet" + }, + { + "label": "table", + "kind": "Unit", + "detail": "type", + "sortText": "R", + "insertText": "table", + "insertTextFormat": "Snippet" + }, + { + "label": "transaction", + "kind": "Unit", + "detail": "type", + "sortText": "R", + "insertText": "transaction", + "insertTextFormat": "Snippet" + }, + { + "label": "worker", + "kind": "Snippet", + "detail": "Snippet", + "sortText": "P", + "filterText": "worker", + "insertText": "worker ${1:name} {\n\t${2}\n}", + "insertTextFormat": "Snippet" + }, + { + "label": "new", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "new", + "insertText": "new ", + "insertTextFormat": "Snippet" + }, + { + "label": "let", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "let", + "insertText": "let", + "insertTextFormat": "Snippet" + }, + { + "label": "typeof", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "typeof", + "insertText": "typeof ", + "insertTextFormat": "Snippet" + }, + { + "label": "trap", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "trap", + "insertText": "trap", + "insertTextFormat": "Snippet" + }, + { + "label": "client", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "client", + "insertText": "client ", + "insertTextFormat": "Snippet" + }, + { + "label": "error constructor", + "kind": "Snippet", + "detail": "Snippet", + "sortText": "P", + "filterText": "error", + "insertText": "error(\"${1}\")", + "insertTextFormat": "Snippet" + }, + { + "label": "base16", + "kind": "Snippet", + "detail": "Snippet", + "sortText": "P", + "filterText": "base16", + "insertText": "base16 `${1}`", + "insertTextFormat": "Snippet" + }, + { + "label": "base64", + "kind": "Snippet", + "detail": "Snippet", + "sortText": "P", + "filterText": "base64", + "insertText": "base64 `${1}`", + "insertTextFormat": "Snippet" + }, + { + "label": "object {}", + "kind": "Snippet", + "detail": "Snippet", + "sortText": "P", + "filterText": "object", + "insertText": "object {${1}}", + "insertTextFormat": "Snippet" + }, + { + "label": "test/project2", + "kind": "Module", + "detail": "Module", + "sortText": "R", + "filterText": "project2", + "insertText": "project2", + "insertTextFormat": "Snippet", + "additionalTextEdits": [ + { + "range": { + "start": { + "line": 1, + "character": 0 + }, + "end": { + "line": 1, + "character": 0 + } + }, + "newText": "import test/project2;\n" + } + ] + }, + { + "label": "test/project1", + "kind": "Module", + "detail": "Module", + "sortText": "R", + "filterText": "project1", + "insertText": "project1", + "insertTextFormat": "Snippet", + "additionalTextEdits": [ + { + "range": { + "start": { + "line": 1, + "character": 0 + }, + "end": { + "line": 1, + "character": 0 + } + }, + "newText": "import test/project1;\n" + } + ] + }, + { + "label": "test/local_project2", + "kind": "Module", + "detail": "Module", + "sortText": "R", + "filterText": "local_project2", + "insertText": "local_project2", + "insertTextFormat": "Snippet", + "additionalTextEdits": [ + { + "range": { + "start": { + "line": 1, + "character": 0 + }, + "end": { + "line": 1, + "character": 0 + } + }, + "newText": "import test/local_project2;\n" + } + ] + }, + { + "label": "test/local_project1", + "kind": "Module", + "detail": "Module", + "sortText": "R", + "filterText": "local_project1", + "insertText": "local_project1", + "insertTextFormat": "Snippet", + "additionalTextEdits": [ + { + "range": { + "start": { + "line": 1, + "character": 0 + }, + "end": { + "line": 1, + "character": 0 + } + }, + "newText": "import test/local_project1;\n" + } + ] + }, + { + "label": "ballerina/lang.runtime", + "kind": "Module", + "detail": "Module", + "sortText": "R", + "filterText": "runtime", + "insertText": "runtime", + "insertTextFormat": "Snippet", + "additionalTextEdits": [ + { + "range": { + "start": { + "line": 1, + "character": 0 + }, + "end": { + "line": 1, + "character": 0 + } + }, + "newText": "import ballerina/lang.runtime;\n" + } + ] + }, + { + "label": "ballerina/lang.value", + "kind": "Module", + "detail": "Module", + "sortText": "R", + "filterText": "value", + "insertText": "value", + "insertTextFormat": "Snippet", + "additionalTextEdits": [ + { + "range": { + "start": { + "line": 1, + "character": 0 + }, + "end": { + "line": 1, + "character": 0 + } + }, + "newText": "import ballerina/lang.value;\n" + } + ] + }, + { + "label": "ballerina/module1", + "kind": "Module", + "detail": "Module", + "sortText": "R", + "filterText": "module1", + "insertText": "module1", + "insertTextFormat": "Snippet", + "additionalTextEdits": [ + { + "range": { + "start": { + "line": 1, + "character": 0 + }, + "end": { + "line": 1, + "character": 0 + } + }, + "newText": "import ballerina/module1;\n" + } + ] + }, + { + "label": "ballerina/lang.array", + "kind": "Module", + "detail": "Module", + "sortText": "R", + "filterText": "array", + "insertText": "array", + "insertTextFormat": "Snippet", + "additionalTextEdits": [ + { + "range": { + "start": { + "line": 1, + "character": 0 + }, + "end": { + "line": 1, + "character": 0 + } + }, + "newText": "import ballerina/lang.array;\n" + } + ] + }, + { + "label": "ballerina/jballerina.java", + "kind": "Module", + "detail": "Module", + "sortText": "R", + "filterText": "java", + "insertText": "java", + "insertTextFormat": "Snippet", + "additionalTextEdits": [ + { + "range": { + "start": { + "line": 1, + "character": 0 + }, + "end": { + "line": 1, + "character": 0 + } + }, + "newText": "import ballerina/jballerina.java;\n" + } + ] + }, + { + "label": "ballerina/lang.test", + "kind": "Module", + "detail": "Module", + "sortText": "R", + "filterText": "test", + "insertText": "test", + "insertTextFormat": "Snippet", + "additionalTextEdits": [ + { + "range": { + "start": { + "line": 1, + "character": 0 + }, + "end": { + "line": 1, + "character": 0 + } + }, + "newText": "import ballerina/lang.test;\n" + } + ] + }, + { + "label": "null", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "null", + "insertText": "null", + "insertTextFormat": "Snippet" + }, + { + "label": "ballerina/lang.regexp", + "kind": "Module", + "detail": "Module", + "sortText": "R", + "filterText": "regexp", + "insertText": "regexp", + "insertTextFormat": "Snippet", + "additionalTextEdits": [ + { + "range": { + "start": { + "line": 1, + "character": 0 + }, + "end": { + "line": 1, + "character": 0 + } + }, + "newText": "import ballerina/lang.regexp;\n" + } + ] + }, + { + "label": "readonly", + "kind": "TypeParameter", + "detail": "Readonly", + "sortText": "N", + "insertText": "readonly", + "insertTextFormat": "Snippet" + }, + { + "label": "handle", + "kind": "TypeParameter", + "detail": "Handle", + "sortText": "N", + "insertText": "handle", + "insertTextFormat": "Snippet" + }, + { + "label": "never", + "kind": "TypeParameter", + "detail": "Never", + "sortText": "N", + "insertText": "never", + "insertTextFormat": "Snippet" + }, + { + "label": "json", + "kind": "TypeParameter", + "detail": "Json", + "sortText": "N", + "insertText": "json", + "insertTextFormat": "Snippet" + }, + { + "label": "anydata", + "kind": "TypeParameter", + "detail": "Anydata", + "sortText": "N", + "insertText": "anydata", + "insertTextFormat": "Snippet" + }, + { + "label": "any", + "kind": "TypeParameter", + "detail": "Any", + "sortText": "N", + "insertText": "any", + "insertTextFormat": "Snippet" + }, + { + "label": "byte", + "kind": "TypeParameter", + "detail": "Byte", + "sortText": "N", + "insertText": "byte", + "insertTextFormat": "Snippet" + }, + { + "label": "service", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "Q", + "filterText": "service", + "insertText": "service", + "insertTextFormat": "Snippet" + }, + { + "label": "decimal", + "kind": "TypeParameter", + "detail": "Decimal", + "sortText": "N", + "insertText": "decimal", + "insertTextFormat": "Snippet" + }, + { + "label": "error", + "kind": "Event", + "detail": "Error", + "sortText": "L", + "insertText": "error", + "insertTextFormat": "Snippet" + }, + { + "label": "xml", + "kind": "TypeParameter", + "detail": "Xml", + "sortText": "N", + "insertText": "xml", + "insertTextFormat": "Snippet" + }, + { + "label": "boolean", + "kind": "TypeParameter", + "detail": "Boolean", + "sortText": "N", + "insertText": "boolean", + "insertTextFormat": "Snippet" + }, + { + "label": "future", + "kind": "TypeParameter", + "detail": "Future", + "sortText": "N", + "insertText": "future", + "insertTextFormat": "Snippet" + }, + { + "label": "int", + "kind": "TypeParameter", + "detail": "Int", + "sortText": "N", + "insertText": "int", + "insertTextFormat": "Snippet" + }, + { + "label": "float", + "kind": "TypeParameter", + "detail": "Float", + "sortText": "N", + "insertText": "float", + "insertTextFormat": "Snippet" + }, + { + "label": "function", + "kind": "TypeParameter", + "detail": "Function", + "sortText": "N", + "insertText": "function", + "insertTextFormat": "Snippet" + }, + { + "label": "string", + "kind": "TypeParameter", + "detail": "String", + "sortText": "N", + "insertText": "string", + "insertTextFormat": "Snippet" + }, + { + "label": "typedesc", + "kind": "TypeParameter", + "detail": "Typedesc", + "sortText": "N", + "insertText": "typedesc", + "insertTextFormat": "Snippet" + }, + { + "label": "testFunction()", + "kind": "Function", + "detail": "()", + "documentation": { + "right": { + "kind": "markdown", + "value": "**Package:** _._ \n \n \n" + } + }, + "sortText": "C", + "filterText": "testFunction", + "insertText": "testFunction()", + "insertTextFormat": "Snippet" + } + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/completion/import_decl/source/source15.bal b/language-server/modules/langserver-core/src/test/resources/completion/import_decl/source/source15.bal new file mode 100644 index 000000000000..8f8a429c1f6a --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/completion/import_decl/source/source15.bal @@ -0,0 +1,5 @@ +// License header + +function testFunction() { + module1 +} From 97d4aef9f560806d770e140c287c128e465025c7 Mon Sep 17 00:00:00 2001 From: Tharushi Jayasekara Date: Mon, 17 Jul 2023 16:27:37 +0530 Subject: [PATCH 36/67] Fix failing tests --- .../config/client_remote_action_config1.json | 41 +++++++------- .../config/remote_action_config8.json | 41 +++++++------- .../config/annotationDeclAnnotation1.json | 41 +++++++------- .../config/annotationDeclAnnotation2.json | 41 +++++++------- .../config/anonFuncExprAnnotation1.json | 41 +++++++------- .../config/anonFuncExprAnnotation2.json | 41 +++++++------- .../config/enumMemberAnnotation1.json | 41 +++++++------- .../config/enumMemberAnnotation2.json | 41 +++++++------- .../config/externalFunctionAnnotation1.json | 41 +++++++------- .../config/externalFunctionAnnotation2.json | 41 +++++++------- .../config/functionAnnotation2.json | 41 +++++++------- .../config/letVarAnnotation1.json | 41 +++++++------- .../config/letVarAnnotation2.json | 41 +++++++------- .../config/listenerAnnotation1.json | 41 +++++++------- .../config/listenerAnnotation2.json | 41 +++++++------- .../config/localVarAnnotation1.json | 41 +++++++------- .../config/localVarAnnotation2.json | 41 +++++++------- .../config/methodDeclAnnotation1.json | 41 +++++++------- .../config/methodDeclAnnotation2.json | 41 +++++++------- .../config/methodDefnAnnotation1.json | 41 +++++++------- .../config/methodDefnAnnotation2.json | 41 +++++++------- .../config/moduleClassDefAnnotation1.json | 41 +++++++------- .../config/moduleClassDefAnnotation2.json | 41 +++++++------- .../config/moduleConstAnnotation1.json | 41 +++++++------- .../config/moduleConstAnnotation2.json | 41 +++++++------- .../config/moduleEnumAnnotation1.json | 41 +++++++------- .../config/moduleEnumAnnotation2.json | 41 +++++++------- .../config/moduleTypeDefAnnotation1.json | 41 +++++++------- .../config/moduleTypeDefAnnotation2.json | 41 +++++++------- .../config/moduleVarAnnotation1.json | 41 +++++++------- .../config/moduleVarAnnotation2.json | 41 +++++++------- .../config/objectFieldAnnotation1.json | 41 +++++++------- .../config/objectFieldAnnotation2.json | 41 +++++++------- .../config/objectFieldDescAnnotation1.json | 41 +++++++------- .../config/objectFieldDescAnnotation2.json | 41 +++++++------- .../config/paramAnnotation1.json | 41 +++++++------- .../config/paramAnnotation2.json | 41 +++++++------- .../config/paramAnnotation5.json | 41 +++++++------- .../config/paramAnnotation7.json | 41 +++++++------- .../config/recordFieldAnnotation1.json | 41 +++++++------- .../config/recordFieldAnnotation2.json | 41 +++++++------- .../config/resourceAnnotation1.json | 41 +++++++------- .../config/resourceAnnotation2.json | 41 +++++++------- .../config/returnTypeDescAnnotation1.json | 41 +++++++------- .../config/returnTypeDescAnnotation2.json | 41 +++++++------- .../config/serviceAnnotation1.json | 41 +++++++------- .../config/serviceAnnotation2.json | 41 +++++++------- .../config/startActionAnnotation1.json | 41 +++++++------- .../config/startActionAnnotation2.json | 41 +++++++------- .../config/typeCastExprAnnotation1.json | 41 +++++++------- .../config/typeCastExprAnnotation2.json | 41 +++++++------- .../config/workerDeclAnnotation1.json | 41 +++++++------- .../config/workerDeclAnnotation2.json | 41 +++++++------- .../annotation_decl/config/config1.json | 41 +++++++------- .../annotation_decl/config/config2.json | 41 +++++++------- .../annotation_decl/config/config21.json | 41 +++++++------- .../completion/class_def/config/config1.json | 40 +++++++------- .../completion/class_def/config/config10.json | 41 +++++++------- .../completion/class_def/config/config16.json | 40 +++++++------- .../completion/class_def/config/config17.json | 40 +++++++------- .../completion/class_def/config/config18.json | 41 +++++++------- .../completion/class_def/config/config19.json | 41 +++++++------- .../completion/class_def/config/config2.json | 40 +++++++------- .../completion/class_def/config/config25.json | 41 +++++++------- .../completion/class_def/config/config26.json | 41 +++++++------- .../completion/class_def/config/config28.json | 41 +++++++------- .../completion/class_def/config/config29.json | 41 +++++++------- .../completion/class_def/config/config3.json | 40 +++++++------- .../completion/class_def/config/config30.json | 41 +++++++------- .../completion/class_def/config/config4.json | 40 +++++++------- .../completion/class_def/config/config6.json | 41 +++++++------- .../completion/class_def/config/config8.json | 40 +++++++------- .../config/comment_config3.json | 45 ++++++++-------- .../config/comment_config4.json | 45 ++++++++-------- .../config/comment_config5.json | 45 ++++++++-------- .../enum_decl_ctx/config/config5.json | 41 +++++++------- .../config/annotation_access_ctx_config1.json | 41 +++++++------- .../annotation_access_ctx_config13.json | 41 +++++++------- .../config/annotation_access_ctx_config5.json | 41 +++++++------- .../config/anon_func_expr_ctx_config1.json | 41 +++++++------- .../config/anon_func_expr_ctx_config10.json | 41 +++++++------- .../config/anon_func_expr_ctx_config2.json | 41 +++++++------- .../config/anon_func_expr_ctx_config5.json | 41 +++++++------- .../config/anon_func_expr_ctx_config7.json | 41 +++++++------- .../config/anon_func_expr_ctx_config8.json | 41 +++++++------- .../config/check_expression_ctx_config1.json | 41 +++++++------- .../config/check_expression_ctx_config2.json | 41 +++++++------- .../config/conditional_expr_ctx_config1.json | 41 +++++++------- .../config/conditional_expr_ctx_config10.json | 41 +++++++------- .../config/conditional_expr_ctx_config2.json | 41 +++++++------- .../config/conditional_expr_ctx_config3.json | 41 +++++++------- .../config/conditional_expr_ctx_config4.json | 41 +++++++------- .../config/conditional_expr_ctx_config8.json | 41 +++++++------- .../error_constructor_expr_ctx_config1.json | 41 +++++++------- .../error_constructor_expr_ctx_config2.json | 41 +++++++------- .../error_constructor_expr_ctx_config3.json | 41 +++++++------- .../error_constructor_expr_ctx_config4.json | 41 +++++++------- .../error_constructor_expr_ctx_config7.json | 41 +++++++------- .../error_constructor_expr_ctx_config8.json | 41 +++++++------- .../config/fail_expr_ctx_config1.json | 41 +++++++------- .../config/fail_expr_ctx_config2.json | 41 +++++++------- .../function_call_expression_ctx_config1.json | 41 +++++++------- .../function_call_expression_ctx_config2.json | 41 +++++++------- .../function_call_expression_ctx_config3.json | 41 +++++++------- .../function_call_expression_ctx_config4.json | 41 +++++++------- .../function_call_expression_ctx_config7.json | 41 +++++++------- .../function_call_expression_ctx_config8.json | 41 +++++++------- .../config/mapping_expr_ctx_config1.json | 40 +++++++------- .../config/mapping_expr_ctx_config2.json | 40 +++++++------- .../config/mapping_expr_ctx_config5.json | 40 +++++++------- .../config/mapping_expr_ctx_config55.json | 40 +++++++------- .../config/mapping_expr_ctx_config56.json | 40 +++++++------- .../config/mapping_expr_ctx_config6.json | 40 +++++++------- .../config/mapping_expr_ctx_config7.json | 40 +++++++------- .../member_access_expr_ctx_config1.json | 41 +++++++------- .../member_access_expr_ctx_config2.json | 41 +++++++------- .../method_call_expression_ctx_config1.json | 41 +++++++------- .../method_call_expression_ctx_config2.json | 41 +++++++------- .../method_call_expression_ctx_config5.json | 41 +++++++------- .../method_call_expression_ctx_config6.json | 41 +++++++------- .../config/module_ctx_config1.json | 41 +++++++------- .../config/module_ctx_config2.json | 41 +++++++------- .../config/module_ctx_config3.json | 41 +++++++------- .../config/module_ctx_config4.json | 41 +++++++------- .../config/module_ctx_config5.json | 41 +++++++------- .../config/new_expr_ctx_config10.json | 41 +++++++------- .../config/new_expr_ctx_config10a.json | 41 +++++++------- .../config/new_expr_ctx_config11.json | 41 +++++++------- .../config/new_expr_ctx_config12.json | 41 +++++++------- .../config/new_expr_ctx_config14.json | 41 +++++++------- .../config/new_expr_ctx_config15.json | 41 +++++++------- .../config/new_expr_ctx_config17.json | 41 +++++++------- .../config/new_expr_ctx_config18.json | 41 +++++++------- .../config/new_expr_ctx_config19.json | 41 +++++++------- .../config/new_expr_ctx_config20.json | 41 +++++++------- .../config/new_expr_ctx_config21.json | 41 +++++++------- .../config/new_expr_ctx_config5.json | 41 +++++++------- .../config/new_expr_ctx_config6.json | 41 +++++++------- .../config/new_expr_ctx_config7.json | 41 +++++++------- .../config/new_expr_ctx_config8.json | 41 +++++++------- .../config/new_expr_ctx_config9.json | 41 +++++++------- .../object_constructor_expr_ctx_config13.json | 41 +++++++------- .../object_constructor_expr_ctx_config15.json | 41 +++++++------- .../object_constructor_expr_ctx_config2.json | 41 +++++++------- .../object_constructor_expr_ctx_config4.json | 41 +++++++------- .../object_constructor_expr_ctx_config5.json | 41 +++++++------- .../object_constructor_expr_ctx_config7.json | 41 +++++++------- .../object_constructor_expr_ctx_config9.json | 41 +++++++------- .../config/trap_expression_ctx_config1.json | 41 +++++++------- .../config/trap_expression_ctx_config2.json | 41 +++++++------- .../type_test_expression_ctx_config1.json | 41 +++++++------- .../type_test_expression_ctx_config2.json | 41 +++++++------- .../type_test_expression_ctx_config5.json | 41 +++++++------- .../type_test_expression_ctx_config8.json | 41 +++++++------- .../type_test_expression_ctx_config9.json | 53 ++++++++++--------- .../config/typecast_expr_ctx_config1.json | 41 +++++++------- .../config/typecast_expr_ctx_config2.json | 41 +++++++------- .../config/typecast_expr_ctx_config4.json | 41 +++++++------- .../config/typecast_expr_ctx_config5.json | 41 +++++++------- .../config/typecast_expr_ctx_config6.json | 41 +++++++------- .../config/typeof_expression_ctx_config1.json | 41 +++++++------- .../config/typeof_expression_ctx_config2.json | 41 +++++++------- ...xml_attribute_access_expr_ctx_config1.json | 40 +++++++------- ...xml_attribute_access_expr_ctx_config2.json | 40 +++++++------- .../config/field_access_ctx_config21.json | 41 +++++++------- .../config/field_access_ctx_config38.json | 40 +++++++------- .../config/field_access_ctx_config39.json | 40 +++++++------- .../config/field_access_ctx_config40.json | 40 +++++++------- .../config/field_access_ctx_config41.json | 40 +++++++------- .../function_body/config/config1.json | 41 +++++++------- .../function_body/config/config12.json | 41 +++++++------- .../function_body/config/config13.json | 41 +++++++------- .../function_body/config/config2.json | 41 +++++++------- .../function_body/config/config3.json | 41 +++++++------- .../function_body/config/config4.json | 41 +++++++------- .../function_body/config/config5.json | 41 +++++++------- .../function_body/config/config6.json | 40 +++++++------- .../function_body/config/config7.json | 41 +++++++------- .../function_def/config/config10.json | 41 +++++++------- .../function_def/config/config11.json | 41 +++++++------- .../function_def/config/config14.json | 41 +++++++------- .../function_def/config/config15.json | 41 +++++++------- .../function_def/config/config18.json | 41 +++++++------- .../function_def/config/config19.json | 41 +++++++------- .../function_def/config/config23.json | 53 ++++++++++--------- .../function_def/config/config3.json | 41 +++++++------- .../function_def/config/config4.json | 41 +++++++------- .../function_def/config/config9.json | 41 +++++++------- .../import_decl/config/config11.json | 53 ++++++++++--------- .../import_decl/config/config12.json | 53 ++++++++++--------- .../import_decl/config/config21.json | 53 ++++++++++--------- .../listener_decl/config/config1.json | 40 +++++++------- .../listener_decl/config/config11.json | 41 +++++++------- .../listener_decl/config/config12.json | 41 +++++++------- .../listener_decl/config/config2.json | 40 +++++++------- .../listener_decl/config/config3b.json | 40 +++++++------- .../listener_decl/config/config3c.json | 40 +++++++------- .../listener_decl/config/config4.json | 40 +++++++------- .../listener_decl/config/config5.json | 40 +++++++------- .../listener_decl/config/config7.json | 40 +++++++------- .../listener_decl/config/config8.json | 40 +++++++------- .../listener_decl/config/config9.json | 40 +++++++------- .../module_const_context/config/config1.json | 41 +++++++------- .../module_const_context/config/config10.json | 40 +++++++------- .../module_const_context/config/config2.json | 40 +++++++------- .../module_const_context/config/config4.json | 40 +++++++------- .../module_const_context/config/config6.json | 40 +++++++------- .../module_const_context/config/config7.json | 40 +++++++------- .../module_part_context/config/config10.json | 41 +++++++------- .../module_part_context/config/config14.json | 44 +++++++-------- .../module_part_context/config/config15.json | 40 +++++++------- .../module_part_context/config/config16.json | 48 ++++++++--------- .../module_part_context/config/config6.json | 41 +++++++------- .../module_part_context/config/config8.json | 41 +++++++------- .../module_part_context/config/config9.json | 41 +++++++------- ...le_level_after_annotation_decl_config.json | 41 +++++++------- .../module_level_after_class_defn_config.json | 41 +++++++------- ...dule_level_after_configurable_config1.json | 40 +++++++------- .../module_level_after_const_decl_config.json | 41 +++++++------- .../module_level_after_enum_decl_config.json | 41 +++++++------- ...dule_level_after_funciton_defn_config.json | 41 +++++++------- ...module_level_after_import_decl_config.json | 41 +++++++------- ...dule_level_after_listener_decl_config.json | 41 +++++++------- ...odule_level_after_service_decl_config.json | 41 +++++++------- .../module_level_after_type_defn_config.json | 41 +++++++------- .../module_level_after_var_decl_config.json | 41 +++++++------- .../module_level_after_xmlns_decl_config.json | 41 +++++++------- ...e_level_before_annotation_decl_config.json | 41 +++++++------- ...module_level_before_class_defn_config.json | 41 +++++++------- ...module_level_before_const_decl_config.json | 41 +++++++------- .../module_level_before_enum_decl_config.json | 41 +++++++------- ...ule_level_before_function_defn_config.json | 41 +++++++------- ...odule_level_before_import_decl_config.json | 41 +++++++------- ...ule_level_before_listener_decl_config.json | 41 +++++++------- ...dule_level_before_service_decl_config.json | 41 +++++++------- .../module_level_before_type_defn_config.json | 41 +++++++------- .../module_level_before_var_decl_config.json | 41 +++++++------- ...module_level_before_xmlns_decl_config.json | 41 +++++++------- .../module_var_context/config/config1.json | 41 +++++++------- .../module_var_context/config/config16.json | 40 +++++++------- .../module_var_context/config/config18.json | 40 +++++++------- .../module_var_context/config/config2.json | 41 +++++++------- .../module_var_context/config/config5.json | 41 +++++++------- .../module_var_context/config/config6.json | 41 +++++++------- .../module_var_context/config/config7.json | 41 +++++++------- .../module_var_context/config/config9.json | 41 +++++++------- .../config/config1.json | 41 +++++++------- .../config/config2.json | 41 +++++++------- .../config/config8.json | 41 +++++++------- .../config/performance_completion.json | 41 +++++++------- .../config/query_expr_ctx_config14.json | 40 +++++++------- .../config/query_expr_ctx_config22.json | 41 +++++++------- .../config/query_expr_ctx_config23.json | 41 +++++++------- .../config/query_expr_ctx_config24.json | 41 +++++++------- .../config/query_expr_ctx_config25.json | 41 +++++++------- .../config/query_expr_ctx_config26.json | 41 +++++++------- .../config/query_expr_ctx_config7.json | 40 +++++++------- .../config/query_expr_ctx_config8.json | 40 +++++++------- .../query_expr_ctx_join_clause_config1.json | 41 +++++++------- .../query_expr_ctx_join_clause_config12.json | 41 +++++++------- .../query_expr_ctx_join_clause_config2.json | 41 +++++++------- .../query_expr_ctx_join_clause_config5.json | 41 +++++++------- .../query_expr_ctx_let_clause_config1.json | 41 +++++++------- .../query_expr_ctx_let_clause_config10.json | 41 +++++++------- .../query_expr_ctx_let_clause_config11.json | 41 +++++++------- .../query_expr_ctx_let_clause_config2.json | 41 +++++++------- .../query_expr_ctx_let_clause_config4.json | 41 +++++++------- .../query_expr_ctx_let_clause_config5.json | 41 +++++++------- .../query_expr_ctx_let_clause_config6.json | 41 +++++++------- .../query_expr_ctx_let_clause_config7.json | 41 +++++++------- .../query_expr_ctx_let_clause_config8.json | 41 +++++++------- .../query_expr_ctx_let_clause_config9.json | 41 +++++++------- .../query_expr_ctx_limit_clause_config1.json | 41 +++++++------- .../query_expr_ctx_limit_clause_config2.json | 41 +++++++------- .../query_expr_ctx_limit_clause_config4.json | 41 +++++++------- ...ry_expr_ctx_onconflict_clause_config2.json | 41 +++++++------- ...query_expr_ctx_orderby_clause_config1.json | 41 +++++++------- ...query_expr_ctx_orderby_clause_config2.json | 41 +++++++------- .../query_expr_ctx_select_clause_config1.json | 41 +++++++------- .../query_expr_ctx_select_clause_config2.json | 41 +++++++------- .../record_type_desc/config/config1.json | 41 +++++++------- .../record_type_desc/config/config10.json | 41 +++++++------- .../record_type_desc/config/config2.json | 41 +++++++------- .../record_type_desc/config/config5.json | 41 +++++++------- .../record_type_desc/config/config6.json | 41 +++++++------- .../record_type_desc/config/config7.json | 41 +++++++------- .../record_type_desc/config/config8.json | 41 +++++++------- .../record_type_desc/config/config9.json | 41 +++++++------- .../service_body/config/config4.json | 41 +++++++------- .../service_body/config/config5.json | 40 +++++++------- .../service_decl/config/config1.json | 41 +++++++------- .../service_decl/config/config10.json | 40 +++++++------- .../service_decl/config/config11.json | 40 +++++++------- .../service_decl/config/config12.json | 41 +++++++------- .../service_decl/config/config14.json | 40 +++++++------- .../service_decl/config/config15.json | 40 +++++++------- .../service_decl/config/config16.json | 41 +++++++------- .../service_decl/config/config17.json | 41 +++++++------- .../service_decl/config/config18.json | 41 +++++++------- .../service_decl/config/config2.json | 41 +++++++------- .../service_decl/config/config3.json | 41 +++++++------- .../service_decl/config/config4.json | 41 +++++++------- .../service_decl/config/config6c.json | 41 +++++++------- .../service_decl/config/config6d.json | 41 +++++++------- .../service_decl/config/config6g.json | 41 +++++++------- .../service_decl/config/config7.json | 41 +++++++------- .../config/assignment_stmt_ctx_config1.json | 41 +++++++------- .../config/assignment_stmt_ctx_config2.json | 41 +++++++------- .../config/assignment_stmt_ctx_config3.json | 41 +++++++------- .../config/assignment_stmt_ctx_config8.json | 41 +++++++------- .../config/assignment_stmt_ctx_config9.json | 40 +++++++------- .../config/do_stmt_ctx_config1.json | 41 +++++++------- .../config/match_stmt_ctx_config14.json | 41 +++++++------- .../config/match_stmt_ctx_config15.json | 41 +++++++------- .../config/match_stmt_ctx_config16.json | 41 +++++++------- .../config/match_stmt_ctx_config2.json | 41 +++++++------- .../config/match_stmt_ctx_config20.json | 41 +++++++------- .../config/match_stmt_ctx_config21.json | 41 +++++++------- .../config/match_stmt_ctx_config22.json | 41 +++++++------- .../config/match_stmt_ctx_config4.json | 41 +++++++------- .../config/match_stmt_ctx_config5.json | 41 +++++++------- .../config/onfail_clause_ctx_config1.json | 41 +++++++------- .../config/onfail_clause_ctx_config1a.json | 41 +++++++------- .../config/onfail_clause_ctx_config2.json | 41 +++++++------- .../config/onfail_clause_ctx_config2a.json | 41 +++++++------- .../config/onfail_clause_ctx_config2c.json | 41 +++++++------- .../config/onfail_clause_ctx_config3.json | 41 +++++++------- .../config/onfail_clause_ctx_config4.json | 41 +++++++------- .../config/onfail_clause_ctx_config5.json | 41 +++++++------- .../config/onfail_clause_ctx_config5a.json | 41 +++++++------- .../config/onfail_clause_ctx_config6.json | 43 +++++++-------- .../config/onfail_clause_ctx_config6a.json | 43 +++++++-------- .../config/return_stmt_ctx_config1.json | 41 +++++++------- .../config/return_stmt_ctx_config12.json | 41 +++++++------- .../config/return_stmt_ctx_config13.json | 41 +++++++------- .../config/return_stmt_ctx_config2.json | 41 +++++++------- .../config/return_stmt_ctx_config3.json | 41 +++++++------- .../config/return_stmt_ctx_config4.json | 41 +++++++------- .../config/return_stmt_ctx_config5.json | 41 +++++++------- .../config/transaction_config1.json | 41 +++++++------- .../config/transaction_config2.json | 41 +++++++------- .../config/transaction_config3.json | 41 +++++++------- .../config/wait_action_ctx_config11.json | 41 +++++++------- .../config/wait_action_ctx_config12.json | 41 +++++++------- .../config/xmlns_ctx_config3.json | 41 +++++++------- .../config/xmlns_ctx_config4.json | 41 +++++++------- .../string_template_expression_config4.json | 41 +++++++------- .../string_template_expression_config5.json | 41 +++++++------- .../xml_template_expression_config1.json | 41 +++++++------- .../xml_template_expression_config2.json | 41 +++++++------- .../completion/type_def/config/config1.json | 41 +++++++------- .../completion/type_def/config/config2.json | 41 +++++++------- .../config/array_typedesc5.json | 41 +++++++------- .../config/distinct_typedesc1.json | 41 +++++++------- .../config/distinct_typedesc2.json | 41 +++++++------- .../config/error_typedesc1.json | 41 +++++++------- .../config/error_typedesc2.json | 41 +++++++------- .../config/error_typedesc5.json | 41 +++++++------- .../config/function_typedesc1.json | 41 +++++++------- .../config/function_typedesc12.json | 41 +++++++------- .../config/function_typedesc15.json | 41 +++++++------- .../config/function_typedesc15a.json | 40 +++++++------- .../config/function_typedesc15b.json | 40 +++++++------- .../config/function_typedesc3.json | 41 +++++++------- .../config/function_typedesc4.json | 41 +++++++------- .../config/function_typedesc5.json | 41 +++++++------- .../config/function_typedesc8.json | 41 +++++++------- .../config/function_typedesc9.json | 41 +++++++------- .../config/future_typedesc1.json | 41 +++++++------- .../config/intersection_type_typedesc1.json | 41 +++++++------- .../config/intersection_type_typedesc2.json | 41 +++++++------- .../config/map_typedesc1.json | 41 +++++++------- .../config/map_typedesc2.json | 41 +++++++------- .../config/object_typedesc11.json | 41 +++++++------- .../config/object_typedesc3.json | 41 +++++++------- .../config/object_typedesc4.json | 41 +++++++------- .../config/object_typedesc5.json | 41 +++++++------- .../config/object_typedesc6.json | 41 +++++++------- .../config/object_typedesc7.json | 41 +++++++------- .../config/object_typedesc8.json | 41 +++++++------- .../config/stream_typedesc1.json | 41 +++++++------- .../config/stream_typedesc4.json | 41 +++++++------- .../config/table_typedesc1.json | 41 +++++++------- .../config/table_typedesc10.json | 41 +++++++------- .../config/table_typedesc2.json | 41 +++++++------- .../config/tuple_typedesc1.json | 41 +++++++------- .../config/tuple_typedesc2.json | 41 +++++++------- .../config/tuple_typedesc5.json | 41 +++++++------- .../config/union_typedesc1.json | 41 +++++++------- .../config/union_typedesc2.json | 41 +++++++------- .../config/project_var_def_ctx_config1.json | 45 ++++++++-------- .../config/project_var_def_ctx_config2.json | 45 ++++++++-------- .../config/var_def_ctx_config1.json | 41 +++++++------- .../config/var_def_ctx_config2.json | 41 +++++++------- .../config/var_def_ctx_config7.json | 40 +++++++------- .../config/var_def_ctx_config8.json | 41 +++++++------- .../config/var_def_ctx_config9.json | 41 +++++++------- 397 files changed, 8332 insertions(+), 7988 deletions(-) diff --git a/language-server/modules/langserver-core/src/test/resources/completion/action_node_context/config/client_remote_action_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/action_node_context/config/client_remote_action_config1.json index 45d427d7a780..5cbef70cce12 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/action_node_context/config/client_remote_action_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/action_node_context/config/client_remote_action_config1.json @@ -4,6 +4,7 @@ "character": 13 }, "source": "action_node_context/source/client_remote_action_source1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -487,11 +488,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -511,11 +512,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -535,11 +536,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -559,11 +560,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -583,11 +584,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/action_node_context/config/remote_action_config8.json b/language-server/modules/langserver-core/src/test/resources/completion/action_node_context/config/remote_action_config8.json index 5ab0b9f09361..be2b6c10f3be 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/action_node_context/config/remote_action_config8.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/action_node_context/config/remote_action_config8.json @@ -4,6 +4,7 @@ "character": 18 }, "source": "action_node_context/source/remote_action_source8.bal", + "description": "", "items": [ { "label": "test/project2", @@ -17,11 +18,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -41,11 +42,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -65,11 +66,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -89,11 +90,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -146,11 +147,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -170,11 +171,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -194,11 +195,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -218,11 +219,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -242,11 +243,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/annotationDeclAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/annotationDeclAnnotation1.json index 2966aad28495..ca91de50f91a 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/annotationDeclAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/annotationDeclAnnotation1.json @@ -4,6 +4,7 @@ "character": 1 }, "source": "annotation_ctx/source/annotationDeclAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -222,11 +223,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -246,11 +247,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -270,11 +271,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -294,11 +295,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -318,11 +319,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/annotationDeclAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/annotationDeclAnnotation2.json index beea3355fbe7..5b1d98d25976 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/annotationDeclAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/annotationDeclAnnotation2.json @@ -4,6 +4,7 @@ "character": 2 }, "source": "annotation_ctx/source/annotationDeclAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -222,11 +223,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -246,11 +247,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -270,11 +271,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -294,11 +295,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -318,11 +319,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/anonFuncExprAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/anonFuncExprAnnotation1.json index aa33188e9ee0..bd0b3ddce555 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/anonFuncExprAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/anonFuncExprAnnotation1.json @@ -4,6 +4,7 @@ "character": 20 }, "source": "annotation_ctx/source/anonFuncExprAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -222,11 +223,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -246,11 +247,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -270,11 +271,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -294,11 +295,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -318,11 +319,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/anonFuncExprAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/anonFuncExprAnnotation2.json index 942d6175ed25..fac37810333c 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/anonFuncExprAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/anonFuncExprAnnotation2.json @@ -4,6 +4,7 @@ "character": 21 }, "source": "annotation_ctx/source/anonFuncExprAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -222,11 +223,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -246,11 +247,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -270,11 +271,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -294,11 +295,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -318,11 +319,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/enumMemberAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/enumMemberAnnotation1.json index 007d98df4829..26d0be9f3337 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/enumMemberAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/enumMemberAnnotation1.json @@ -4,6 +4,7 @@ "character": 5 }, "source": "annotation_ctx/source/enumMemberAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -222,11 +223,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -246,11 +247,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -270,11 +271,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -294,11 +295,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -318,11 +319,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/enumMemberAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/enumMemberAnnotation2.json index 17cf14adfaf0..80dd2c856e42 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/enumMemberAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/enumMemberAnnotation2.json @@ -4,6 +4,7 @@ "character": 6 }, "source": "annotation_ctx/source/enumMemberAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -222,11 +223,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -246,11 +247,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -270,11 +271,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -294,11 +295,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -318,11 +319,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/externalFunctionAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/externalFunctionAnnotation1.json index 0736e7dd16c2..611cad7857fa 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/externalFunctionAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/externalFunctionAnnotation1.json @@ -4,6 +4,7 @@ "character": 27 }, "source": "annotation_ctx/source/externalFunctionAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -204,11 +205,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -228,11 +229,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -252,11 +253,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -276,11 +277,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -300,11 +301,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/externalFunctionAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/externalFunctionAnnotation2.json index c61ecf57df3d..e23f771bff30 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/externalFunctionAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/externalFunctionAnnotation2.json @@ -4,6 +4,7 @@ "character": 28 }, "source": "annotation_ctx/source/externalFunctionAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -204,11 +205,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -228,11 +229,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -252,11 +253,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -276,11 +277,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -300,11 +301,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/functionAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/functionAnnotation2.json index 0516dc04ec99..b0d0a003fc1b 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/functionAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/functionAnnotation2.json @@ -4,6 +4,7 @@ "character": 2 }, "source": "annotation_ctx/source/functionAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -222,11 +223,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -246,11 +247,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -270,11 +271,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -294,11 +295,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -318,11 +319,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/letVarAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/letVarAnnotation1.json index f392fb86e6c3..7c783a67b3c8 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/letVarAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/letVarAnnotation1.json @@ -4,6 +4,7 @@ "character": 17 }, "source": "annotation_ctx/source/letVarAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -222,11 +223,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -246,11 +247,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -270,11 +271,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -294,11 +295,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -318,11 +319,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/letVarAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/letVarAnnotation2.json index c10b62e94e36..fd7d93a7acda 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/letVarAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/letVarAnnotation2.json @@ -4,6 +4,7 @@ "character": 18 }, "source": "annotation_ctx/source/letVarAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -222,11 +223,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -246,11 +247,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -270,11 +271,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -294,11 +295,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -318,11 +319,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/listenerAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/listenerAnnotation1.json index 32f7f597d4eb..099028d158c1 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/listenerAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/listenerAnnotation1.json @@ -4,6 +4,7 @@ "character": 1 }, "source": "annotation_ctx/source/listenerAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -231,11 +232,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -255,11 +256,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -279,11 +280,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -303,11 +304,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -327,11 +328,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/listenerAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/listenerAnnotation2.json index a0df7c8cd302..713838784e32 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/listenerAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/listenerAnnotation2.json @@ -4,6 +4,7 @@ "character": 2 }, "source": "annotation_ctx/source/listenerAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -204,11 +205,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -228,11 +229,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -252,11 +253,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -276,11 +277,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -300,11 +301,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/localVarAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/localVarAnnotation1.json index 62babb8a34a6..72387be7c66d 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/localVarAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/localVarAnnotation1.json @@ -4,6 +4,7 @@ "character": 5 }, "source": "annotation_ctx/source/localVarAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -222,11 +223,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -246,11 +247,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -270,11 +271,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -294,11 +295,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -318,11 +319,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/localVarAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/localVarAnnotation2.json index 9180f828f0ef..605f629a769c 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/localVarAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/localVarAnnotation2.json @@ -4,6 +4,7 @@ "character": 6 }, "source": "annotation_ctx/source/localVarAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -222,11 +223,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -246,11 +247,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -270,11 +271,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -294,11 +295,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -318,11 +319,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/methodDeclAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/methodDeclAnnotation1.json index 4cbf52c95304..6d3c55f6b341 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/methodDeclAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/methodDeclAnnotation1.json @@ -4,6 +4,7 @@ "character": 5 }, "source": "annotation_ctx/source/methodDeclAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -240,11 +241,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -264,11 +265,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -288,11 +289,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -312,11 +313,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -336,11 +337,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/methodDeclAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/methodDeclAnnotation2.json index a3c84ab95ca3..5cd9d0bc947e 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/methodDeclAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/methodDeclAnnotation2.json @@ -4,6 +4,7 @@ "character": 6 }, "source": "annotation_ctx/source/methodDeclAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -240,11 +241,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -264,11 +265,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -288,11 +289,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -312,11 +313,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -336,11 +337,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/methodDefnAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/methodDefnAnnotation1.json index 824ee47922f1..2f560381ac62 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/methodDefnAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/methodDefnAnnotation1.json @@ -4,6 +4,7 @@ "character": 9 }, "source": "annotation_ctx/source/methodDefnAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -240,11 +241,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -264,11 +265,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -288,11 +289,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -312,11 +313,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -336,11 +337,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/methodDefnAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/methodDefnAnnotation2.json index 2027a51daef1..6607b22edc2b 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/methodDefnAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/methodDefnAnnotation2.json @@ -4,6 +4,7 @@ "character": 10 }, "source": "annotation_ctx/source/methodDefnAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -240,11 +241,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -264,11 +265,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -288,11 +289,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -312,11 +313,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -336,11 +337,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleClassDefAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleClassDefAnnotation1.json index 2126e12341ea..ad825727f77c 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleClassDefAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleClassDefAnnotation1.json @@ -4,6 +4,7 @@ "character": 1 }, "source": "annotation_ctx/source/moduleClassDefAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -231,11 +232,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -255,11 +256,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -279,11 +280,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -303,11 +304,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -327,11 +328,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleClassDefAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleClassDefAnnotation2.json index cc8f6560f31e..ef8d80b2d397 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleClassDefAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleClassDefAnnotation2.json @@ -4,6 +4,7 @@ "character": 2 }, "source": "annotation_ctx/source/moduleClassDefAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -231,11 +232,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -255,11 +256,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -279,11 +280,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -303,11 +304,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -327,11 +328,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleConstAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleConstAnnotation1.json index b1bd8ef4bd45..6a5dc1ccd02a 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleConstAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleConstAnnotation1.json @@ -4,6 +4,7 @@ "character": 1 }, "source": "annotation_ctx/source/moduleConstAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -222,11 +223,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -246,11 +247,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -270,11 +271,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -294,11 +295,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -318,11 +319,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleConstAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleConstAnnotation2.json index 83ff54145dd8..ebf5e7f1dd25 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleConstAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleConstAnnotation2.json @@ -4,6 +4,7 @@ "character": 2 }, "source": "annotation_ctx/source/moduleConstAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -222,11 +223,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -246,11 +247,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -270,11 +271,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -294,11 +295,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -318,11 +319,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleEnumAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleEnumAnnotation1.json index 6ca40c7afe55..c16e793b2d0d 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleEnumAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleEnumAnnotation1.json @@ -4,6 +4,7 @@ "character": 1 }, "source": "annotation_ctx/source/moduleEnumAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -267,11 +268,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -291,11 +292,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -315,11 +316,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -339,11 +340,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -363,11 +364,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleEnumAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleEnumAnnotation2.json index 680251e2b906..4a01ce3d7085 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleEnumAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleEnumAnnotation2.json @@ -4,6 +4,7 @@ "character": 2 }, "source": "annotation_ctx/source/moduleEnumAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -267,11 +268,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -291,11 +292,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -315,11 +316,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -339,11 +340,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -363,11 +364,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleTypeDefAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleTypeDefAnnotation1.json index 276d2957344f..111f8e44a980 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleTypeDefAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleTypeDefAnnotation1.json @@ -4,6 +4,7 @@ "character": 1 }, "source": "annotation_ctx/source/moduleTypeDefAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -267,11 +268,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -291,11 +292,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -315,11 +316,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -339,11 +340,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -363,11 +364,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleTypeDefAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleTypeDefAnnotation2.json index d45265f305b2..0842f50f4701 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleTypeDefAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleTypeDefAnnotation2.json @@ -4,6 +4,7 @@ "character": 2 }, "source": "annotation_ctx/source/moduleTypeDefAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -267,11 +268,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -291,11 +292,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -315,11 +316,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -339,11 +340,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -363,11 +364,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleVarAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleVarAnnotation1.json index 3b6fa88d5eb1..005d80ce79b2 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleVarAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleVarAnnotation1.json @@ -4,6 +4,7 @@ "character": 1 }, "source": "annotation_ctx/source/moduleVarAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -222,11 +223,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -246,11 +247,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -270,11 +271,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -294,11 +295,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -318,11 +319,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleVarAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleVarAnnotation2.json index b31e300a5934..382a24f0ea5b 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleVarAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/moduleVarAnnotation2.json @@ -4,6 +4,7 @@ "character": 2 }, "source": "annotation_ctx/source/moduleVarAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -222,11 +223,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -246,11 +247,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -270,11 +271,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -294,11 +295,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -318,11 +319,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/objectFieldAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/objectFieldAnnotation1.json index 561b9e3e32a7..b182e0f5923c 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/objectFieldAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/objectFieldAnnotation1.json @@ -4,6 +4,7 @@ "character": 9 }, "source": "annotation_ctx/source/objectFieldAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -240,11 +241,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -264,11 +265,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -288,11 +289,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -312,11 +313,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -336,11 +337,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/objectFieldAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/objectFieldAnnotation2.json index 0bd8a6573a9a..8b7ca9a3d7ec 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/objectFieldAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/objectFieldAnnotation2.json @@ -4,6 +4,7 @@ "character": 10 }, "source": "annotation_ctx/source/objectFieldAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -240,11 +241,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -264,11 +265,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -288,11 +289,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -312,11 +313,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -336,11 +337,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/objectFieldDescAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/objectFieldDescAnnotation1.json index 74a6dcc344e6..9c2b16b8024f 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/objectFieldDescAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/objectFieldDescAnnotation1.json @@ -4,6 +4,7 @@ "character": 5 }, "source": "annotation_ctx/source/objectFieldDescAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -240,11 +241,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -264,11 +265,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -288,11 +289,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -312,11 +313,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -336,11 +337,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/objectFieldDescAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/objectFieldDescAnnotation2.json index b121b7c66fce..f92594fa415b 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/objectFieldDescAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/objectFieldDescAnnotation2.json @@ -4,6 +4,7 @@ "character": 6 }, "source": "annotation_ctx/source/objectFieldDescAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -240,11 +241,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -264,11 +265,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -288,11 +289,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -312,11 +313,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -336,11 +337,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/paramAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/paramAnnotation1.json index 4f76ff97bab3..e22dbd11bbcf 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/paramAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/paramAnnotation1.json @@ -4,6 +4,7 @@ "character": 15 }, "source": "annotation_ctx/source/paramAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -249,11 +250,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -273,11 +274,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -297,11 +298,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -321,11 +322,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -345,11 +346,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/paramAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/paramAnnotation2.json index e7acd5f8e8bd..12587f1c4a79 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/paramAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/paramAnnotation2.json @@ -4,6 +4,7 @@ "character": 16 }, "source": "annotation_ctx/source/paramAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -249,11 +250,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -273,11 +274,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -297,11 +298,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -321,11 +322,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -345,11 +346,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/paramAnnotation5.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/paramAnnotation5.json index 37a345bc13e5..b564f491e866 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/paramAnnotation5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/paramAnnotation5.json @@ -4,6 +4,7 @@ "character": 22 }, "source": "annotation_ctx/source/paramAnnotation5.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -249,11 +250,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -273,11 +274,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -297,11 +298,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -321,11 +322,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -345,11 +346,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/paramAnnotation7.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/paramAnnotation7.json index 3c3faa242e0a..9377910c6c2f 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/paramAnnotation7.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/paramAnnotation7.json @@ -4,6 +4,7 @@ "character": 34 }, "source": "annotation_ctx/source/paramAnnotation7.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -249,11 +250,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -273,11 +274,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -297,11 +298,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -321,11 +322,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -345,11 +346,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/recordFieldAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/recordFieldAnnotation1.json index 391769a18129..c2065cbb185f 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/recordFieldAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/recordFieldAnnotation1.json @@ -4,6 +4,7 @@ "character": 5 }, "source": "annotation_ctx/source/recordFieldAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -231,11 +232,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -255,11 +256,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -279,11 +280,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -303,11 +304,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -336,11 +337,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/recordFieldAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/recordFieldAnnotation2.json index dca6b6aafcc8..5ab7dcd3cb9e 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/recordFieldAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/recordFieldAnnotation2.json @@ -4,6 +4,7 @@ "character": 6 }, "source": "annotation_ctx/source/recordFieldAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -231,11 +232,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -255,11 +256,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -279,11 +280,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -303,11 +304,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -336,11 +337,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/resourceAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/resourceAnnotation1.json index 7d04881e0289..174fd807541d 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/resourceAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/resourceAnnotation1.json @@ -4,6 +4,7 @@ "character": 5 }, "source": "annotation_ctx/source/resourceAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -231,11 +232,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -255,11 +256,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -279,11 +280,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -303,11 +304,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -327,11 +328,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/resourceAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/resourceAnnotation2.json index ae1c9a564085..a9d97af88a05 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/resourceAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/resourceAnnotation2.json @@ -4,6 +4,7 @@ "character": 6 }, "source": "annotation_ctx/source/resourceAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -231,11 +232,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -255,11 +256,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -279,11 +280,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -303,11 +304,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -327,11 +328,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/returnTypeDescAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/returnTypeDescAnnotation1.json index 4e7649f9b2c8..b4ba3fdc61ba 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/returnTypeDescAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/returnTypeDescAnnotation1.json @@ -4,6 +4,7 @@ "character": 25 }, "source": "annotation_ctx/source/returnTypeDescAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -231,11 +232,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -255,11 +256,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -279,11 +280,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -303,11 +304,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -327,11 +328,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/returnTypeDescAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/returnTypeDescAnnotation2.json index c48063382340..360974ad8d53 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/returnTypeDescAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/returnTypeDescAnnotation2.json @@ -4,6 +4,7 @@ "character": 26 }, "source": "annotation_ctx/source/returnTypeDescAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -231,11 +232,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -255,11 +256,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -279,11 +280,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -303,11 +304,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -327,11 +328,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/serviceAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/serviceAnnotation1.json index 1f1be50be06c..a96fe4e8919b 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/serviceAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/serviceAnnotation1.json @@ -4,6 +4,7 @@ "character": 1 }, "source": "annotation_ctx/source/serviceAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -213,11 +214,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -237,11 +238,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -261,11 +262,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -285,11 +286,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -309,11 +310,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/serviceAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/serviceAnnotation2.json index fe313509d000..fa445e8074fb 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/serviceAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/serviceAnnotation2.json @@ -4,6 +4,7 @@ "character": 2 }, "source": "annotation_ctx/source/serviceAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -213,11 +214,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -237,11 +238,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -261,11 +262,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -285,11 +286,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -309,11 +310,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/startActionAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/startActionAnnotation1.json index 0454eeacca7d..eaf621f46a1f 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/startActionAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/startActionAnnotation1.json @@ -4,6 +4,7 @@ "character": 12 }, "source": "annotation_ctx/source/startActionAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -213,11 +214,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -237,11 +238,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -261,11 +262,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -285,11 +286,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -309,11 +310,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/startActionAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/startActionAnnotation2.json index d00350b7ce99..b71fc0874085 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/startActionAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/startActionAnnotation2.json @@ -4,6 +4,7 @@ "character": 13 }, "source": "annotation_ctx/source/startActionAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -213,11 +214,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -237,11 +238,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -261,11 +262,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -285,11 +286,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -309,11 +310,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/typeCastExprAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/typeCastExprAnnotation1.json index 79277da254e8..d1db67490b33 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/typeCastExprAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/typeCastExprAnnotation1.json @@ -4,6 +4,7 @@ "character": 17 }, "source": "annotation_ctx/source/typeCastExprAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -267,11 +268,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -291,11 +292,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -315,11 +316,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -339,11 +340,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -363,11 +364,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/typeCastExprAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/typeCastExprAnnotation2.json index 64f46b810b22..f30ffa375cff 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/typeCastExprAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/typeCastExprAnnotation2.json @@ -4,6 +4,7 @@ "character": 18 }, "source": "annotation_ctx/source/typeCastExprAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -267,11 +268,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -291,11 +292,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -315,11 +316,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -339,11 +340,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -363,11 +364,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/workerDeclAnnotation1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/workerDeclAnnotation1.json index bdef377a8b89..ed4c5d941759 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/workerDeclAnnotation1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/workerDeclAnnotation1.json @@ -4,6 +4,7 @@ "character": 5 }, "source": "annotation_ctx/source/workerDeclAnnotation1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -213,11 +214,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -237,11 +238,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -261,11 +262,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -285,11 +286,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -309,11 +310,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/workerDeclAnnotation2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/workerDeclAnnotation2.json index 42bf92fb0a31..bac02a34004a 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/workerDeclAnnotation2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_ctx/config/workerDeclAnnotation2.json @@ -4,6 +4,7 @@ "character": 6 }, "source": "annotation_ctx/source/workerDeclAnnotation2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -213,11 +214,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -237,11 +238,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -261,11 +262,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -285,11 +286,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -309,11 +310,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_decl/config/config1.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_decl/config/config1.json index 04e6fda46681..216b34b38ba3 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_decl/config/config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_decl/config/config1.json @@ -4,6 +4,7 @@ "character": 24 }, "source": "annotation_decl/source/source1.bal", + "description": "", "items": [ { "label": "MapType", @@ -61,11 +62,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -85,11 +86,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -109,11 +110,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -133,11 +134,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -239,11 +240,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -263,11 +264,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -287,11 +288,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -311,11 +312,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -335,11 +336,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_decl/config/config2.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_decl/config/config2.json index 0a61545c2882..f782f46c9952 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_decl/config/config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_decl/config/config2.json @@ -4,6 +4,7 @@ "character": 25 }, "source": "annotation_decl/source/source2.bal", + "description": "", "items": [ { "label": "MapType", @@ -61,11 +62,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -85,11 +86,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -109,11 +110,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -133,11 +134,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -239,11 +240,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -263,11 +264,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -287,11 +288,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -311,11 +312,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -335,11 +336,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/annotation_decl/config/config21.json b/language-server/modules/langserver-core/src/test/resources/completion/annotation_decl/config/config21.json index e40966d34b62..7ac0a361c463 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/annotation_decl/config/config21.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/annotation_decl/config/config21.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "annotation_decl/source/source21.bal", + "description": "", "items": [ { "label": "type", @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -408,11 +409,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -432,11 +433,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -520,11 +521,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -544,11 +545,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -568,11 +569,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -592,11 +593,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -659,11 +660,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config1.json b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config1.json index 991ae259c952..cd5cdc2c0f0b 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config1.json @@ -207,11 +207,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -231,11 +231,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -255,11 +255,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -279,11 +279,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -303,11 +303,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -376,11 +376,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -400,11 +400,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -424,11 +424,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -448,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -481,11 +481,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config10.json b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config10.json index 7432fe32b535..e80b22dcbd3c 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config10.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config10.json @@ -4,6 +4,7 @@ "character": 39 }, "source": "class_def/source/source10.bal", + "description": "", "items": [ { "label": "testClass", @@ -125,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -149,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -173,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -197,11 +198,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -221,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -312,11 +313,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -336,11 +337,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -417,11 +418,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config16.json b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config16.json index 81923d60a3ea..e2a1565e0003 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config16.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config16.json @@ -207,11 +207,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -231,11 +231,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -255,11 +255,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -279,11 +279,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -303,11 +303,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -376,11 +376,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -400,11 +400,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -424,11 +424,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -448,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -549,11 +549,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config17.json b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config17.json index ffd7718e020f..71b9a30651ca 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config17.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config17.json @@ -207,11 +207,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -231,11 +231,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -255,11 +255,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -279,11 +279,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -303,11 +303,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -376,11 +376,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -400,11 +400,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -424,11 +424,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -448,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -481,11 +481,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config18.json b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config18.json index 173121e5a0b4..86bcd3c4b5de 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config18.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config18.json @@ -4,6 +4,7 @@ "character": 5 }, "source": "class_def/source/source18.bal", + "description": "", "items": [ { "label": "testClass", @@ -58,11 +59,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -82,11 +83,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -106,11 +107,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -130,11 +131,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -154,11 +155,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -218,11 +219,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -242,11 +243,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -266,11 +267,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -290,11 +291,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -314,11 +315,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config19.json b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config19.json index 22ec8171d771..16ebf6f52591 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config19.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config19.json @@ -4,6 +4,7 @@ "character": 6 }, "source": "class_def/source/source19.bal", + "description": "", "items": [ { "label": "testClass", @@ -58,11 +59,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -82,11 +83,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -106,11 +107,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -130,11 +131,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -154,11 +155,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -218,11 +219,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -242,11 +243,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -266,11 +267,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -290,11 +291,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -314,11 +315,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config2.json b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config2.json index a4b8e51ae332..68fa6b53ac35 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config2.json @@ -207,11 +207,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -231,11 +231,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -255,11 +255,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -279,11 +279,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -303,11 +303,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -376,11 +376,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -400,11 +400,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -424,11 +424,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -448,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -481,11 +481,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config25.json b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config25.json index 88efa4a8b4cf..a4a680a92096 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config25.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config25.json @@ -4,6 +4,7 @@ "character": 42 }, "source": "class_def/source/source25.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -411,11 +412,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -435,11 +436,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -459,11 +460,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -483,11 +484,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -507,11 +508,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config26.json b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config26.json index 188c10e8905a..26b7f505ec62 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config26.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config26.json @@ -4,6 +4,7 @@ "character": 46 }, "source": "class_def/source/source26.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -193,11 +194,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -217,11 +218,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -241,11 +242,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -265,11 +266,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -289,11 +290,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config28.json b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config28.json index f113027e91fe..d7f170fec847 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config28.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config28.json @@ -4,6 +4,7 @@ "character": 48 }, "source": "class_def/source/source28.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -411,11 +412,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -435,11 +436,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -459,11 +460,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -483,11 +484,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -507,11 +508,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config29.json b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config29.json index 9d488445d108..9a231f1b5cfb 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config29.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config29.json @@ -4,6 +4,7 @@ "character": 36 }, "source": "class_def/source/source29.bal", + "description": "", "items": [ { "label": "StrandData", @@ -125,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -149,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -173,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -197,11 +198,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -221,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -285,11 +286,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -309,11 +310,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -333,11 +334,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -357,11 +358,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -390,11 +391,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config3.json b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config3.json index 55d98f77b489..c0cad6a09d11 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config3.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config3.json @@ -189,11 +189,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -213,11 +213,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -237,11 +237,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -261,11 +261,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -285,11 +285,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -349,11 +349,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -373,11 +373,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -397,11 +397,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -421,11 +421,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -454,11 +454,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config30.json b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config30.json index e73ff2aebeae..3eb15d054ea5 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config30.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config30.json @@ -4,6 +4,7 @@ "character": 37 }, "source": "class_def/source/source30.bal", + "description": "", "items": [ { "label": "StrandData", @@ -125,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -149,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -173,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -197,11 +198,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -221,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -285,11 +286,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -309,11 +310,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -333,11 +334,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -357,11 +358,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -390,11 +391,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config4.json b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config4.json index 4fef871a991a..615980475d5d 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config4.json @@ -207,11 +207,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -231,11 +231,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -255,11 +255,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -279,11 +279,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -303,11 +303,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -376,11 +376,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -400,11 +400,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -424,11 +424,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -448,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -481,11 +481,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config6.json b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config6.json index 3233b044a16b..b231e1645502 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config6.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config6.json @@ -4,6 +4,7 @@ "character": 24 }, "source": "class_def/source/source6.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -447,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -471,11 +472,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -495,11 +496,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -519,11 +520,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config8.json b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config8.json index 609bca34614c..56a848485a97 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config8.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/class_def/config/config8.json @@ -207,11 +207,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -231,11 +231,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -255,11 +255,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -279,11 +279,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -303,11 +303,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -376,11 +376,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -400,11 +400,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -424,11 +424,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -448,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -481,11 +481,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/comment_context/config/comment_config3.json b/language-server/modules/langserver-core/src/test/resources/completion/comment_context/config/comment_config3.json index 2281a7d59a5b..3db027abd0ff 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/comment_context/config/comment_config3.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/comment_context/config/comment_config3.json @@ -4,6 +4,7 @@ "character": 4 }, "source": "comment_context/source/comment_source1.bal", + "description": "", "items": [ { "label": "xmlns", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -447,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -471,11 +472,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -640,11 +641,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -664,11 +665,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -688,11 +689,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -712,11 +713,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -745,11 +746,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/comment_context/config/comment_config4.json b/language-server/modules/langserver-core/src/test/resources/completion/comment_context/config/comment_config4.json index 7b65ebcdfa8c..e30c3c7baa55 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/comment_context/config/comment_config4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/comment_context/config/comment_config4.json @@ -4,6 +4,7 @@ "character": 4 }, "source": "comment_context/source/comment_source1.bal", + "description": "", "items": [ { "label": "xmlns", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -447,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -471,11 +472,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -640,11 +641,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -664,11 +665,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -688,11 +689,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -712,11 +713,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -745,11 +746,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/comment_context/config/comment_config5.json b/language-server/modules/langserver-core/src/test/resources/completion/comment_context/config/comment_config5.json index a68b091b105d..e2a03b0e69cf 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/comment_context/config/comment_config5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/comment_context/config/comment_config5.json @@ -4,6 +4,7 @@ "character": 21 }, "source": "comment_context/source/comment_source1.bal", + "description": "", "items": [ { "label": "start", @@ -53,11 +54,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -77,11 +78,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -101,11 +102,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -125,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -149,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -173,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -459,11 +460,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -483,11 +484,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -507,11 +508,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -531,11 +532,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -555,11 +556,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/enum_decl_ctx/config/config5.json b/language-server/modules/langserver-core/src/test/resources/completion/enum_decl_ctx/config/config5.json index 793ea8627991..5a5654844a61 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/enum_decl_ctx/config/config5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/enum_decl_ctx/config/config5.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "enum_decl_ctx/source/source3.bal", + "description": "", "items": [ { "label": "import", @@ -385,11 +386,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -409,11 +410,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -433,11 +434,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -457,11 +458,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -481,11 +482,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -579,11 +580,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -603,11 +604,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -627,11 +628,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -651,11 +652,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -684,11 +685,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/annotation_access_ctx_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/annotation_access_ctx_config1.json index 7a220f54eef7..e453a0e11208 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/annotation_access_ctx_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/annotation_access_ctx_config1.json @@ -4,6 +4,7 @@ "character": 72 }, "source": "expression_context/source/annotation_access_ctx_source1.bal", + "description": "", "items": [ { "label": "display", @@ -42,11 +43,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -66,11 +67,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -90,11 +91,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -114,11 +115,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -138,11 +139,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -162,11 +163,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -186,11 +187,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -210,11 +211,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -234,11 +235,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -258,11 +259,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/annotation_access_ctx_config13.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/annotation_access_ctx_config13.json index d27be2a580d5..779c37b38f1a 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/annotation_access_ctx_config13.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/annotation_access_ctx_config13.json @@ -4,6 +4,7 @@ "character": 37 }, "source": "expression_context/source/annotation_access_ctx_source13.bal", + "description": "", "items": [ { "label": "typeParam", @@ -90,11 +91,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -114,11 +115,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -138,11 +139,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -162,11 +163,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -186,11 +187,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -210,11 +211,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -234,11 +235,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -258,11 +259,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -282,11 +283,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -306,11 +307,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/annotation_access_ctx_config5.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/annotation_access_ctx_config5.json index 6329d502282b..49fc0d0b4df0 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/annotation_access_ctx_config5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/annotation_access_ctx_config5.json @@ -4,6 +4,7 @@ "character": 21 }, "source": "expression_context/source/annotation_access_ctx_source5.bal", + "description": "", "items": [ { "label": "tainted", @@ -82,11 +83,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -106,11 +107,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -130,11 +131,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -154,11 +155,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -178,11 +179,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -202,11 +203,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -226,11 +227,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -250,11 +251,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -274,11 +275,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -298,11 +299,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config1.json index b9c5018332d1..d36ad88cccfd 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config1.json @@ -4,6 +4,7 @@ "character": 26 }, "source": "expression_context/source/anon_func_expr_ctx_source1.bal", + "description": "", "items": [ { "label": "StrandData", @@ -117,11 +118,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -141,11 +142,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -165,11 +166,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -189,11 +190,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -253,11 +254,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -277,11 +278,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -301,11 +302,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -325,11 +326,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -349,11 +350,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -382,11 +383,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config10.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config10.json index bfa524a1d476..002fd7c41506 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config10.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config10.json @@ -4,6 +4,7 @@ "character": 9 }, "source": "expression_context/source/anon_func_expr_ctx_source10.bal", + "description": "", "items": [ { "label": "xmlns", @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -408,11 +409,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -432,11 +433,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -563,11 +564,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -684,11 +685,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -708,11 +709,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -732,11 +733,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -756,11 +757,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -789,11 +790,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config2.json index 991759a749e7..3ce82bc600cb 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config2.json @@ -4,6 +4,7 @@ "character": 27 }, "source": "expression_context/source/anon_func_expr_ctx_source2.bal", + "description": "", "items": [ { "label": "StrandData", @@ -117,11 +118,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -141,11 +142,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -165,11 +166,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -189,11 +190,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -253,11 +254,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -277,11 +278,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -301,11 +302,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -325,11 +326,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -349,11 +350,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -382,11 +383,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config5.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config5.json index b14a2a48f550..8f782b488524 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config5.json @@ -4,6 +4,7 @@ "character": 36 }, "source": "expression_context/source/anon_func_expr_ctx_source5.bal", + "description": "", "items": [ { "label": "StrandData", @@ -117,11 +118,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -141,11 +142,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -165,11 +166,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -189,11 +190,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -253,11 +254,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -304,11 +305,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -328,11 +329,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -352,11 +353,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -376,11 +377,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -409,11 +410,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config7.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config7.json index 2d50cec2594a..0cf87c9bb825 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config7.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config7.json @@ -4,6 +4,7 @@ "character": 43 }, "source": "expression_context/source/anon_func_expr_ctx_source7.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -422,11 +423,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -471,11 +472,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -495,11 +496,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -519,11 +520,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -543,11 +544,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -567,11 +568,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config8.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config8.json index d8ff934bfbf4..7af89dd6b5ec 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config8.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/anon_func_expr_ctx_config8.json @@ -4,6 +4,7 @@ "character": 56 }, "source": "expression_context/source/anon_func_expr_ctx_source8.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -438,11 +439,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -487,11 +488,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -511,11 +512,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -535,11 +536,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -559,11 +560,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -583,11 +584,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/check_expression_ctx_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/check_expression_ctx_config1.json index 032412dc7c85..9a661e3d5cbd 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/check_expression_ctx_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/check_expression_ctx_config1.json @@ -4,6 +4,7 @@ "character": 24 }, "source": "expression_context/source/check_expression_ctx_source1.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -442,11 +443,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -475,11 +476,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -499,11 +500,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -523,11 +524,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -547,11 +548,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -571,11 +572,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/check_expression_ctx_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/check_expression_ctx_config2.json index db48e2ec508a..ad25d2d60c24 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/check_expression_ctx_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/check_expression_ctx_config2.json @@ -4,6 +4,7 @@ "character": 25 }, "source": "expression_context/source/check_expression_ctx_source2.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -434,11 +435,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -467,11 +468,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -491,11 +492,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -515,11 +516,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -539,11 +540,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -563,11 +564,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config1.json index 249a10fc6717..13f79c75ea85 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config1.json @@ -4,6 +4,7 @@ "character": 19 }, "source": "expression_context/source/conditional_expr_ctx_source1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -416,11 +417,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -440,11 +441,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -464,11 +465,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -488,11 +489,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -512,11 +513,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config10.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config10.json index ba3073b2af05..a7c8d1d2e3b0 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config10.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config10.json @@ -4,6 +4,7 @@ "character": 26 }, "source": "expression_context/source/conditional_expr_ctx_source10.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -377,11 +378,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -428,11 +429,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -452,11 +453,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -476,11 +477,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -500,11 +501,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -524,11 +525,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config2.json index 48e49727b736..45165b5fc751 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config2.json @@ -4,6 +4,7 @@ "character": 20 }, "source": "expression_context/source/conditional_expr_ctx_source2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -416,11 +417,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -440,11 +441,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -464,11 +465,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -488,11 +489,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -512,11 +513,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config3.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config3.json index 71e41e33eb10..2bd617447fe4 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config3.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config3.json @@ -4,6 +4,7 @@ "character": 24 }, "source": "expression_context/source/conditional_expr_ctx_source3.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -416,11 +417,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -440,11 +441,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -464,11 +465,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -488,11 +489,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -512,11 +513,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config4.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config4.json index 6fb02bf08b07..d6158e5e5a9a 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config4.json @@ -4,6 +4,7 @@ "character": 25 }, "source": "expression_context/source/conditional_expr_ctx_source4.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -416,11 +417,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -440,11 +441,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -464,11 +465,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -488,11 +489,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -512,11 +513,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config8.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config8.json index e2e0fa94abae..ad59e29ae932 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config8.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/conditional_expr_ctx_config8.json @@ -4,6 +4,7 @@ "character": 26 }, "source": "expression_context/source/conditional_expr_ctx_source8.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -416,11 +417,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -440,11 +441,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -464,11 +465,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -488,11 +489,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -512,11 +513,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config1.json index 97ab0423f713..6f779235efa4 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config1.json @@ -4,6 +4,7 @@ "character": 22 }, "source": "expression_context/source/error_constructor_expr_ctx_source1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -475,11 +476,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -499,11 +500,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -523,11 +524,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -547,11 +548,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -571,11 +572,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config2.json index b56b71850e55..3013ba2ddc2c 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config2.json @@ -4,6 +4,7 @@ "character": 23 }, "source": "expression_context/source/error_constructor_expr_ctx_source2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -475,11 +476,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -499,11 +500,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -523,11 +524,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -547,11 +548,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -571,11 +572,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config3.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config3.json index 0e415234551b..15930d81cb6e 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config3.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config3.json @@ -4,6 +4,7 @@ "character": 22 }, "source": "expression_context/source/error_constructor_expr_ctx_source3.bal", + "description": "", "items": [ { "label": "ErrorTwo", @@ -42,11 +43,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -66,11 +67,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -90,11 +91,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -114,11 +115,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -138,11 +139,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -202,11 +203,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -226,11 +227,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -250,11 +251,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -274,11 +275,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -298,11 +299,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config4.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config4.json index e8bf354cc42c..a4b4d27353db 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config4.json @@ -4,6 +4,7 @@ "character": 24 }, "source": "expression_context/source/error_constructor_expr_ctx_source4.bal", + "description": "", "items": [ { "label": "ErrorThree", @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -146,11 +147,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -210,11 +211,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -234,11 +235,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -258,11 +259,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -282,11 +283,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -306,11 +307,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config7.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config7.json index 6d8e842dc6b0..8fd8115ceffa 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config7.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config7.json @@ -4,6 +4,7 @@ "character": 39 }, "source": "expression_context/source/error_constructor_expr_ctx_source7.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -484,11 +485,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -508,11 +509,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -532,11 +533,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -556,11 +557,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -580,11 +581,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config8.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config8.json index d1e890d7d03e..c5ec644bc445 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config8.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/error_constructor_expr_ctx_config8.json @@ -4,6 +4,7 @@ "character": 40 }, "source": "expression_context/source/error_constructor_expr_ctx_source8.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -484,11 +485,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -508,11 +509,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -532,11 +533,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -556,11 +557,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -580,11 +581,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/fail_expr_ctx_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/fail_expr_ctx_config1.json index 1a2dfe2211e5..c44863cc6e12 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/fail_expr_ctx_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/fail_expr_ctx_config1.json @@ -4,6 +4,7 @@ "character": 9 }, "source": "expression_context/source/fail_expr_ctx_source1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -424,11 +425,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -448,11 +449,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -472,11 +473,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -496,11 +497,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -520,11 +521,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/fail_expr_ctx_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/fail_expr_ctx_config2.json index 8bb84a3e90ce..f8eef9ab8eb4 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/fail_expr_ctx_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/fail_expr_ctx_config2.json @@ -4,6 +4,7 @@ "character": 10 }, "source": "expression_context/source/fail_expr_ctx_source2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -424,11 +425,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -448,11 +449,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -472,11 +473,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -496,11 +497,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -520,11 +521,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config1.json index f5615160b7e9..ff8d7aa717ed 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config1.json @@ -4,6 +4,7 @@ "character": 27 }, "source": "expression_context/source/function_call_expression_ctx_source1.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -489,11 +490,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -513,11 +514,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -537,11 +538,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -561,11 +562,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -585,11 +586,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config2.json index 35953ad37522..0be30814f225 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config2.json @@ -4,6 +4,7 @@ "character": 28 }, "source": "expression_context/source/function_call_expression_ctx_source2.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -489,11 +490,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -513,11 +514,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -537,11 +538,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -561,11 +562,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -585,11 +586,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config3.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config3.json index e7b51fbd445c..3b225ece05b2 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config3.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config3.json @@ -4,6 +4,7 @@ "character": 35 }, "source": "expression_context/source/function_call_expression_ctx_source3.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -480,11 +481,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -504,11 +505,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -528,11 +529,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -552,11 +553,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -576,11 +577,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config4.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config4.json index e11761a17858..0cf8093e4a41 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config4.json @@ -4,6 +4,7 @@ "character": 36 }, "source": "expression_context/source/function_call_expression_ctx_source4.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -480,11 +481,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -504,11 +505,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -528,11 +529,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -552,11 +553,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -576,11 +577,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config7.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config7.json index c23e3544d1a1..05e6fecd2011 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config7.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config7.json @@ -4,6 +4,7 @@ "character": 4 }, "source": "expression_context/source/function_call_expression_ctx_source7.bal", + "description": "", "items": [ { "label": "xmlns", @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -408,11 +409,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -432,11 +433,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -679,11 +680,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -703,11 +704,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -727,11 +728,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -751,11 +752,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -784,11 +785,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config8.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config8.json index 75af16db3921..273ef5127a18 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config8.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/function_call_expression_ctx_config8.json @@ -4,6 +4,7 @@ "character": 4 }, "source": "expression_context/source/function_call_expression_ctx_source8.bal", + "description": "", "items": [ { "label": "xmlns", @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -408,11 +409,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -432,11 +433,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -691,11 +692,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -715,11 +716,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -739,11 +740,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -763,11 +764,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -796,11 +797,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config1.json index ca837d7f69e5..1b53f9242cac 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config1.json @@ -27,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -51,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -75,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -99,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -429,11 +429,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -462,11 +462,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -486,11 +486,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -510,11 +510,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -534,11 +534,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -558,11 +558,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config2.json index 7ea16539d108..8989fe035da4 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config2.json @@ -27,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -51,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -75,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -99,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -429,11 +429,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -462,11 +462,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -486,11 +486,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -510,11 +510,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -534,11 +534,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -558,11 +558,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config5.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config5.json index efb734252a8a..0a3bb17ec281 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config5.json @@ -103,11 +103,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -127,11 +127,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -151,11 +151,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -175,11 +175,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -239,11 +239,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -263,11 +263,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -287,11 +287,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -311,11 +311,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -335,11 +335,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -359,11 +359,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config55.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config55.json index 5dc3e6e6a95b..0357f2b23f88 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config55.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config55.json @@ -67,11 +67,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -91,11 +91,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -115,11 +115,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -139,11 +139,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -163,11 +163,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -525,11 +525,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -549,11 +549,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -573,11 +573,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -597,11 +597,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -621,11 +621,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config56.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config56.json index 726a317bdc1d..979ad5ff7f57 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config56.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config56.json @@ -67,11 +67,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -91,11 +91,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -115,11 +115,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -139,11 +139,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -163,11 +163,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -525,11 +525,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -549,11 +549,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -573,11 +573,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -597,11 +597,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -621,11 +621,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config6.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config6.json index 39f85b1692ac..237ef3b4d313 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config6.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config6.json @@ -103,11 +103,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -127,11 +127,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -151,11 +151,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -175,11 +175,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -239,11 +239,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -263,11 +263,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -287,11 +287,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -311,11 +311,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -335,11 +335,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -359,11 +359,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config7.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config7.json index bca74d43d977..254505768546 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config7.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_expr_ctx_config7.json @@ -103,11 +103,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -127,11 +127,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -151,11 +151,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -175,11 +175,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -239,11 +239,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -263,11 +263,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -287,11 +287,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -311,11 +311,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -335,11 +335,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -359,11 +359,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/member_access_expr_ctx_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/member_access_expr_ctx_config1.json index 7d580cd0e47d..cfbd4ccff78b 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/member_access_expr_ctx_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/member_access_expr_ctx_config1.json @@ -4,6 +4,7 @@ "character": 27 }, "source": "expression_context/source/member_access_expr_ctx_source1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -424,11 +425,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -448,11 +449,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -472,11 +473,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -496,11 +497,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -520,11 +521,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/member_access_expr_ctx_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/member_access_expr_ctx_config2.json index 1fe3c5392364..648e84b1cdce 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/member_access_expr_ctx_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/member_access_expr_ctx_config2.json @@ -4,6 +4,7 @@ "character": 28 }, "source": "expression_context/source/member_access_expr_ctx_source2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -424,11 +425,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -448,11 +449,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -472,11 +473,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -496,11 +497,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -520,11 +521,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/method_call_expression_ctx_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/method_call_expression_ctx_config1.json index d391e5d1e6cd..3f62caa9a17d 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/method_call_expression_ctx_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/method_call_expression_ctx_config1.json @@ -4,6 +4,7 @@ "character": 22 }, "source": "expression_context/source/method_call_expression_ctx_source1.bal", + "description": "", "items": [ { "label": "start", @@ -53,11 +54,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -77,11 +78,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -101,11 +102,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -388,11 +389,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -495,11 +496,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -519,11 +520,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -543,11 +544,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -567,11 +568,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -591,11 +592,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/method_call_expression_ctx_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/method_call_expression_ctx_config2.json index d82fff6f3084..736627b89aca 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/method_call_expression_ctx_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/method_call_expression_ctx_config2.json @@ -4,6 +4,7 @@ "character": 23 }, "source": "expression_context/source/method_call_expression_ctx_source2.bal", + "description": "", "items": [ { "label": "start", @@ -53,11 +54,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -77,11 +78,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -101,11 +102,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -388,11 +389,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -538,11 +539,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -562,11 +563,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -586,11 +587,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -610,11 +611,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -634,11 +635,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/method_call_expression_ctx_config5.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/method_call_expression_ctx_config5.json index 47cf48092688..cbbc8f46fb59 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/method_call_expression_ctx_config5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/method_call_expression_ctx_config5.json @@ -4,6 +4,7 @@ "character": 36 }, "source": "expression_context/source/method_call_expression_ctx_source5.bal", + "description": "", "items": [ { "label": "start", @@ -53,11 +54,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -77,11 +78,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -101,11 +102,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -388,11 +389,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -495,11 +496,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -519,11 +520,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -543,11 +544,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -567,11 +568,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -591,11 +592,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/method_call_expression_ctx_config6.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/method_call_expression_ctx_config6.json index c3a1e16ad2a8..3a0f15cec51e 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/method_call_expression_ctx_config6.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/method_call_expression_ctx_config6.json @@ -4,6 +4,7 @@ "character": 37 }, "source": "expression_context/source/method_call_expression_ctx_source6.bal", + "description": "", "items": [ { "label": "start", @@ -53,11 +54,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -77,11 +78,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -101,11 +102,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -388,11 +389,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -495,11 +496,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -519,11 +520,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -543,11 +544,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -567,11 +568,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -591,11 +592,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/module_ctx_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/module_ctx_config1.json index 0390ba2f5140..d364e6a59908 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/module_ctx_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/module_ctx_config1.json @@ -4,6 +4,7 @@ "character": 7 }, "source": "expression_context/source/module_ctx_source1.bal", + "description": "", "items": [ { "label": "xmlns", @@ -533,11 +534,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -557,11 +558,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -581,11 +582,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -605,11 +606,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -678,11 +679,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -717,11 +718,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -741,11 +742,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -765,11 +766,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -789,11 +790,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -822,11 +823,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/module_ctx_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/module_ctx_config2.json index 50560f5a72ae..4ce9cdb89a76 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/module_ctx_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/module_ctx_config2.json @@ -4,6 +4,7 @@ "character": 17 }, "source": "expression_context/source/module_ctx_source2.bal", + "description": "", "items": [ { "label": "module1:TestObject1", @@ -209,11 +210,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -233,11 +234,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -257,11 +258,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -281,11 +282,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -305,11 +306,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -369,11 +370,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -393,11 +394,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -417,11 +418,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -441,11 +442,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -474,11 +475,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/module_ctx_config3.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/module_ctx_config3.json index d78da17e285d..8840bc9793d6 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/module_ctx_config3.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/module_ctx_config3.json @@ -4,6 +4,7 @@ "character": 7 }, "source": "expression_context/source/module_ctx_source3.bal", + "description": "", "items": [ { "label": "xmlns", @@ -542,11 +543,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -566,11 +567,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -590,11 +591,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -614,11 +615,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -638,11 +639,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -662,11 +663,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -686,11 +687,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -710,11 +711,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -734,11 +735,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -822,11 +823,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/module_ctx_config4.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/module_ctx_config4.json index ba5e7de83ecb..f97a1a5a9015 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/module_ctx_config4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/module_ctx_config4.json @@ -4,6 +4,7 @@ "character": 7 }, "source": "expression_context/source/module_ctx_source4.bal", + "description": "", "items": [ { "label": "xmlns", @@ -542,11 +543,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -566,11 +567,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -590,11 +591,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -614,11 +615,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -638,11 +639,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -662,11 +663,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -686,11 +687,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -710,11 +711,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -734,11 +735,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -822,11 +823,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/module_ctx_config5.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/module_ctx_config5.json index 39f0c461c34b..c044ceee339d 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/module_ctx_config5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/module_ctx_config5.json @@ -4,6 +4,7 @@ "character": 5 }, "source": "expression_context/source/module_ctx_source5.bal", + "description": "", "items": [ { "label": "xmlns", @@ -464,11 +465,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -488,11 +489,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -512,11 +513,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -536,11 +537,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -560,11 +561,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -584,11 +585,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -608,11 +609,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -632,11 +633,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -656,11 +657,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -744,11 +745,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config10.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config10.json index a64a411da210..21a6ef977f3a 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config10.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config10.json @@ -4,6 +4,7 @@ "character": 27 }, "source": "expression_context/source/new_expr_ctx_source10.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -218,11 +219,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -242,11 +243,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -266,11 +267,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -290,11 +291,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -314,11 +315,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config10a.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config10a.json index 73bf0c0f9def..6e186c0dbe23 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config10a.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config10a.json @@ -4,6 +4,7 @@ "character": 30 }, "source": "expression_context/source/new_expr_ctx_source10a.bal", + "description": "", "items": [ { "label": "TestObject2()", @@ -40,11 +41,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -64,11 +65,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -88,11 +89,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -112,11 +113,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -136,11 +137,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -218,11 +219,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -242,11 +243,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -266,11 +267,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -290,11 +291,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -314,11 +315,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config11.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config11.json index b66440d7479f..725ac0ca9b45 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config11.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config11.json @@ -4,6 +4,7 @@ "character": 27 }, "source": "expression_context/source/new_expr_ctx_source11.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -424,11 +425,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -448,11 +449,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -472,11 +473,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -496,11 +497,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -520,11 +521,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config12.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config12.json index 22dc5e04ac49..08437a1e206b 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config12.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config12.json @@ -4,6 +4,7 @@ "character": 28 }, "source": "expression_context/source/new_expr_ctx_source12.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -424,11 +425,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -448,11 +449,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -472,11 +473,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -496,11 +497,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -520,11 +521,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config14.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config14.json index 899b8f2c1444..dc59dfec35d3 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config14.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config14.json @@ -4,6 +4,7 @@ "character": 39 }, "source": "expression_context/source/new_expr_ctx_source14.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -424,11 +425,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -448,11 +449,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -472,11 +473,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -496,11 +497,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -520,11 +521,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config15.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config15.json index c4e1da35f5ed..cb66c5d6f31c 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config15.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config15.json @@ -4,6 +4,7 @@ "character": 40 }, "source": "expression_context/source/new_expr_ctx_source15.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -424,11 +425,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -448,11 +449,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -472,11 +473,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -496,11 +497,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -520,11 +521,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config17.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config17.json index cb4962819c2a..6176cfc419f3 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config17.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config17.json @@ -4,6 +4,7 @@ "character": 28 }, "source": "expression_context/source/new_expr_ctx_source17.bal", + "description": "", "items": [ { "label": "testMod", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -218,11 +219,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -242,11 +243,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -266,11 +267,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -290,11 +291,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -314,11 +315,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config18.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config18.json index 8a0fc93801a9..c9e05789ba96 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config18.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config18.json @@ -4,6 +4,7 @@ "character": 19 }, "source": "expression_context/source/new_expr_ctx_source18.bal", + "description": "", "items": [ { "label": "testMod", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -207,11 +208,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -231,11 +232,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -255,11 +256,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -279,11 +280,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -303,11 +304,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -327,11 +328,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config19.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config19.json index a1db423162b1..2c10081e8160 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config19.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config19.json @@ -4,6 +4,7 @@ "character": 20 }, "source": "expression_context/source/new_expr_ctx_source19.bal", + "description": "", "items": [ { "label": "testMod", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -220,11 +221,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -244,11 +245,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -268,11 +269,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -292,11 +293,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -316,11 +317,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -340,11 +341,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config20.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config20.json index e4c5283bf861..923eb8832088 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config20.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config20.json @@ -4,6 +4,7 @@ "character": 23 }, "source": "expression_context/source/new_expr_ctx_source20.bal", + "description": "", "items": [ { "label": "testMod", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -362,11 +363,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -490,11 +491,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -514,11 +515,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -538,11 +539,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -562,11 +563,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -586,11 +587,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config21.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config21.json index f296530fe7b9..dd09bf6c209b 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config21.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config21.json @@ -4,6 +4,7 @@ "character": 24 }, "source": "expression_context/source/new_expr_ctx_source21.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -490,11 +491,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -514,11 +515,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -538,11 +539,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -562,11 +563,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -586,11 +587,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config5.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config5.json index 2d2d43b54693..96072fe59af3 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config5.json @@ -4,6 +4,7 @@ "character": 30 }, "source": "expression_context/source/new_expr_ctx_source5.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -478,11 +479,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -502,11 +503,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -526,11 +527,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -550,11 +551,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -574,11 +575,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config6.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config6.json index 64a5fc8cf2c9..7a6789069808 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config6.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config6.json @@ -4,6 +4,7 @@ "character": 11 }, "source": "expression_context/source/new_expr_ctx_source6.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -478,11 +479,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -502,11 +503,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -526,11 +527,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -550,11 +551,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -574,11 +575,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config7.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config7.json index a94394044bd2..3c455db9ff69 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config7.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config7.json @@ -4,6 +4,7 @@ "character": 34 }, "source": "expression_context/source/new_expr_ctx_source7.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -218,11 +219,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -242,11 +243,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -266,11 +267,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -290,11 +291,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -314,11 +315,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config8.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config8.json index e4c23dce77fe..0af18abd529a 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config8.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config8.json @@ -4,6 +4,7 @@ "character": 15 }, "source": "expression_context/source/new_expr_ctx_source8.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -218,11 +219,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -242,11 +243,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -266,11 +267,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -290,11 +291,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -314,11 +315,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config9.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config9.json index 0ddfc5d33b3f..6dec98f89ec8 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config9.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/new_expr_ctx_config9.json @@ -4,6 +4,7 @@ "character": 15 }, "source": "expression_context/source/new_expr_ctx_source9.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -218,11 +219,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -242,11 +243,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -266,11 +267,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -290,11 +291,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -314,11 +315,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config13.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config13.json index 0558406751d0..0544224f466b 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config13.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config13.json @@ -4,6 +4,7 @@ "character": 43 }, "source": "expression_context/source/object_constructor_expr_ctx_source13.bal", + "description": "", "items": [ { "label": "StrandData", @@ -117,11 +118,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -141,11 +142,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -165,11 +166,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -189,11 +190,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -253,11 +254,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -304,11 +305,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -328,11 +329,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -352,11 +353,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -376,11 +377,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -409,11 +410,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config15.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config15.json index 498b84432e16..dfa3c0b669b5 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config15.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config15.json @@ -4,6 +4,7 @@ "character": 9 }, "source": "expression_context/source/object_constructor_expr_ctx_source15.bal", + "description": "", "items": [ { "label": "StrandData", @@ -126,11 +127,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -150,11 +151,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -174,11 +175,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -198,11 +199,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -222,11 +223,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -246,11 +247,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -270,11 +271,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -294,11 +295,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -318,11 +319,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -436,11 +437,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config2.json index 58e862c80cb3..eb72145a2e85 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config2.json @@ -4,6 +4,7 @@ "character": 36 }, "source": "expression_context/source/object_constructor_expr_ctx_source2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -162,11 +163,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -186,11 +187,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -210,11 +211,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -234,11 +235,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -258,11 +259,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -282,11 +283,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config4.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config4.json index 6b93364294e9..44a1e50f641a 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config4.json @@ -4,6 +4,7 @@ "character": 8 }, "source": "expression_context/source/object_constructor_expr_ctx_source4.bal", + "description": "", "items": [ { "label": "StrandData", @@ -117,11 +118,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -141,11 +142,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -165,11 +166,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -189,11 +190,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -307,11 +308,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -331,11 +332,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -355,11 +356,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -379,11 +380,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -403,11 +404,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -436,11 +437,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config5.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config5.json index 8727a540d405..77efb64e29a3 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config5.json @@ -4,6 +4,7 @@ "character": 9 }, "source": "expression_context/source/object_constructor_expr_ctx_source5.bal", + "description": "", "items": [ { "label": "StrandData", @@ -117,11 +118,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -141,11 +142,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -165,11 +166,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -189,11 +190,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -307,11 +308,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -331,11 +332,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -355,11 +356,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -379,11 +380,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -403,11 +404,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -436,11 +437,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config7.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config7.json index d90add7216cf..159cf252b249 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config7.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config7.json @@ -4,6 +4,7 @@ "character": 21 }, "source": "expression_context/source/object_constructor_expr_ctx_source7.bal", + "description": "", "items": [ { "label": "StrandData", @@ -117,11 +118,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -141,11 +142,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -165,11 +166,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -189,11 +190,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -307,11 +308,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -331,11 +332,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -355,11 +356,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -379,11 +380,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -403,11 +404,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -436,11 +437,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config9.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config9.json index 47d8bf35e9e3..36db05c5e5ce 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config9.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/object_constructor_expr_ctx_config9.json @@ -4,6 +4,7 @@ "character": 28 }, "source": "expression_context/source/object_constructor_expr_ctx_source9.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -397,11 +398,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -446,11 +447,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -470,11 +471,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -494,11 +495,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -518,11 +519,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -542,11 +543,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/trap_expression_ctx_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/trap_expression_ctx_config1.json index a25fee04cdc6..06ba17030d67 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/trap_expression_ctx_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/trap_expression_ctx_config1.json @@ -4,6 +4,7 @@ "character": 23 }, "source": "expression_context/source/trap_expression_ctx_source1.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -442,11 +443,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -475,11 +476,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -499,11 +500,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -523,11 +524,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -547,11 +548,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -571,11 +572,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/trap_expression_ctx_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/trap_expression_ctx_config2.json index b011efc15ec4..767e2ceb5deb 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/trap_expression_ctx_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/trap_expression_ctx_config2.json @@ -4,6 +4,7 @@ "character": 24 }, "source": "expression_context/source/trap_expression_ctx_source2.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -434,11 +435,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -467,11 +468,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -491,11 +492,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -515,11 +516,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -539,11 +540,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -563,11 +564,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/type_test_expression_ctx_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/type_test_expression_ctx_config1.json index 8305c53dcd82..561324f783a9 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/type_test_expression_ctx_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/type_test_expression_ctx_config1.json @@ -4,6 +4,7 @@ "character": 32 }, "source": "expression_context/source/type_test_expression_ctx_source1.bal", + "description": "", "items": [ { "label": "Thread", @@ -125,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -149,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -173,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -197,11 +198,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -221,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -285,11 +286,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -309,11 +310,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -333,11 +334,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -357,11 +358,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -390,11 +391,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/type_test_expression_ctx_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/type_test_expression_ctx_config2.json index ff28ba637511..47d23d78ce30 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/type_test_expression_ctx_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/type_test_expression_ctx_config2.json @@ -4,6 +4,7 @@ "character": 33 }, "source": "expression_context/source/type_test_expression_ctx_source2.bal", + "description": "", "items": [ { "label": "Thread", @@ -125,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -149,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -173,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -197,11 +198,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -221,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -285,11 +286,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -309,11 +310,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -333,11 +334,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -357,11 +358,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -390,11 +391,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/type_test_expression_ctx_config5.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/type_test_expression_ctx_config5.json index 2b3351f24db5..2f2f1fbbdc51 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/type_test_expression_ctx_config5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/type_test_expression_ctx_config5.json @@ -4,6 +4,7 @@ "character": 8 }, "source": "expression_context/source/type_test_expression_ctx_source5.bal", + "description": "", "items": [ { "label": "TestRecord1", @@ -34,11 +35,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -58,11 +59,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -82,11 +83,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -106,11 +107,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -130,11 +131,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -416,11 +417,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -440,11 +441,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -464,11 +465,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -488,11 +489,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -512,11 +513,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/type_test_expression_ctx_config8.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/type_test_expression_ctx_config8.json index 61ce7651eb46..603008170cb3 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/type_test_expression_ctx_config8.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/type_test_expression_ctx_config8.json @@ -4,6 +4,7 @@ "character": 16 }, "source": "expression_context/source/type_test_expression_ctx_source8.bal", + "description": "", "items": [ { "label": "StrandData", @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -229,11 +230,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -253,11 +254,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -333,11 +334,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -357,11 +358,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -381,11 +382,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -405,11 +406,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -438,11 +439,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/type_test_expression_ctx_config9.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/type_test_expression_ctx_config9.json index 409959a9d995..f1db7bf9ea9c 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/type_test_expression_ctx_config9.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/type_test_expression_ctx_config9.json @@ -4,6 +4,7 @@ "character": 16 }, "source": "expression_context/source/projectls/modules/lsmod4/lsmod4.bal", + "description": "", "items": [ { "label": "StrandData", @@ -126,11 +127,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -150,11 +151,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -174,11 +175,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -198,11 +199,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -222,11 +223,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -286,11 +287,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -310,11 +311,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -334,11 +335,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -374,11 +375,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -398,11 +399,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -422,11 +423,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -446,11 +447,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -479,11 +480,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typecast_expr_ctx_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typecast_expr_ctx_config1.json index 5e165584abe3..2958e6541877 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typecast_expr_ctx_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typecast_expr_ctx_config1.json @@ -4,6 +4,7 @@ "character": 18 }, "source": "expression_context/source/typecast_expr_ctx_source1.bal", + "description": "", "items": [ { "label": "ErrorName", @@ -133,11 +134,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -269,11 +270,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -293,11 +294,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -317,11 +318,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -341,11 +342,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -365,11 +366,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -398,11 +399,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typecast_expr_ctx_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typecast_expr_ctx_config2.json index 6d780358a09f..6e677dfe5b10 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typecast_expr_ctx_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typecast_expr_ctx_config2.json @@ -4,6 +4,7 @@ "character": 19 }, "source": "expression_context/source/typecast_expr_ctx_source2.bal", + "description": "", "items": [ { "label": "ErrorName", @@ -133,11 +134,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -269,11 +270,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -293,11 +294,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -317,11 +318,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -341,11 +342,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -365,11 +366,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -398,11 +399,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typecast_expr_ctx_config4.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typecast_expr_ctx_config4.json index 268d6169b3c1..920e1452c33b 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typecast_expr_ctx_config4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typecast_expr_ctx_config4.json @@ -4,6 +4,7 @@ "character": 21 }, "source": "expression_context/source/typecast_expr_ctx_source4.bal", + "description": "", "items": [ { "label": "ErrorName", @@ -133,11 +134,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -269,11 +270,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -293,11 +294,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -317,11 +318,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -341,11 +342,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -365,11 +366,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -398,11 +399,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typecast_expr_ctx_config5.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typecast_expr_ctx_config5.json index fa21aee6d5f9..0212529175f6 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typecast_expr_ctx_config5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typecast_expr_ctx_config5.json @@ -4,6 +4,7 @@ "character": 22 }, "source": "expression_context/source/typecast_expr_ctx_source5.bal", + "description": "", "items": [ { "label": "ErrorName", @@ -133,11 +134,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -269,11 +270,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -293,11 +294,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -317,11 +318,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -341,11 +342,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -365,11 +366,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -398,11 +399,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typecast_expr_ctx_config6.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typecast_expr_ctx_config6.json index e5fb35db108b..b861a5ba0701 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typecast_expr_ctx_config6.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typecast_expr_ctx_config6.json @@ -4,6 +4,7 @@ "character": 32 }, "source": "expression_context/source/typecast_expr_ctx_source6.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -435,11 +436,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -468,11 +469,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -492,11 +493,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -516,11 +517,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -540,11 +541,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -564,11 +565,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typeof_expression_ctx_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typeof_expression_ctx_config1.json index 1c2ea7bbeb4d..df6b1c9c4277 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typeof_expression_ctx_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typeof_expression_ctx_config1.json @@ -4,6 +4,7 @@ "character": 25 }, "source": "expression_context/source/typeof_expression_ctx_source1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -447,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -471,11 +472,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -495,11 +496,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -519,11 +520,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typeof_expression_ctx_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typeof_expression_ctx_config2.json index 0291cf2f062e..e289ace0a5d1 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typeof_expression_ctx_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/typeof_expression_ctx_config2.json @@ -4,6 +4,7 @@ "character": 26 }, "source": "expression_context/source/typeof_expression_ctx_source2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -447,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -471,11 +472,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -495,11 +496,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -519,11 +520,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/xml_attribute_access_expr_ctx_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/xml_attribute_access_expr_ctx_config1.json index 4b9afc5c842d..26082e58d7ae 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/xml_attribute_access_expr_ctx_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/xml_attribute_access_expr_ctx_config1.json @@ -49,11 +49,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -73,11 +73,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -97,11 +97,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -121,11 +121,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -145,11 +145,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -627,11 +627,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -651,11 +651,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -675,11 +675,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -699,11 +699,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -723,11 +723,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/xml_attribute_access_expr_ctx_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/xml_attribute_access_expr_ctx_config2.json index d9523b4ecda9..ac3fa173cbfc 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/xml_attribute_access_expr_ctx_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/xml_attribute_access_expr_ctx_config2.json @@ -49,11 +49,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -73,11 +73,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -97,11 +97,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -121,11 +121,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -145,11 +145,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -627,11 +627,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -651,11 +651,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -675,11 +675,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -699,11 +699,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -723,11 +723,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/field_access_expression_context/config/field_access_ctx_config21.json b/language-server/modules/langserver-core/src/test/resources/completion/field_access_expression_context/config/field_access_ctx_config21.json index 28d78f8da352..ee2765cfedd1 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/field_access_expression_context/config/field_access_ctx_config21.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/field_access_expression_context/config/field_access_ctx_config21.json @@ -4,6 +4,7 @@ "character": 5 }, "source": "field_access_expression_context/source/field_access_ctx_source20.bal", + "description": "", "items": [ { "label": "xmlns", @@ -376,11 +377,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -400,11 +401,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -424,11 +425,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -448,11 +449,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -472,11 +473,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -653,11 +654,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -677,11 +678,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -701,11 +702,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -725,11 +726,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -758,11 +759,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/field_access_expression_context/config/field_access_ctx_config38.json b/language-server/modules/langserver-core/src/test/resources/completion/field_access_expression_context/config/field_access_ctx_config38.json index fb6337ff5a56..9b659c3a9a16 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/field_access_expression_context/config/field_access_ctx_config38.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/field_access_expression_context/config/field_access_ctx_config38.json @@ -128,11 +128,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -152,11 +152,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -176,11 +176,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -200,11 +200,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -224,11 +224,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -575,11 +575,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -599,11 +599,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -623,11 +623,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -647,11 +647,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -671,11 +671,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/field_access_expression_context/config/field_access_ctx_config39.json b/language-server/modules/langserver-core/src/test/resources/completion/field_access_expression_context/config/field_access_ctx_config39.json index 44a7574de310..f68c4f120435 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/field_access_expression_context/config/field_access_ctx_config39.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/field_access_expression_context/config/field_access_ctx_config39.json @@ -128,11 +128,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -152,11 +152,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -176,11 +176,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -200,11 +200,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -224,11 +224,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -575,11 +575,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -599,11 +599,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -623,11 +623,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -647,11 +647,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -671,11 +671,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/field_access_expression_context/config/field_access_ctx_config40.json b/language-server/modules/langserver-core/src/test/resources/completion/field_access_expression_context/config/field_access_ctx_config40.json index 39d1dbd932bf..fb691613763c 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/field_access_expression_context/config/field_access_ctx_config40.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/field_access_expression_context/config/field_access_ctx_config40.json @@ -128,11 +128,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -152,11 +152,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -176,11 +176,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -200,11 +200,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -224,11 +224,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -575,11 +575,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -599,11 +599,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -623,11 +623,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -647,11 +647,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -671,11 +671,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/field_access_expression_context/config/field_access_ctx_config41.json b/language-server/modules/langserver-core/src/test/resources/completion/field_access_expression_context/config/field_access_ctx_config41.json index 36d303670bdb..720ded45b4a7 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/field_access_expression_context/config/field_access_ctx_config41.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/field_access_expression_context/config/field_access_ctx_config41.json @@ -128,11 +128,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -152,11 +152,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -176,11 +176,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -200,11 +200,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -224,11 +224,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -575,11 +575,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -599,11 +599,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -623,11 +623,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -647,11 +647,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -671,11 +671,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config1.json b/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config1.json index eae29afa94bd..2cd51d352900 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config1.json @@ -4,6 +4,7 @@ "character": 4 }, "source": "function_body/source/source1.bal", + "description": "", "items": [ { "label": "xmlns", @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -408,11 +409,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -432,11 +433,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -625,11 +626,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -649,11 +650,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -673,11 +674,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -697,11 +698,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -730,11 +731,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config12.json b/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config12.json index 73350b9f2e98..91b54c4404ef 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config12.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config12.json @@ -4,6 +4,7 @@ "character": 4 }, "source": "function_body/source/source12.bal", + "description": "", "items": [ { "label": "xmlns", @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -408,11 +409,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -432,11 +433,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -660,11 +661,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -684,11 +685,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -708,11 +709,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -732,11 +733,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -765,11 +766,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config13.json b/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config13.json index d282d9d372a0..472b4c8deaff 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config13.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config13.json @@ -4,6 +4,7 @@ "character": 5 }, "source": "function_body/source/source13.bal", + "description": "", "items": [ { "label": "xmlns", @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -408,11 +409,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -432,11 +433,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -660,11 +661,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -684,11 +685,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -708,11 +709,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -732,11 +733,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -857,11 +858,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config2.json b/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config2.json index fbc43e6c7aa6..7643f15916da 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config2.json @@ -4,6 +4,7 @@ "character": 5 }, "source": "function_body/source/source2.bal", + "description": "", "items": [ { "label": "xmlns", @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -408,11 +409,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -432,11 +433,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -625,11 +626,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -649,11 +650,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -673,11 +674,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -697,11 +698,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -730,11 +731,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config3.json b/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config3.json index aafd803ef785..0a580870ce0e 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config3.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config3.json @@ -4,6 +4,7 @@ "character": 5 }, "source": "function_body/source/source3.bal", + "description": "", "items": [ { "label": "xmlns", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -447,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -616,11 +617,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -640,11 +641,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -664,11 +665,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -688,11 +689,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -721,11 +722,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config4.json b/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config4.json index 144fda7df98c..0fa0a79e6097 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config4.json @@ -4,6 +4,7 @@ "character": 12 }, "source": "function_body/source/source4.bal", + "description": "", "items": [ { "label": "xmlns", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -447,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -627,11 +628,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -651,11 +652,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -675,11 +676,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -699,11 +700,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -732,11 +733,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config5.json b/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config5.json index 7b266a129127..0075996e0d9f 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config5.json @@ -4,6 +4,7 @@ "character": 4 }, "source": "function_body/source/source5.bal", + "description": "", "items": [ { "label": "xmlns", @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -408,11 +409,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -432,11 +433,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -540,11 +541,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -645,11 +646,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -669,11 +670,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -693,11 +694,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -717,11 +718,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -750,11 +751,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config6.json b/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config6.json index 1233cb036ea2..caf71926d751 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config6.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config6.json @@ -361,11 +361,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -385,11 +385,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -409,11 +409,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -433,11 +433,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -541,11 +541,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -646,11 +646,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -670,11 +670,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -694,11 +694,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -718,11 +718,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -751,11 +751,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config7.json b/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config7.json index 3ad0f020bd51..b8a7ecce552b 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config7.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/function_body/config/config7.json @@ -4,6 +4,7 @@ "character": 27 }, "source": "function_body/source/source7.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -495,11 +496,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -519,11 +520,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -543,11 +544,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -567,11 +568,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -591,11 +592,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config10.json b/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config10.json index 72c770e0bdd6..7da4f38993b1 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config10.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config10.json @@ -4,6 +4,7 @@ "character": 24 }, "source": "function_def/source/source10.bal", + "description": "", "items": [ { "label": "TestRecord1", @@ -125,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -149,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -173,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -197,11 +198,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -221,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -285,11 +286,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -309,11 +310,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -333,11 +334,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -357,11 +358,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -390,11 +391,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config11.json b/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config11.json index 6a649cbc4e32..763b92b7f474 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config11.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config11.json @@ -4,6 +4,7 @@ "character": 40 }, "source": "function_def/source/source11.bal", + "description": "", "items": [ { "label": "TestRecord1", @@ -125,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -149,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -173,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -197,11 +198,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -221,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -285,11 +286,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -309,11 +310,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -333,11 +334,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -357,11 +358,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -390,11 +391,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config14.json b/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config14.json index e12fdc7e795e..feff9d150390 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config14.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config14.json @@ -4,6 +4,7 @@ "character": 56 }, "source": "function_def/source/source14.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -494,11 +495,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -518,11 +519,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -542,11 +543,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -566,11 +567,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -590,11 +591,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config15.json b/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config15.json index b3dbb2c14611..9e347bfa6ade 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config15.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config15.json @@ -4,6 +4,7 @@ "character": 57 }, "source": "function_def/source/source15.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -479,11 +480,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -503,11 +504,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -527,11 +528,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -551,11 +552,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -575,11 +576,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config18.json b/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config18.json index e7ef87db09de..1f992172e814 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config18.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config18.json @@ -4,6 +4,7 @@ "character": 15 }, "source": "function_def/source/source18.bal", + "description": "", "items": [ { "label": "record", @@ -53,11 +54,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -77,11 +78,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -101,11 +102,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -125,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -149,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -240,11 +241,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -264,11 +265,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -288,11 +289,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -312,11 +313,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -336,11 +337,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config19.json b/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config19.json index 5772942fd962..cbb7a16806b6 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config19.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config19.json @@ -4,6 +4,7 @@ "character": 16 }, "source": "function_def/source/source19.bal", + "description": "", "items": [ { "label": "record", @@ -53,11 +54,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -77,11 +78,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -101,11 +102,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -125,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -149,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -240,11 +241,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -264,11 +265,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -288,11 +289,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -312,11 +313,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -336,11 +337,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config23.json b/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config23.json index 73b53420720b..df190ab3e499 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config23.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config23.json @@ -4,6 +4,7 @@ "character": 30 }, "source": "function_def/source/projectls/defaultable_param.bal", + "description": "", "items": [ { "label": "start", @@ -53,11 +54,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -77,11 +78,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -101,11 +102,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -125,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -149,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -173,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -237,11 +238,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -261,11 +262,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -550,11 +551,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -574,11 +575,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -598,11 +599,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -622,11 +623,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -646,11 +647,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config3.json b/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config3.json index 3ece32f4f72c..3ca4b46871c4 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config3.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config3.json @@ -4,6 +4,7 @@ "character": 33 }, "source": "function_def/source/source3.bal", + "description": "", "items": [ { "label": "TestRecord1", @@ -125,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -149,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -173,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -197,11 +198,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -221,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -312,11 +313,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -336,11 +337,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -417,11 +418,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config4.json b/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config4.json index bfe9342a5ef8..e7ef7fd1ff11 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config4.json @@ -4,6 +4,7 @@ "character": 34 }, "source": "function_def/source/source4.bal", + "description": "", "items": [ { "label": "TestRecord1", @@ -125,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -149,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -173,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -197,11 +198,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -221,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -312,11 +313,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -336,11 +337,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -509,11 +510,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config9.json b/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config9.json index 4fb02e4eb56d..200cbda05f26 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config9.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/function_def/config/config9.json @@ -4,6 +4,7 @@ "character": 23 }, "source": "function_def/source/source9.bal", + "description": "", "items": [ { "label": "TestRecord1", @@ -125,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -149,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -173,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -197,11 +198,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -221,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -285,11 +286,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -309,11 +310,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -333,11 +334,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -357,11 +358,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -390,11 +391,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/import_decl/config/config11.json b/language-server/modules/langserver-core/src/test/resources/completion/import_decl/config/config11.json index d6f704e8997c..677c52cc4575 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/import_decl/config/config11.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/import_decl/config/config11.json @@ -4,6 +4,7 @@ "character": 5 }, "source": "import_decl/source/lsproject/modules/module3/main2.bal", + "description": "", "items": [ { "label": "xmlns", @@ -400,11 +401,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -424,11 +425,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -583,11 +584,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -607,11 +608,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -631,11 +632,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -655,11 +656,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -679,11 +680,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -703,11 +704,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -727,11 +728,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -751,11 +752,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -775,11 +776,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -799,11 +800,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -832,11 +833,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/import_decl/config/config12.json b/language-server/modules/langserver-core/src/test/resources/completion/import_decl/config/config12.json index a8e4185f1e85..572db56cc0ed 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/import_decl/config/config12.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/import_decl/config/config12.json @@ -4,6 +4,7 @@ "character": 4 }, "source": "import_decl/source/lsproject/modules/module3/main3.bal", + "description": "", "items": [ { "label": "xmlns", @@ -400,11 +401,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -424,11 +425,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -583,11 +584,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -607,11 +608,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -631,11 +632,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -655,11 +656,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -679,11 +680,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -703,11 +704,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -727,11 +728,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -751,11 +752,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -775,11 +776,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -799,11 +800,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -832,11 +833,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/import_decl/config/config21.json b/language-server/modules/langserver-core/src/test/resources/completion/import_decl/config/config21.json index ab91c50fcf42..b8dc65d91b46 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/import_decl/config/config21.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/import_decl/config/config21.json @@ -4,6 +4,7 @@ "character": 5 }, "source": "import_decl/source/lsproject/modules/module3/main8.bal", + "description": "", "items": [ { "label": "xmlns", @@ -400,11 +401,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, @@ -424,11 +425,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, @@ -448,11 +449,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, @@ -607,11 +608,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, @@ -631,11 +632,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, @@ -655,11 +656,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, @@ -679,11 +680,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, @@ -703,11 +704,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, @@ -727,11 +728,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, @@ -751,11 +752,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, @@ -775,11 +776,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, @@ -799,11 +800,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, @@ -832,11 +833,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config1.json b/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config1.json index 9e4426fb42ce..6d02e02364be 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config1.json @@ -27,11 +27,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -51,11 +51,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -75,11 +75,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -99,11 +99,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -123,11 +123,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -187,11 +187,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -211,11 +211,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -235,11 +235,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -259,11 +259,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -283,11 +283,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config11.json b/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config11.json index 1fd702444777..1b0a3705867d 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config11.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config11.json @@ -4,6 +4,7 @@ "character": 45 }, "source": "listener_decl/source/source11.bal", + "description": "", "items": [ { "label": "getInt()", @@ -72,11 +73,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -96,11 +97,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -120,11 +121,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -144,11 +145,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -168,11 +169,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -286,11 +287,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -310,11 +311,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -334,11 +335,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -358,11 +359,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -382,11 +383,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config12.json b/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config12.json index aa4f41ae886f..255a6fd21dac 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config12.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config12.json @@ -4,6 +4,7 @@ "character": 46 }, "source": "listener_decl/source/source12.bal", + "description": "", "items": [ { "label": "StrandData", @@ -117,11 +118,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -141,11 +142,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -165,11 +166,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -189,11 +190,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -213,11 +214,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -277,11 +278,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -301,11 +302,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -325,11 +326,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -349,11 +350,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -382,11 +383,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config2.json b/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config2.json index e58e8909daf0..20e64e7bdec1 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config2.json @@ -27,11 +27,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -51,11 +51,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -75,11 +75,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -99,11 +99,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -123,11 +123,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -187,11 +187,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -211,11 +211,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -235,11 +235,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -259,11 +259,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -283,11 +283,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config3b.json b/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config3b.json index ab2b4e248f0d..2fa82a6c7088 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config3b.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config3b.json @@ -27,11 +27,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -51,11 +51,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -75,11 +75,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -99,11 +99,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -123,11 +123,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -187,11 +187,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -211,11 +211,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -235,11 +235,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -259,11 +259,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -283,11 +283,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config3c.json b/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config3c.json index b07307fe1caa..852193d58493 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config3c.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config3c.json @@ -27,11 +27,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -51,11 +51,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -75,11 +75,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -99,11 +99,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -123,11 +123,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -187,11 +187,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -211,11 +211,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -235,11 +235,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -259,11 +259,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -283,11 +283,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config4.json b/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config4.json index c23cbc68c51c..2e09ab42fc64 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config4.json @@ -35,11 +35,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -59,11 +59,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -83,11 +83,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -107,11 +107,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -131,11 +131,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -241,11 +241,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -265,11 +265,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -289,11 +289,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -313,11 +313,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -337,11 +337,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config5.json b/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config5.json index d0a84acdfc1b..b885f7946479 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config5.json @@ -35,11 +35,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -59,11 +59,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -83,11 +83,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -107,11 +107,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -131,11 +131,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -241,11 +241,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -265,11 +265,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -289,11 +289,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -313,11 +313,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -337,11 +337,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config7.json b/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config7.json index 76f8c6748bab..bdb681bf5793 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config7.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config7.json @@ -35,11 +35,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -59,11 +59,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -83,11 +83,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -107,11 +107,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -131,11 +131,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -223,11 +223,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -247,11 +247,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -271,11 +271,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -295,11 +295,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -319,11 +319,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config8.json b/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config8.json index ad4588884457..72c2e980507c 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config8.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config8.json @@ -35,11 +35,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -59,11 +59,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -83,11 +83,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -107,11 +107,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -131,11 +131,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -223,11 +223,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -247,11 +247,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -271,11 +271,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -295,11 +295,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -319,11 +319,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config9.json b/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config9.json index 5d1943843913..e2cbb15ebf18 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config9.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/listener_decl/config/config9.json @@ -27,11 +27,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -51,11 +51,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -75,11 +75,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -99,11 +99,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -123,11 +123,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -179,11 +179,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -203,11 +203,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -227,11 +227,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -251,11 +251,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -275,11 +275,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config1.json b/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config1.json index 41663864f417..b7ab514d6976 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config1.json @@ -4,6 +4,7 @@ "character": 13 }, "source": "module_const_context/source/source1.bal", + "description": "", "items": [ { "label": "StrandData", @@ -117,11 +118,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -141,11 +142,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -165,11 +166,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -189,11 +190,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -213,11 +214,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -277,11 +278,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -301,11 +302,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -325,11 +326,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -349,11 +350,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -391,11 +392,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config10.json b/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config10.json index 4817c90d335c..b58e56fd1623 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config10.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config10.json @@ -27,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -51,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -75,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -99,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -123,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -219,11 +219,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -243,11 +243,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -267,11 +267,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -291,11 +291,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -315,11 +315,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config2.json b/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config2.json index 79abfd21c1a6..d868608fde3f 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config2.json @@ -118,11 +118,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -142,11 +142,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -166,11 +166,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -190,11 +190,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -214,11 +214,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -278,11 +278,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -302,11 +302,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -326,11 +326,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -350,11 +350,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -392,11 +392,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config4.json b/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config4.json index 534529ce9ff7..1e7561f0584a 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config4.json @@ -118,11 +118,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -142,11 +142,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -166,11 +166,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -190,11 +190,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -214,11 +214,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -278,11 +278,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -302,11 +302,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -326,11 +326,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -350,11 +350,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -392,11 +392,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config6.json b/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config6.json index d2f797226d57..4343c2763e6d 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config6.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config6.json @@ -27,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -51,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -75,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -99,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -123,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -233,11 +233,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -257,11 +257,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -281,11 +281,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -305,11 +305,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -329,11 +329,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config7.json b/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config7.json index 15d353cd7d4b..acabac212753 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config7.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_const_context/config/config7.json @@ -27,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -51,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -75,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -99,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -123,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -233,11 +233,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -257,11 +257,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -281,11 +281,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -305,11 +305,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -329,11 +329,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config10.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config10.json index 6867084500fc..3c9603bbd1ce 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config10.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config10.json @@ -4,6 +4,7 @@ "character": 17 }, "source": "module_part_context/source/source10.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -222,11 +223,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -246,11 +247,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -270,11 +271,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -294,11 +295,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -318,11 +319,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config14.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config14.json index 88042f271374..204192e14f1c 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config14.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config14.json @@ -370,11 +370,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, @@ -394,11 +394,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, @@ -418,11 +418,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, @@ -442,11 +442,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, @@ -466,11 +466,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, @@ -530,11 +530,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, @@ -604,11 +604,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, @@ -628,11 +628,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, @@ -652,11 +652,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, @@ -676,11 +676,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, @@ -717,11 +717,11 @@ { "range": { "start": { - "line": 2, + "line": 3, "character": 0 }, "end": { - "line": 2, + "line": 3, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config15.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config15.json index e4130a96ad4c..ccbb9d295ad2 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config15.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config15.json @@ -368,11 +368,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -392,11 +392,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -416,11 +416,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -440,11 +440,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -464,11 +464,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -562,11 +562,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -586,11 +586,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -610,11 +610,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -634,11 +634,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -667,11 +667,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config16.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config16.json index 102c7ac32332..98cbee0331fd 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config16.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config16.json @@ -352,11 +352,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -376,11 +376,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -400,11 +400,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -424,11 +424,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -448,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -512,11 +512,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -570,11 +570,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -594,11 +594,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -618,11 +618,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -642,11 +642,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -666,11 +666,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -699,11 +699,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config6.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config6.json index 488f69e0b3fc..c7f0b2f57b2b 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config6.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config6.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "module_part_context/source/source6.bal", + "description": "", "items": [ { "label": "type", @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -408,11 +409,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -432,11 +433,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -554,11 +555,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -578,11 +579,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -602,11 +603,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -626,11 +627,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -659,11 +660,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config8.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config8.json index bc22ca1fa38b..97b7c4e185a9 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config8.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config8.json @@ -4,6 +4,7 @@ "character": 9 }, "source": "module_part_context/source/source8.bal", + "description": "", "items": [ { "label": "client", @@ -153,11 +154,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -177,11 +178,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -201,11 +202,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -225,11 +226,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -249,11 +250,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -331,11 +332,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -355,11 +356,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -379,11 +380,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -403,11 +404,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -436,11 +437,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config9.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config9.json index c7a3d9c2c823..3261c02e0286 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config9.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/config9.json @@ -4,6 +4,7 @@ "character": 17 }, "source": "module_part_context/source/source9.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -240,11 +241,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -264,11 +265,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -288,11 +289,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -312,11 +313,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -336,11 +337,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_annotation_decl_config.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_annotation_decl_config.json index 62b381c319d0..bcfd320df6e2 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_annotation_decl_config.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_annotation_decl_config.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "module_part_context/source/module_part_start_and_end_of_decls_and_defns.bal", + "description": "", "items": [ { "label": "type", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -554,11 +555,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -578,11 +579,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -602,11 +603,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -626,11 +627,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -707,11 +708,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_class_defn_config.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_class_defn_config.json index 74cf2fcde08e..47f5686d05a8 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_class_defn_config.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_class_defn_config.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "module_part_context/source/module_part_start_and_end_of_decls_and_defns.bal", + "description": "", "items": [ { "label": "type", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -554,11 +555,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -578,11 +579,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -602,11 +603,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -626,11 +627,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -707,11 +708,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_configurable_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_configurable_config1.json index bb5461697f1b..538a01947f62 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_configurable_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_configurable_config1.json @@ -127,11 +127,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -151,11 +151,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -175,11 +175,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -199,11 +199,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -223,11 +223,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -247,11 +247,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -271,11 +271,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -295,11 +295,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -319,11 +319,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -383,11 +383,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_const_decl_config.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_const_decl_config.json index 3d9cb2101f9a..9391ac23ad6b 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_const_decl_config.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_const_decl_config.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "module_part_context/source/module_part_start_and_end_of_decls_and_defns.bal", + "description": "", "items": [ { "label": "type", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -554,11 +555,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -578,11 +579,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -602,11 +603,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -626,11 +627,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -707,11 +708,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_enum_decl_config.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_enum_decl_config.json index 8a5a3e60a4c4..6406b85e8c53 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_enum_decl_config.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_enum_decl_config.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "module_part_context/source/module_part_start_and_end_of_decls_and_defns.bal", + "description": "", "items": [ { "label": "type", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -554,11 +555,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -578,11 +579,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -602,11 +603,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -626,11 +627,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -707,11 +708,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_funciton_defn_config.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_funciton_defn_config.json index 87440bf56d76..297111a5201c 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_funciton_defn_config.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_funciton_defn_config.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "module_part_context/source/module_part_start_and_end_of_decls_and_defns.bal", + "description": "", "items": [ { "label": "type", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -554,11 +555,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -578,11 +579,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -602,11 +603,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -626,11 +627,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -707,11 +708,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_import_decl_config.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_import_decl_config.json index b08f82f7136f..37c69f178ad5 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_import_decl_config.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_import_decl_config.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "module_part_context/source/module_part_start_and_end_of_decls_and_defns.bal", + "description": "", "items": [ { "label": "import", @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -408,11 +409,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -432,11 +433,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -465,11 +466,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -563,11 +564,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -587,11 +588,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -611,11 +612,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -635,11 +636,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -716,11 +717,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_listener_decl_config.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_listener_decl_config.json index 89690798d3dc..6a7d948dc08c 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_listener_decl_config.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_listener_decl_config.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "module_part_context/source/module_part_start_and_end_of_decls_and_defns.bal", + "description": "", "items": [ { "label": "type", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -554,11 +555,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -578,11 +579,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -602,11 +603,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -626,11 +627,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -707,11 +708,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_service_decl_config.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_service_decl_config.json index 0b681d05c20b..96a00194b7e4 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_service_decl_config.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_service_decl_config.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "module_part_context/source/module_part_start_and_end_of_decls_and_defns.bal", + "description": "", "items": [ { "label": "type", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -554,11 +555,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -578,11 +579,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -602,11 +603,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -626,11 +627,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -707,11 +708,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_type_defn_config.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_type_defn_config.json index b9be95cdc1e4..e9784aab5e91 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_type_defn_config.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_type_defn_config.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "module_part_context/source/module_part_start_and_end_of_decls_and_defns.bal", + "description": "", "items": [ { "label": "type", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -554,11 +555,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -578,11 +579,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -602,11 +603,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -626,11 +627,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -707,11 +708,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_var_decl_config.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_var_decl_config.json index a84924aac19f..d7ed86247519 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_var_decl_config.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_var_decl_config.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "module_part_context/source/module_part_start_and_end_of_decls_and_defns.bal", + "description": "", "items": [ { "label": "type", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -554,11 +555,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -578,11 +579,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -602,11 +603,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -626,11 +627,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -707,11 +708,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_xmlns_decl_config.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_xmlns_decl_config.json index 3b04ee33dd70..4b6b77b29299 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_xmlns_decl_config.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_after_xmlns_decl_config.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "module_part_context/source/module_part_start_and_end_of_decls_and_defns.bal", + "description": "", "items": [ { "label": "type", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -554,11 +555,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -578,11 +579,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -602,11 +603,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -626,11 +627,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -707,11 +708,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_annotation_decl_config.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_annotation_decl_config.json index 72702371a20c..a1a94f785233 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_annotation_decl_config.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_annotation_decl_config.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "module_part_context/source/module_part_start_and_end_of_decls_and_defns.bal", + "description": "", "items": [ { "label": "type", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -554,11 +555,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -578,11 +579,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -602,11 +603,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -626,11 +627,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -707,11 +708,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_class_defn_config.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_class_defn_config.json index 3dca99e2aa51..3980119cc409 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_class_defn_config.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_class_defn_config.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "module_part_context/source/module_part_start_and_end_of_decls_and_defns.bal", + "description": "", "items": [ { "label": "type", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -554,11 +555,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -578,11 +579,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -602,11 +603,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -626,11 +627,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -707,11 +708,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_const_decl_config.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_const_decl_config.json index 37f4f7aabd2d..e92a4fe360e8 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_const_decl_config.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_const_decl_config.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "module_part_context/source/module_part_start_and_end_of_decls_and_defns.bal", + "description": "", "items": [ { "label": "type", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -554,11 +555,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -578,11 +579,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -602,11 +603,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -626,11 +627,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -707,11 +708,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_enum_decl_config.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_enum_decl_config.json index 2bd21271590b..dda1782efb57 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_enum_decl_config.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_enum_decl_config.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "module_part_context/source/module_part_start_and_end_of_decls_and_defns.bal", + "description": "", "items": [ { "label": "type", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -554,11 +555,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -578,11 +579,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -602,11 +603,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -626,11 +627,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -707,11 +708,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_function_defn_config.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_function_defn_config.json index 8dd3d9ed2d13..dd5fcd901eb9 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_function_defn_config.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_function_defn_config.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "module_part_context/source/module_part_start_and_end_of_decls_and_defns.bal", + "description": "", "items": [ { "label": "type", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -554,11 +555,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -578,11 +579,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -602,11 +603,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -626,11 +627,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -707,11 +708,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_import_decl_config.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_import_decl_config.json index 09ed36e6ee95..e22e83b41350 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_import_decl_config.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_import_decl_config.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "module_part_context/source/module_part_start_and_end_of_decls_and_defns.bal", + "description": "", "items": [ { "label": "import", @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -408,11 +409,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -432,11 +433,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -465,11 +466,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -563,11 +564,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -587,11 +588,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -611,11 +612,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -635,11 +636,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -716,11 +717,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_listener_decl_config.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_listener_decl_config.json index e0dfc5cd0f0d..49479f0d9060 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_listener_decl_config.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_listener_decl_config.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "module_part_context/source/module_part_start_and_end_of_decls_and_defns.bal", + "description": "", "items": [ { "label": "import", @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -408,11 +409,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -432,11 +433,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -465,11 +466,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -563,11 +564,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -587,11 +588,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -611,11 +612,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -635,11 +636,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -716,11 +717,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_service_decl_config.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_service_decl_config.json index 9f354124369a..a3a26c93b86c 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_service_decl_config.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_service_decl_config.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "module_part_context/source/module_part_start_and_end_of_decls_and_defns.bal", + "description": "", "items": [ { "label": "type", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -554,11 +555,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -578,11 +579,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -602,11 +603,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -626,11 +627,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -707,11 +708,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_type_defn_config.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_type_defn_config.json index 750889ed0b33..fc01aabb8a59 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_type_defn_config.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_type_defn_config.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "module_part_context/source/module_part_start_and_end_of_decls_and_defns.bal", + "description": "", "items": [ { "label": "type", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -554,11 +555,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -578,11 +579,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -602,11 +603,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -626,11 +627,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -707,11 +708,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_var_decl_config.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_var_decl_config.json index cebaa8d90d95..a2084d95f5ab 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_var_decl_config.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_var_decl_config.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "module_part_context/source/module_part_start_and_end_of_decls_and_defns.bal", + "description": "", "items": [ { "label": "type", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -554,11 +555,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -578,11 +579,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -602,11 +603,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -626,11 +627,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -707,11 +708,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_xmlns_decl_config.json b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_xmlns_decl_config.json index ce9578057df1..e5ddffb5a505 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_xmlns_decl_config.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_part_context/config/module_level_before_xmlns_decl_config.json @@ -4,6 +4,7 @@ "character": 0 }, "source": "module_part_context/source/module_part_start_and_end_of_decls_and_defns.bal", + "description": "", "items": [ { "label": "type", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -554,11 +555,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -578,11 +579,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -602,11 +603,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -626,11 +627,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, @@ -707,11 +708,11 @@ { "range": { "start": { - "line": 1, + "line": 2, "character": 0 }, "end": { - "line": 1, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config1.json b/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config1.json index 1bbcd895a97d..0bc5b152930f 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config1.json @@ -4,6 +4,7 @@ "character": 28 }, "source": "module_var_context/source/source1.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -447,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -471,11 +472,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -495,11 +496,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -519,11 +520,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -543,11 +544,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config16.json b/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config16.json index fe2523cf14c4..58a4d9930a24 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config16.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config16.json @@ -127,11 +127,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -151,11 +151,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -175,11 +175,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -199,11 +199,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -223,11 +223,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -247,11 +247,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -271,11 +271,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -295,11 +295,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -319,11 +319,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -383,11 +383,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config18.json b/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config18.json index 86a2eec5e9ad..ee0ec0620e92 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config18.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config18.json @@ -127,11 +127,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -151,11 +151,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -175,11 +175,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -199,11 +199,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -223,11 +223,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -247,11 +247,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -271,11 +271,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -295,11 +295,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -319,11 +319,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -383,11 +383,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config2.json b/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config2.json index 8ddb18336e1d..1346cb9ce3f0 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config2.json @@ -4,6 +4,7 @@ "character": 29 }, "source": "module_var_context/source/source2.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -447,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -471,11 +472,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -495,11 +496,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -519,11 +520,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -543,11 +544,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config5.json b/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config5.json index b0ffa5fa743c..9e88c6fc517e 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config5.json @@ -4,6 +4,7 @@ "character": 23 }, "source": "module_var_context/source/source5.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -447,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -471,11 +472,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -495,11 +496,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -519,11 +520,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -543,11 +544,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config6.json b/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config6.json index 925023ac38d3..7ce0b2729c7d 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config6.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config6.json @@ -4,6 +4,7 @@ "character": 23 }, "source": "module_var_context/source/source6.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -462,11 +463,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -486,11 +487,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -510,11 +511,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -534,11 +535,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -558,11 +559,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config7.json b/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config7.json index d1d6f42fcba4..2b56cc18ff1c 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config7.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config7.json @@ -4,6 +4,7 @@ "character": 27 }, "source": "module_var_context/source/source7.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -186,11 +187,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -210,11 +211,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -234,11 +235,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -258,11 +259,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -282,11 +283,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config9.json b/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config9.json index 9e2c97303d2a..c876206c8c21 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config9.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config9.json @@ -4,6 +4,7 @@ "character": 10 }, "source": "module_var_context/source/source9.bal", + "description": "", "items": [ { "label": "function", @@ -171,11 +172,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -195,11 +196,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -219,11 +220,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -243,11 +244,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -267,11 +268,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -331,11 +332,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -355,11 +356,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -379,11 +380,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -403,11 +404,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -447,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_xml_namespace_decl/config/config1.json b/language-server/modules/langserver-core/src/test/resources/completion/module_xml_namespace_decl/config/config1.json index 3b80057a735a..e5f37d89e979 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_xml_namespace_decl/config/config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_xml_namespace_decl/config/config1.json @@ -4,6 +4,7 @@ "character": 6 }, "source": "module_xml_namespace_decl/source/source1.bal", + "description": "", "items": [ { "label": "STRING_CONST", @@ -40,11 +41,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -64,11 +65,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -88,11 +89,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -112,11 +113,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -136,11 +137,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -200,11 +201,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -224,11 +225,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -248,11 +249,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -272,11 +273,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -296,11 +297,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_xml_namespace_decl/config/config2.json b/language-server/modules/langserver-core/src/test/resources/completion/module_xml_namespace_decl/config/config2.json index f7205906f36f..3d0fe36c5747 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_xml_namespace_decl/config/config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_xml_namespace_decl/config/config2.json @@ -4,6 +4,7 @@ "character": 7 }, "source": "module_xml_namespace_decl/source/source2.bal", + "description": "", "items": [ { "label": "STRING_CONST", @@ -40,11 +41,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -64,11 +65,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -88,11 +89,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -112,11 +113,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -136,11 +137,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -200,11 +201,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -224,11 +225,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -248,11 +249,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -272,11 +273,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -296,11 +297,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_xml_namespace_decl/config/config8.json b/language-server/modules/langserver-core/src/test/resources/completion/module_xml_namespace_decl/config/config8.json index 7217bc743e22..f5e7a347377d 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_xml_namespace_decl/config/config8.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_xml_namespace_decl/config/config8.json @@ -4,6 +4,7 @@ "character": 8 }, "source": "module_xml_namespace_decl/source/source8.bal", + "description": "", "items": [ { "label": "STRING_CONST", @@ -40,11 +41,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -64,11 +65,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -88,11 +89,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -112,11 +113,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -136,11 +137,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -200,11 +201,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -224,11 +225,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -248,11 +249,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -272,11 +273,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -296,11 +297,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/performance_completion/config/performance_completion.json b/language-server/modules/langserver-core/src/test/resources/completion/performance_completion/config/performance_completion.json index 12a959e48946..6d16fd4be776 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/performance_completion/config/performance_completion.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/performance_completion/config/performance_completion.json @@ -4,6 +4,7 @@ "character": 16 }, "source": "statement_context/source/assignment_stmt_ctx_source1.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -452,11 +453,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -476,11 +477,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -500,11 +501,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -524,11 +525,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -548,11 +549,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config14.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config14.json index e1d875a059ee..99043c0898f0 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config14.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config14.json @@ -27,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -51,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -75,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -379,11 +379,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -403,11 +403,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -436,11 +436,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -460,11 +460,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -484,11 +484,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -508,11 +508,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -532,11 +532,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config22.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config22.json index 9088e7848daf..47c9992e6e20 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config22.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config22.json @@ -4,6 +4,7 @@ "character": 42 }, "source": "query_expression/source/query_expr_ctx_source22.bal", + "description": "", "items": [ { "label": "from", @@ -44,11 +45,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -68,11 +69,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -92,11 +93,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -116,11 +117,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -140,11 +141,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -448,11 +449,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -472,11 +473,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -496,11 +497,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -520,11 +521,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -544,11 +545,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config23.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config23.json index 9bf6c1dadbf7..3620634d93df 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config23.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config23.json @@ -4,6 +4,7 @@ "character": 43 }, "source": "query_expression/source/query_expr_ctx_source23.bal", + "description": "", "items": [ { "label": "from", @@ -44,11 +45,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -68,11 +69,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -92,11 +93,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -116,11 +117,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -140,11 +141,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -448,11 +449,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -472,11 +473,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -496,11 +497,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -520,11 +521,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -544,11 +545,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config24.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config24.json index 7b6ca254f8b1..ffe182f0c0ea 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config24.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config24.json @@ -4,6 +4,7 @@ "character": 50 }, "source": "query_expression/source/query_expr_ctx_source24.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -146,11 +147,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -170,11 +171,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -194,11 +195,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -218,11 +219,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -242,11 +243,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config25.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config25.json index 45ca9717b37e..f10356be98f8 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config25.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config25.json @@ -4,6 +4,7 @@ "character": 38 }, "source": "query_expression/source/query_expr_ctx_source25.bal", + "description": "", "items": [ { "label": "from", @@ -44,11 +45,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -68,11 +69,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -92,11 +93,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -116,11 +117,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -140,11 +141,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -432,11 +433,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -480,11 +481,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -504,11 +505,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -528,11 +529,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config26.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config26.json index 471b9d6d57cd..8bf3e8a704c0 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config26.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config26.json @@ -4,6 +4,7 @@ "character": 39 }, "source": "query_expression/source/query_expr_ctx_source26.bal", + "description": "", "items": [ { "label": "from", @@ -44,11 +45,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -68,11 +69,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -92,11 +93,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -116,11 +117,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -140,11 +141,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -432,11 +433,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -480,11 +481,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -504,11 +505,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -528,11 +529,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config7.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config7.json index 1a7a586ef3ed..419311642445 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config7.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config7.json @@ -118,11 +118,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -142,11 +142,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -166,11 +166,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -239,11 +239,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -263,11 +263,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -287,11 +287,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -311,11 +311,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -335,11 +335,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -368,11 +368,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -392,11 +392,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config8.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config8.json index bfd1db31669f..3a2f9d4987bf 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config8.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_config8.json @@ -118,11 +118,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -142,11 +142,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -166,11 +166,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -239,11 +239,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -263,11 +263,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -287,11 +287,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -311,11 +311,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -335,11 +335,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -359,11 +359,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -392,11 +392,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_join_clause_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_join_clause_config1.json index 01756505034d..14821702edbf 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_join_clause_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_join_clause_config1.json @@ -4,6 +4,7 @@ "character": 21 }, "source": "query_expression/source/query_expr_ctx_join_clause_source1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -302,11 +303,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -326,11 +327,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -350,11 +351,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -374,11 +375,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -407,11 +408,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_join_clause_config12.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_join_clause_config12.json index 6fa629ccd70c..8d163233a0da 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_join_clause_config12.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_join_clause_config12.json @@ -4,6 +4,7 @@ "character": 38 }, "source": "query_expression/source/query_expr_ctx_join_clause_source12.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -496,11 +497,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -520,11 +521,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -544,11 +545,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -568,11 +569,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -592,11 +593,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_join_clause_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_join_clause_config2.json index 15b85174c89e..8f98a02859c4 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_join_clause_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_join_clause_config2.json @@ -4,6 +4,7 @@ "character": 22 }, "source": "query_expression/source/query_expr_ctx_join_clause_source2.bal", + "description": "", "items": [ { "label": "Thread", @@ -133,11 +134,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -229,11 +230,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -302,11 +303,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -326,11 +327,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -350,11 +351,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -374,11 +375,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -407,11 +408,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_join_clause_config5.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_join_clause_config5.json index c75150dbcff9..b5f524dd972e 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_join_clause_config5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_join_clause_config5.json @@ -4,6 +4,7 @@ "character": 37 }, "source": "query_expression/source/query_expr_ctx_join_clause_source5.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -496,11 +497,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -520,11 +521,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -544,11 +545,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -568,11 +569,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -592,11 +593,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config1.json index 95dd548d6f0f..c5e6591bfc34 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config1.json @@ -4,6 +4,7 @@ "character": 20 }, "source": "query_expression/source/query_expr_ctx_let_clause_source1.bal", + "description": "", "items": [ { "label": "Thread", @@ -133,11 +134,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -229,11 +230,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -302,11 +303,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -326,11 +327,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -350,11 +351,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -374,11 +375,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -407,11 +408,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config10.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config10.json index 78311c25be41..9ce7ed8dc407 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config10.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config10.json @@ -4,6 +4,7 @@ "character": 36 }, "source": "query_expression/source/query_expr_ctx_let_clause_source10.bal", + "description": "", "items": [ { "label": "Thread", @@ -133,11 +134,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -229,11 +230,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -302,11 +303,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -326,11 +327,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -350,11 +351,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -374,11 +375,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -418,11 +419,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config11.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config11.json index d2f0c82aad1a..4364b681468b 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config11.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config11.json @@ -4,6 +4,7 @@ "character": 46 }, "source": "query_expression/source/query_expr_ctx_let_clause_source11.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -463,11 +464,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -496,11 +497,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -520,11 +521,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -544,11 +545,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -568,11 +569,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -592,11 +593,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config2.json index e689367d18b3..11fdb021354b 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config2.json @@ -4,6 +4,7 @@ "character": 21 }, "source": "query_expression/source/query_expr_ctx_let_clause_source2.bal", + "description": "", "items": [ { "label": "Thread", @@ -133,11 +134,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -229,11 +230,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -302,11 +303,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -326,11 +327,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -350,11 +351,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -374,11 +375,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -407,11 +408,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config4.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config4.json index 2e852f54934b..dee5c828db0d 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config4.json @@ -4,6 +4,7 @@ "character": 31 }, "source": "query_expression/source/query_expr_ctx_let_clause_source4.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -463,11 +464,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -496,11 +497,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -520,11 +521,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -544,11 +545,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -568,11 +569,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -592,11 +593,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config5.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config5.json index 8a7f83560d27..2e3f0ec7e775 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config5.json @@ -4,6 +4,7 @@ "character": 32 }, "source": "query_expression/source/query_expr_ctx_let_clause_source5.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -463,11 +464,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -496,11 +497,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -520,11 +521,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -544,11 +545,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -568,11 +569,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -592,11 +593,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config6.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config6.json index ad64987c1427..fe321b3e59a1 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config6.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config6.json @@ -4,6 +4,7 @@ "character": 39 }, "source": "query_expression/source/query_expr_ctx_let_clause_source6.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -146,11 +147,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -170,11 +171,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -194,11 +195,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -218,11 +219,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -242,11 +243,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config7.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config7.json index fc160a5fe1ce..713d5ded8eb1 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config7.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config7.json @@ -4,6 +4,7 @@ "character": 40 }, "source": "query_expression/source/query_expr_ctx_let_clause_source7.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -146,11 +147,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -170,11 +171,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -194,11 +195,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -218,11 +219,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -242,11 +243,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config8.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config8.json index a31c2175f2d8..0e3d4084932f 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config8.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config8.json @@ -4,6 +4,7 @@ "character": 40 }, "source": "query_expression/source/query_expr_ctx_let_clause_source8.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -146,11 +147,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -170,11 +171,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -194,11 +195,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -218,11 +219,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -242,11 +243,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config9.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config9.json index 02ccefc6dad4..5801ee36f753 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config9.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_let_clause_config9.json @@ -4,6 +4,7 @@ "character": 35 }, "source": "query_expression/source/query_expr_ctx_let_clause_source9.bal", + "description": "", "items": [ { "label": "Thread", @@ -133,11 +134,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -229,11 +230,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -302,11 +303,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -326,11 +327,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -350,11 +351,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -374,11 +375,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -407,11 +408,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_limit_clause_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_limit_clause_config1.json index a6e8a75344fe..fbb60fc968f1 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_limit_clause_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_limit_clause_config1.json @@ -4,6 +4,7 @@ "character": 22 }, "source": "query_expression/source/query_expr_ctx_limit_clause_source1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -488,11 +489,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -512,11 +513,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -536,11 +537,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -560,11 +561,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -584,11 +585,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_limit_clause_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_limit_clause_config2.json index af056eef3cc8..1148c797d4e5 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_limit_clause_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_limit_clause_config2.json @@ -4,6 +4,7 @@ "character": 23 }, "source": "query_expression/source/query_expr_ctx_limit_clause_source2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -488,11 +489,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -512,11 +513,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -536,11 +537,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -560,11 +561,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -584,11 +585,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_limit_clause_config4.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_limit_clause_config4.json index 1c7acb9e359c..e1f8ab3ea509 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_limit_clause_config4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_limit_clause_config4.json @@ -4,6 +4,7 @@ "character": 27 }, "source": "query_expression/source/query_expr_ctx_limit_clause_source4.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -146,11 +147,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -170,11 +171,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -194,11 +195,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -218,11 +219,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -595,11 +596,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_onconflict_clause_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_onconflict_clause_config2.json index 12a45baae409..a21d5eff97a9 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_onconflict_clause_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_onconflict_clause_config2.json @@ -4,6 +4,7 @@ "character": 25 }, "source": "query_expression/source/query_expr_ctx_onconflict_clause_source2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -464,11 +465,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -488,11 +489,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -512,11 +513,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -536,11 +537,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -560,11 +561,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_orderby_clause_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_orderby_clause_config1.json index ae2e36caf6b5..9c9dd2947f23 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_orderby_clause_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_orderby_clause_config1.json @@ -4,6 +4,7 @@ "character": 25 }, "source": "query_expression/source/query_expr_ctx_orderby_clause_source1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -496,11 +497,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -520,11 +521,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -544,11 +545,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -568,11 +569,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -592,11 +593,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_orderby_clause_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_orderby_clause_config2.json index 410f2463057f..10a13cb3b8aa 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_orderby_clause_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_orderby_clause_config2.json @@ -4,6 +4,7 @@ "character": 26 }, "source": "query_expression/source/query_expr_ctx_orderby_clause_source2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -496,11 +497,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -520,11 +521,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -544,11 +545,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -568,11 +569,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -592,11 +593,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_select_clause_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_select_clause_config1.json index 85ce79b18d3a..1d25d9dbebb4 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_select_clause_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_select_clause_config1.json @@ -4,6 +4,7 @@ "character": 19 }, "source": "query_expression/source/query_expr_ctx_select_clause_source1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -489,11 +490,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -513,11 +514,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -537,11 +538,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -561,11 +562,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -585,11 +586,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_select_clause_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_select_clause_config2.json index 7242f43344d8..ded35f4a8cca 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_select_clause_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/query_expression/config/query_expr_ctx_select_clause_config2.json @@ -4,6 +4,7 @@ "character": 20 }, "source": "query_expression/source/query_expr_ctx_select_clause_source2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -489,11 +490,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -513,11 +514,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -537,11 +538,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -561,11 +562,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -585,11 +586,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config1.json b/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config1.json index be58feffc8c2..dda35feac364 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config1.json @@ -4,6 +4,7 @@ "character": 4 }, "source": "record_type_desc/source/source1.bal", + "description": "", "items": [ { "label": "StrandData", @@ -149,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -173,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -197,11 +198,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -221,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -245,11 +246,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -309,11 +310,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -333,11 +334,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -357,11 +358,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -381,11 +382,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -414,11 +415,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config10.json b/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config10.json index d6c70cc789b7..428c623339c3 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config10.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config10.json @@ -4,6 +4,7 @@ "character": 6 }, "source": "record_type_desc/source/source10.bal", + "description": "", "items": [ { "label": "T5", @@ -61,11 +62,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -85,11 +86,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -109,11 +110,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -133,11 +134,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -221,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -245,11 +246,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -269,11 +270,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -293,11 +294,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -317,11 +318,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config2.json b/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config2.json index 0dc54c5f5d2b..5eb4882478a8 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config2.json @@ -4,6 +4,7 @@ "character": 5 }, "source": "record_type_desc/source/source2.bal", + "description": "", "items": [ { "label": "StrandData", @@ -149,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -173,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -197,11 +198,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -221,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -245,11 +246,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -309,11 +310,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -333,11 +334,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -357,11 +358,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -381,11 +382,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -506,11 +507,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config5.json b/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config5.json index d5cd37a47923..cc987e970c4c 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config5.json @@ -4,6 +4,7 @@ "character": 23 }, "source": "record_type_desc/source/source5.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -544,11 +545,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -568,11 +569,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -592,11 +593,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -616,11 +617,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -640,11 +641,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config6.json b/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config6.json index fa28ae0287be..6daf02ef4014 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config6.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config6.json @@ -4,6 +4,7 @@ "character": 24 }, "source": "record_type_desc/source/source6.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -544,11 +545,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -568,11 +569,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -592,11 +593,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -616,11 +617,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -640,11 +641,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config7.json b/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config7.json index 5c1e85820142..28b36c69384f 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config7.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config7.json @@ -4,6 +4,7 @@ "character": 20 }, "source": "record_type_desc/source/source7.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -526,11 +527,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -550,11 +551,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -574,11 +575,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -598,11 +599,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -622,11 +623,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config8.json b/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config8.json index cb71a093e744..ff1d3b68dab9 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config8.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config8.json @@ -4,6 +4,7 @@ "character": 21 }, "source": "record_type_desc/source/source8.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -526,11 +527,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -550,11 +551,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -574,11 +575,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -598,11 +599,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -622,11 +623,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config9.json b/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config9.json index b140adbbf9eb..babfb98d0ba3 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config9.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config9.json @@ -4,6 +4,7 @@ "character": 5 }, "source": "record_type_desc/source/source9.bal", + "description": "", "items": [ { "label": "T5", @@ -61,11 +62,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -85,11 +86,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -109,11 +110,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -133,11 +134,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -221,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -245,11 +246,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -269,11 +270,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -293,11 +294,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -317,11 +318,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/service_body/config/config4.json b/language-server/modules/langserver-core/src/test/resources/completion/service_body/config/config4.json index 876a1717d278..a875e842a52b 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/service_body/config/config4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/service_body/config/config4.json @@ -4,6 +4,7 @@ "character": 8 }, "source": "service_body/source/source4.bal", + "description": "", "items": [ { "label": "xmlns", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -447,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -640,11 +641,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -664,11 +665,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -688,11 +689,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -712,11 +713,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -745,11 +746,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/service_body/config/config5.json b/language-server/modules/langserver-core/src/test/resources/completion/service_body/config/config5.json index 2e06ff36a914..2084795a78d2 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/service_body/config/config5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/service_body/config/config5.json @@ -145,11 +145,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -169,11 +169,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -193,11 +193,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -217,11 +217,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -241,11 +241,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -368,11 +368,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -392,11 +392,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -416,11 +416,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -440,11 +440,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -473,11 +473,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config1.json b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config1.json index 356cfa6a4bfc..d01d3e1126a8 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config1.json @@ -4,6 +4,7 @@ "character": 8 }, "source": "service_decl/source/source1.bal", + "description": "", "items": [ { "label": "TestObject", @@ -34,11 +35,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -58,11 +59,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -82,11 +83,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -106,11 +107,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -130,11 +131,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -248,11 +249,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -272,11 +273,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -296,11 +297,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -320,11 +321,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -344,11 +345,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config10.json b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config10.json index 0121f1ca0fca..e31daae3d3c6 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config10.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config10.json @@ -126,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -150,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -174,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -198,11 +198,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -222,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -376,11 +376,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -400,11 +400,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -424,11 +424,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -448,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -481,11 +481,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config11.json b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config11.json index 185aaf002081..5dbb2f8a8a15 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config11.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config11.json @@ -126,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -150,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -174,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -198,11 +198,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -222,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -376,11 +376,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -400,11 +400,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -424,11 +424,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -448,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -481,11 +481,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config12.json b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config12.json index dbfb9d7f5113..f2c9ebb84b0e 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config12.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config12.json @@ -4,6 +4,7 @@ "character": 15 }, "source": "service_decl/source/source12.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -392,11 +393,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -416,11 +417,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -440,11 +441,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -464,11 +465,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -488,11 +489,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -512,11 +513,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config14.json b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config14.json index 9fd12cf21a4e..b0a8d65e26d7 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config14.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config14.json @@ -126,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -150,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -174,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -198,11 +198,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -222,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -376,11 +376,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -400,11 +400,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -424,11 +424,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -448,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -549,11 +549,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config15.json b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config15.json index 3986d2438676..50b630a0474c 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config15.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config15.json @@ -126,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -150,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -174,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -198,11 +198,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -222,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -376,11 +376,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -400,11 +400,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -424,11 +424,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -448,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -514,11 +514,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config16.json b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config16.json index e25c84aa83a0..0262f684afde 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config16.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config16.json @@ -4,6 +4,7 @@ "character": 9 }, "source": "service_decl/source/source16.bal", + "description": "", "items": [ { "label": "xmlns", @@ -359,11 +360,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -383,11 +384,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -407,11 +408,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -431,11 +432,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -455,11 +456,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -640,11 +641,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -664,11 +665,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -688,11 +689,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -712,11 +713,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -745,11 +746,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config17.json b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config17.json index b0a1e5e02185..4d0104648e52 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config17.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config17.json @@ -4,6 +4,7 @@ "character": 1 }, "source": "service_decl/source/source17.bal", + "description": "", "items": [ { "label": "type", @@ -368,11 +369,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -392,11 +393,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -416,11 +417,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -440,11 +441,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -464,11 +465,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -562,11 +563,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -586,11 +587,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -610,11 +611,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -634,11 +635,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -667,11 +668,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config18.json b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config18.json index 79a2f355fbfc..13b0c3cd9e09 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config18.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config18.json @@ -4,6 +4,7 @@ "character": 1 }, "source": "service_decl/source/source18.bal", + "description": "", "items": [ { "label": "type", @@ -368,11 +369,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -392,11 +393,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -416,11 +417,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -440,11 +441,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -464,11 +465,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -562,11 +563,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -586,11 +587,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -610,11 +611,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -634,11 +635,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, @@ -667,11 +668,11 @@ { "range": { "start": { - "line": 0, + "line": 2, "character": 0 }, "end": { - "line": 0, + "line": 2, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config2.json b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config2.json index 833797ce01fc..8af9aae4efac 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config2.json @@ -4,6 +4,7 @@ "character": 9 }, "source": "service_decl/source/source2.bal", + "description": "", "items": [ { "label": "TestObject", @@ -34,11 +35,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -58,11 +59,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -82,11 +83,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -106,11 +107,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -130,11 +131,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -248,11 +249,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -272,11 +273,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -296,11 +297,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -320,11 +321,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -344,11 +345,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config3.json b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config3.json index c17c4a7e6696..56b7edc9e3db 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config3.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config3.json @@ -4,6 +4,7 @@ "character": 8 }, "source": "service_decl/source/source3.bal", + "description": "", "items": [ { "label": "TestObject", @@ -34,11 +35,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -58,11 +59,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -82,11 +83,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -106,11 +107,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -130,11 +131,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -248,11 +249,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -272,11 +273,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -296,11 +297,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -320,11 +321,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -344,11 +345,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config4.json b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config4.json index 0c4a6ac45d1d..bb09d14f6fac 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config4.json @@ -4,6 +4,7 @@ "character": 9 }, "source": "service_decl/source/source4.bal", + "description": "", "items": [ { "label": "TestObject", @@ -43,11 +44,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -67,11 +68,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -91,11 +92,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -115,11 +116,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -139,11 +140,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -212,11 +213,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -236,11 +237,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -260,11 +261,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -284,11 +285,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -308,11 +309,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config6c.json b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config6c.json index 2878285984c6..c08219919c34 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config6c.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config6c.json @@ -4,6 +4,7 @@ "character": 22 }, "source": "service_decl/source/source6c.bal", + "description": "", "items": [ { "label": "l1", @@ -34,11 +35,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -58,11 +59,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -82,11 +83,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -106,11 +107,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -130,11 +131,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -203,11 +204,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -227,11 +228,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -251,11 +252,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -275,11 +276,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -299,11 +300,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config6d.json b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config6d.json index 9f38ff75b791..5810815e5bec 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config6d.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config6d.json @@ -4,6 +4,7 @@ "character": 23 }, "source": "service_decl/source/source6d.bal", + "description": "", "items": [ { "label": "l1", @@ -34,11 +35,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -58,11 +59,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -82,11 +83,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -106,11 +107,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -130,11 +131,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -203,11 +204,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -227,11 +228,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -251,11 +252,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -275,11 +276,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -299,11 +300,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config6g.json b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config6g.json index 373866bfe905..ce11d30ede0d 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config6g.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config6g.json @@ -4,6 +4,7 @@ "character": 26 }, "source": "service_decl/source/source6g.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -186,11 +187,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -210,11 +211,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -234,11 +235,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -258,11 +259,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -282,11 +283,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config7.json b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config7.json index 6157d4226130..83e92a2fd5c5 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config7.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/service_decl/config/config7.json @@ -4,6 +4,7 @@ "character": 1 }, "source": "service_decl/source/source7.bal", + "description": "", "items": [ { "label": "type", @@ -368,11 +369,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -392,11 +393,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -416,11 +417,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -440,11 +441,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -464,11 +465,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -562,11 +563,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -586,11 +587,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -610,11 +611,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -634,11 +635,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -667,11 +668,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/assignment_stmt_ctx_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/assignment_stmt_ctx_config1.json index 12a959e48946..6d16fd4be776 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/assignment_stmt_ctx_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/assignment_stmt_ctx_config1.json @@ -4,6 +4,7 @@ "character": 16 }, "source": "statement_context/source/assignment_stmt_ctx_source1.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -452,11 +453,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -476,11 +477,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -500,11 +501,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -524,11 +525,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -548,11 +549,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/assignment_stmt_ctx_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/assignment_stmt_ctx_config2.json index c7075dbe3498..37e8d8c02bac 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/assignment_stmt_ctx_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/assignment_stmt_ctx_config2.json @@ -4,6 +4,7 @@ "character": 17 }, "source": "statement_context/source/assignment_stmt_ctx_source2.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -452,11 +453,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -476,11 +477,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -500,11 +501,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -524,11 +525,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -548,11 +549,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/assignment_stmt_ctx_config3.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/assignment_stmt_ctx_config3.json index 218b52c6fbd1..37f002ec38b5 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/assignment_stmt_ctx_config3.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/assignment_stmt_ctx_config3.json @@ -4,6 +4,7 @@ "character": 16 }, "source": "statement_context/source/assignment_stmt_ctx_source3.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -470,11 +471,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -494,11 +495,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -518,11 +519,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -542,11 +543,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -566,11 +567,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/assignment_stmt_ctx_config8.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/assignment_stmt_ctx_config8.json index 6c7a008200a7..e69fab20339b 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/assignment_stmt_ctx_config8.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/assignment_stmt_ctx_config8.json @@ -4,6 +4,7 @@ "character": 16 }, "source": "statement_context/source/assignment_stmt_ctx_source8.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -477,11 +478,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -501,11 +502,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -525,11 +526,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -549,11 +550,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -573,11 +574,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/assignment_stmt_ctx_config9.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/assignment_stmt_ctx_config9.json index 31823670e336..d11411fb10ef 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/assignment_stmt_ctx_config9.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/assignment_stmt_ctx_config9.json @@ -63,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -87,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -111,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -135,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -159,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -480,11 +480,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -504,11 +504,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -528,11 +528,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -552,11 +552,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -576,11 +576,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/do_stmt_ctx_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/do_stmt_ctx_config1.json index 1fedaf566fdf..19c4d357269c 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/do_stmt_ctx_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/do_stmt_ctx_config1.json @@ -4,6 +4,7 @@ "character": 8 }, "source": "statement_context/source/do_stmt_ctx_source1.bal", + "description": "", "items": [ { "label": "xmlns", @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -408,11 +409,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -432,11 +433,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -542,11 +543,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -647,11 +648,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -671,11 +672,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -695,11 +696,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -719,11 +720,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -752,11 +753,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config14.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config14.json index 9dc8d5edec44..a36e7308ddb4 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config14.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config14.json @@ -4,6 +4,7 @@ "character": 8 }, "source": "statement_context/source/match_stmt_ctx_source14.bal", + "description": "", "items": [ { "label": "ballerina/lang.runtime", @@ -17,11 +18,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -41,11 +42,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -241,11 +242,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -265,11 +266,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -289,11 +290,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -313,11 +314,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -337,11 +338,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config15.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config15.json index 634d42a79aa9..c9073f3a10f2 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config15.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config15.json @@ -4,6 +4,7 @@ "character": 9 }, "source": "statement_context/source/match_stmt_ctx_source15.bal", + "description": "", "items": [ { "label": "ballerina/lang.runtime", @@ -17,11 +18,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -41,11 +42,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -241,11 +242,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -265,11 +266,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -289,11 +290,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -313,11 +314,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -337,11 +338,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config16.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config16.json index afb7b7501e4b..425263813e28 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config16.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config16.json @@ -4,6 +4,7 @@ "character": 13 }, "source": "statement_context/source/match_stmt_ctx_source16.bal", + "description": "", "items": [ { "label": "ballerina/lang.runtime", @@ -17,11 +18,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -41,11 +42,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -241,11 +242,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -265,11 +266,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -289,11 +290,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -313,11 +314,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -337,11 +338,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config2.json index f4b193ab3f65..61670b3bb524 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config2.json @@ -4,6 +4,7 @@ "character": 11 }, "source": "statement_context/source/match_stmt_ctx_source2.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -480,11 +481,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -504,11 +505,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -528,11 +529,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -552,11 +553,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -576,11 +577,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config20.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config20.json index 44ecfe3501be..53bd223f7f09 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config20.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config20.json @@ -4,6 +4,7 @@ "character": 19 }, "source": "statement_context/source/match_stmt_ctx_source20.bal", + "description": "", "items": [ { "label": "ballerina/lang.runtime", @@ -17,11 +18,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -41,11 +42,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -480,11 +481,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -504,11 +505,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -528,11 +529,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -552,11 +553,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config21.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config21.json index 91d765a49a2e..1b95cf1e6827 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config21.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config21.json @@ -4,6 +4,7 @@ "character": 20 }, "source": "statement_context/source/match_stmt_ctx_source21.bal", + "description": "", "items": [ { "label": "ballerina/lang.runtime", @@ -17,11 +18,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -41,11 +42,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -480,11 +481,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -504,11 +505,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -528,11 +529,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -552,11 +553,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config22.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config22.json index 24b0e323fd00..03708757cbf9 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config22.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config22.json @@ -4,6 +4,7 @@ "character": 31 }, "source": "statement_context/source/match_stmt_ctx_source22.bal", + "description": "", "items": [ { "label": "ballerina/lang.runtime", @@ -17,11 +18,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -41,11 +42,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -480,11 +481,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -504,11 +505,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -528,11 +529,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -552,11 +553,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config4.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config4.json index 133d454427f8..34bac637b05d 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config4.json @@ -4,6 +4,7 @@ "character": 8 }, "source": "statement_context/source/match_stmt_ctx_source4.bal", + "description": "", "items": [ { "label": "true", @@ -109,11 +110,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -133,11 +134,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -269,11 +270,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -293,11 +294,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -317,11 +318,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -341,11 +342,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -365,11 +366,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config5.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config5.json index 4b25f517eae7..9d83746e8eba 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/match_stmt_ctx_config5.json @@ -4,6 +4,7 @@ "character": 9 }, "source": "statement_context/source/match_stmt_ctx_source5.bal", + "description": "", "items": [ { "label": "true", @@ -109,11 +110,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -133,11 +134,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -269,11 +270,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -293,11 +294,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -317,11 +318,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -341,11 +342,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -365,11 +366,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config1.json index 8354acd3d9b9..576ba4860e40 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config1.json @@ -4,6 +4,7 @@ "character": 6 }, "source": "statement_context/source/onfail_clause_ctx_source1.bal", + "description": "", "items": [ { "label": "xmlns", @@ -369,11 +370,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -393,11 +394,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -417,11 +418,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -441,11 +442,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -465,11 +466,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -642,11 +643,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -666,11 +667,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -690,11 +691,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -714,11 +715,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -747,11 +748,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config1a.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config1a.json index 03d529593d51..446f5fa3fdd9 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config1a.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config1a.json @@ -4,6 +4,7 @@ "character": 7 }, "source": "statement_context/source/onfail_clause_ctx_source1a.bal", + "description": "", "items": [ { "label": "xmlns", @@ -369,11 +370,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -393,11 +394,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -417,11 +418,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -441,11 +442,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -465,11 +466,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -642,11 +643,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -666,11 +667,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -690,11 +691,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -714,11 +715,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -747,11 +748,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config2.json index f43f2fd795a4..6fbcb790bf1f 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config2.json @@ -4,6 +4,7 @@ "character": 7 }, "source": "statement_context/source/onfail_clause_ctx_source2.bal", + "description": "", "items": [ { "label": "xmlns", @@ -369,11 +370,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -393,11 +394,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -417,11 +418,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -441,11 +442,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -465,11 +466,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -642,11 +643,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -666,11 +667,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -690,11 +691,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -714,11 +715,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -747,11 +748,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config2a.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config2a.json index 62e1dcacc1af..483133dca87b 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config2a.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config2a.json @@ -4,6 +4,7 @@ "character": 6 }, "source": "statement_context/source/onfail_clause_ctx_source2a.bal", + "description": "", "items": [ { "label": "xmlns", @@ -369,11 +370,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -393,11 +394,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -417,11 +418,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -441,11 +442,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -465,11 +466,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -642,11 +643,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -666,11 +667,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -690,11 +691,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -714,11 +715,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -747,11 +748,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config2c.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config2c.json index ab164a23b3a9..3502d99aa1b7 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config2c.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config2c.json @@ -4,6 +4,7 @@ "character": 14 }, "source": "statement_context/source/onfail_clause_ctx_source2c.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -195,11 +196,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -219,11 +220,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -243,11 +244,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -267,11 +268,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -291,11 +292,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config3.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config3.json index ecdb89c7b3c7..f465947955d4 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config3.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config3.json @@ -4,6 +4,7 @@ "character": 10 }, "source": "statement_context/source/onfail_clause_ctx_source3.bal", + "description": "", "items": [ { "label": "xmlns", @@ -387,11 +388,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -411,11 +412,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -435,11 +436,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -459,11 +460,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -483,11 +484,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -659,11 +660,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -683,11 +684,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -707,11 +708,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -731,11 +732,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -764,11 +765,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config4.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config4.json index 9a747c7a57d6..516cd2d0a391 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config4.json @@ -4,6 +4,7 @@ "character": 7 }, "source": "statement_context/source/onfail_clause_ctx_source4.bal", + "description": "", "items": [ { "label": "xmlns", @@ -369,11 +370,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -393,11 +394,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -417,11 +418,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -441,11 +442,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -465,11 +466,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -642,11 +643,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -666,11 +667,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -690,11 +691,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -714,11 +715,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -747,11 +748,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config5.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config5.json index b8828f6e6eca..4bf20c5c99ba 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config5.json @@ -4,6 +4,7 @@ "character": 7 }, "source": "statement_context/source/onfail_clause_ctx_source5.bal", + "description": "", "items": [ { "label": "xmlns", @@ -369,11 +370,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -393,11 +394,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -417,11 +418,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -441,11 +442,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -465,11 +466,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -642,11 +643,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -666,11 +667,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -690,11 +691,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -714,11 +715,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -747,11 +748,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config5a.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config5a.json index 8419376c453d..f481413bed72 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config5a.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config5a.json @@ -4,6 +4,7 @@ "character": 6 }, "source": "statement_context/source/onfail_clause_ctx_source5a.bal", + "description": "", "items": [ { "label": "xmlns", @@ -369,11 +370,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -393,11 +394,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -417,11 +418,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -441,11 +442,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -465,11 +466,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -642,11 +643,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -666,11 +667,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -690,11 +691,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -714,11 +715,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -747,11 +748,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config6.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config6.json index 97f979c5bbdd..ab17a3f2d6cc 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config6.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config6.json @@ -4,6 +4,7 @@ "character": 6 }, "source": "statement_context/source/onfail_clause_ctx_source6.bal", + "description": "", "items": [ { "label": "xmlns", @@ -369,11 +370,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -393,11 +394,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -417,11 +418,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -441,11 +442,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -465,11 +466,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -532,7 +533,7 @@ "documentation": { "right": { "kind": "markdown", - "value": "**Package:** _._ \n \n \n**Params** \n- `$CompilationError$` varToMatch" + "value": "**Package:** _._ \n \n \n**Params** \n- `` varToMatch" } }, "sortText": "C", @@ -646,11 +647,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -670,11 +671,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -694,11 +695,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -718,11 +719,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -751,11 +752,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config6a.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config6a.json index 418af73ddee4..4672219172c4 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config6a.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/onfail_clause_ctx_config6a.json @@ -4,6 +4,7 @@ "character": 7 }, "source": "statement_context/source/onfail_clause_ctx_source6a.bal", + "description": "", "items": [ { "label": "xmlns", @@ -369,11 +370,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -393,11 +394,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -417,11 +418,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -441,11 +442,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -465,11 +466,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -532,7 +533,7 @@ "documentation": { "right": { "kind": "markdown", - "value": "**Package:** _._ \n \n \n**Params** \n- `$CompilationError$` varToMatch" + "value": "**Package:** _._ \n \n \n**Params** \n- `` varToMatch" } }, "sortText": "C", @@ -646,11 +647,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -670,11 +671,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -694,11 +695,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -718,11 +719,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -751,11 +752,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config1.json index b19f24b189bf..758b96546353 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config1.json @@ -4,6 +4,7 @@ "character": 4 }, "source": "statement_context/source/return_stmt_ctx_source1.bal", + "description": "", "items": [ { "label": "xmlns", @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -408,11 +409,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -432,11 +433,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -625,11 +626,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -649,11 +650,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -673,11 +674,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -697,11 +698,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -730,11 +731,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config12.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config12.json index 66ae48d1301b..960d6c376d6b 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config12.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config12.json @@ -4,6 +4,7 @@ "character": 9 }, "source": "statement_context/source/return_stmt_ctx_source12.bal", + "description": "", "items": [ { "label": "xmlns", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -447,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -617,11 +618,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -641,11 +642,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -665,11 +666,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -689,11 +690,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -755,11 +756,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config13.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config13.json index 923fa42d0681..f52b771d7bd0 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config13.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config13.json @@ -4,6 +4,7 @@ "character": 9 }, "source": "statement_context/source/return_stmt_ctx_source13.bal", + "description": "", "items": [ { "label": "xmlns", @@ -351,11 +352,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -375,11 +376,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -399,11 +400,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -423,11 +424,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -447,11 +448,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -617,11 +618,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -641,11 +642,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -665,11 +666,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -689,11 +690,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -755,11 +756,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config2.json index c2bf3d6f11fa..730d3c1a9ffb 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config2.json @@ -4,6 +4,7 @@ "character": 5 }, "source": "statement_context/source/return_stmt_ctx_source2.bal", + "description": "", "items": [ { "label": "xmlns", @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -408,11 +409,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -432,11 +433,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -625,11 +626,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -649,11 +650,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -673,11 +674,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -697,11 +698,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -763,11 +764,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config3.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config3.json index f46d0d7c6282..5b412ddcf34c 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config3.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config3.json @@ -4,6 +4,7 @@ "character": 8 }, "source": "statement_context/source/return_stmt_ctx_source3.bal", + "description": "", "items": [ { "label": "xmlns", @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -408,11 +409,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -432,11 +433,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -624,11 +625,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -648,11 +649,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -672,11 +673,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -696,11 +697,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -729,11 +730,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config4.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config4.json index 505ec5bbf89b..732a546a44de 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config4.json @@ -4,6 +4,7 @@ "character": 8 }, "source": "statement_context/source/return_stmt_ctx_source4.bal", + "description": "", "items": [ { "label": "xmlns", @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -408,11 +409,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -432,11 +433,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -616,11 +617,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -640,11 +641,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -664,11 +665,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -688,11 +689,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -721,11 +722,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config5.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config5.json index a6af548c1819..299598275ed4 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/return_stmt_ctx_config5.json @@ -4,6 +4,7 @@ "character": 9 }, "source": "statement_context/source/return_stmt_ctx_source5.bal", + "description": "", "items": [ { "label": "xmlns", @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -408,11 +409,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -432,11 +433,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -456,11 +457,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -616,11 +617,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -640,11 +641,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -664,11 +665,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -688,11 +689,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -754,11 +755,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/transaction_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/transaction_config1.json index 97200ddace8b..7cdef1b0de41 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/transaction_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/transaction_config1.json @@ -4,6 +4,7 @@ "character": 12 }, "source": "statement_context/source/transaction_source1.bal", + "description": "", "items": [ { "label": "xmlns", @@ -378,11 +379,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -402,11 +403,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -426,11 +427,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -450,11 +451,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -474,11 +475,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -657,11 +658,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -681,11 +682,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -705,11 +706,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -729,11 +730,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -762,11 +763,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/transaction_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/transaction_config2.json index 21f185eb4318..08ec88103ddb 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/transaction_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/transaction_config2.json @@ -4,6 +4,7 @@ "character": 23 }, "source": "statement_context/source/transaction_source2.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -468,11 +469,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -492,11 +493,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -516,11 +517,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -540,11 +541,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -564,11 +565,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/transaction_config3.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/transaction_config3.json index 80f3f9bdf3f9..be40b2e65f22 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/transaction_config3.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/transaction_config3.json @@ -4,6 +4,7 @@ "character": 18 }, "source": "statement_context/source/transaction_source3.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -468,11 +469,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -492,11 +493,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -516,11 +517,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -540,11 +541,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -564,11 +565,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/wait_action_ctx_config11.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/wait_action_ctx_config11.json index 5b3076fec98b..53615c1721d2 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/wait_action_ctx_config11.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/wait_action_ctx_config11.json @@ -4,6 +4,7 @@ "character": 9 }, "source": "statement_context/source/wait_action_ctx_source11.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -417,11 +418,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -441,11 +442,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -465,11 +466,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -489,11 +490,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -513,11 +514,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/wait_action_ctx_config12.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/wait_action_ctx_config12.json index 8dbd38b4d9cf..bb199ee630e2 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/wait_action_ctx_config12.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/wait_action_ctx_config12.json @@ -4,6 +4,7 @@ "character": 12 }, "source": "statement_context/source/wait_action_ctx_source12.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -417,11 +418,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -441,11 +442,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -465,11 +466,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -489,11 +490,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -513,11 +514,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/xmlns_ctx_config3.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/xmlns_ctx_config3.json index 8383a8d0a702..76b5b9710caa 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/xmlns_ctx_config3.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/xmlns_ctx_config3.json @@ -4,6 +4,7 @@ "character": 10 }, "source": "statement_context/source/xmlns_ctx_source3.bal", + "description": "", "items": [ { "label": "CONST1", @@ -40,11 +41,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -64,11 +65,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -88,11 +89,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -112,11 +113,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -136,11 +137,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -200,11 +201,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -224,11 +225,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -248,11 +249,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -272,11 +273,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -296,11 +297,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/xmlns_ctx_config4.json b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/xmlns_ctx_config4.json index f2e94ed23594..9906ab862843 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/xmlns_ctx_config4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/statement_context/config/xmlns_ctx_config4.json @@ -4,6 +4,7 @@ "character": 11 }, "source": "statement_context/source/xmlns_ctx_source4.bal", + "description": "", "items": [ { "label": "CONST1", @@ -40,11 +41,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -64,11 +65,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -88,11 +89,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -112,11 +113,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -136,11 +137,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -200,11 +201,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -224,11 +225,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -248,11 +249,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -272,11 +273,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -296,11 +297,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/template_expression/config/string_template_expression_config4.json b/language-server/modules/langserver-core/src/test/resources/completion/template_expression/config/string_template_expression_config4.json index c04ab450f30b..1e6e9851b5d5 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/template_expression/config/string_template_expression_config4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/template_expression/config/string_template_expression_config4.json @@ -4,6 +4,7 @@ "character": 34 }, "source": "template_expression/source/string_template_expression_source4.bal", + "description": "", "items": [ { "label": "error constructor", @@ -115,11 +116,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -139,11 +140,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -163,11 +164,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -187,11 +188,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -211,11 +212,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -486,11 +487,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -510,11 +511,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -534,11 +535,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -558,11 +559,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -582,11 +583,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/template_expression/config/string_template_expression_config5.json b/language-server/modules/langserver-core/src/test/resources/completion/template_expression/config/string_template_expression_config5.json index 6a32596ca36e..8366deac47c2 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/template_expression/config/string_template_expression_config5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/template_expression/config/string_template_expression_config5.json @@ -4,6 +4,7 @@ "character": 35 }, "source": "template_expression/source/string_template_expression_source5.bal", + "description": "", "items": [ { "label": "error constructor", @@ -115,11 +116,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -139,11 +140,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -163,11 +164,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -187,11 +188,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -211,11 +212,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -486,11 +487,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -510,11 +511,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -534,11 +535,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -558,11 +559,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -582,11 +583,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/template_expression/config/xml_template_expression_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/template_expression/config/xml_template_expression_config1.json index f92db43b1afb..39d1177f72af 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/template_expression/config/xml_template_expression_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/template_expression/config/xml_template_expression_config1.json @@ -4,6 +4,7 @@ "character": 41 }, "source": "template_expression/source/xml_template_expression_source1.bal", + "description": "", "items": [ { "label": "error constructor", @@ -115,11 +116,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -139,11 +140,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -163,11 +164,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -187,11 +188,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -211,11 +212,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -516,11 +517,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -540,11 +541,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -564,11 +565,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -588,11 +589,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -612,11 +613,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/template_expression/config/xml_template_expression_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/template_expression/config/xml_template_expression_config2.json index 36ff2c72e68c..4033e08b2822 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/template_expression/config/xml_template_expression_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/template_expression/config/xml_template_expression_config2.json @@ -4,6 +4,7 @@ "character": 42 }, "source": "template_expression/source/xml_template_expression_source2.bal", + "description": "", "items": [ { "label": "error constructor", @@ -115,11 +116,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -139,11 +140,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -163,11 +164,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -187,11 +188,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -211,11 +212,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -516,11 +517,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -540,11 +541,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -564,11 +565,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -588,11 +589,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -612,11 +613,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/type_def/config/config1.json b/language-server/modules/langserver-core/src/test/resources/completion/type_def/config/config1.json index ea19b5098299..6a35b985a974 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/type_def/config/config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/type_def/config/config1.json @@ -4,6 +4,7 @@ "character": 22 }, "source": "type_def/source/source1.bal", + "description": "", "items": [ { "label": "TestEnum", @@ -149,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -173,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -197,11 +198,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -221,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -245,11 +246,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -336,11 +337,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -408,11 +409,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -441,11 +442,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/type_def/config/config2.json b/language-server/modules/langserver-core/src/test/resources/completion/type_def/config/config2.json index 7d5ebf43a65f..10be4bbc5dad 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/type_def/config/config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/type_def/config/config2.json @@ -4,6 +4,7 @@ "character": 23 }, "source": "type_def/source/source2.bal", + "description": "", "items": [ { "label": "TestEnum", @@ -141,11 +142,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -165,11 +166,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -189,11 +190,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -213,11 +214,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -237,11 +238,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -328,11 +329,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -352,11 +353,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -376,11 +377,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -400,11 +401,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -466,11 +467,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/array_typedesc5.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/array_typedesc5.json index d6b976e0640f..31c40bc02c22 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/array_typedesc5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/array_typedesc5.json @@ -4,6 +4,7 @@ "character": 9 }, "source": "typedesc_context/source/array_typedesc5.bal", + "description": "", "items": [ { "label": "xmlns", @@ -376,11 +377,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -400,11 +401,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -424,11 +425,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -448,11 +449,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -472,11 +473,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -655,11 +656,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -679,11 +680,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -703,11 +704,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -727,11 +728,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -776,11 +777,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/distinct_typedesc1.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/distinct_typedesc1.json index 38498ec68958..505d27161f27 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/distinct_typedesc1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/distinct_typedesc1.json @@ -4,6 +4,7 @@ "character": 27 }, "source": "typedesc_context/source/distinct_typedesc1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -243,11 +244,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -267,11 +268,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -291,11 +292,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -315,11 +316,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -339,11 +340,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/distinct_typedesc2.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/distinct_typedesc2.json index c6013febd0dd..ad9763047c63 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/distinct_typedesc2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/distinct_typedesc2.json @@ -4,6 +4,7 @@ "character": 28 }, "source": "typedesc_context/source/distinct_typedesc2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -243,11 +244,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -267,11 +268,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -291,11 +292,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -315,11 +316,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -339,11 +340,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/error_typedesc1.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/error_typedesc1.json index 238866c181a1..5cb70bfc980f 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/error_typedesc1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/error_typedesc1.json @@ -4,6 +4,7 @@ "character": 10 }, "source": "typedesc_context/source/error_typedesc1.bal", + "description": "", "items": [ { "label": "record {}", @@ -87,11 +88,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -111,11 +112,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -135,11 +136,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -159,11 +160,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -183,11 +184,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -247,11 +248,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -271,11 +272,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -295,11 +296,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -319,11 +320,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -343,11 +344,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/error_typedesc2.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/error_typedesc2.json index 777e34cb93b4..d5cc37741e22 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/error_typedesc2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/error_typedesc2.json @@ -4,6 +4,7 @@ "character": 11 }, "source": "typedesc_context/source/error_typedesc2.bal", + "description": "", "items": [ { "label": "record {}", @@ -87,11 +88,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -111,11 +112,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -135,11 +136,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -159,11 +160,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -183,11 +184,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -247,11 +248,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -271,11 +272,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -295,11 +296,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -319,11 +320,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -343,11 +344,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/error_typedesc5.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/error_typedesc5.json index c4c8a83e0a5d..bdf7075e632f 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/error_typedesc5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/error_typedesc5.json @@ -4,6 +4,7 @@ "character": 12 }, "source": "typedesc_context/source/error_typedesc5.bal", + "description": "", "items": [ { "label": "record {}", @@ -87,11 +88,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -111,11 +112,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -135,11 +136,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -159,11 +160,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -183,11 +184,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -247,11 +248,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -271,11 +272,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -295,11 +296,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -319,11 +320,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -343,11 +344,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc1.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc1.json index 91e346f45891..764974257757 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc1.json @@ -4,6 +4,7 @@ "character": 31 }, "source": "typedesc_context/source/function_typedesc1.bal", + "description": "", "items": [ { "label": "TestRecord1", @@ -165,11 +166,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -189,11 +190,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -213,11 +214,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -237,11 +238,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -261,11 +262,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -325,11 +326,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -349,11 +350,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -373,11 +374,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -397,11 +398,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -430,11 +431,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc12.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc12.json index e28ba03075b4..8c8e6de6b8d1 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc12.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc12.json @@ -4,6 +4,7 @@ "character": 13 }, "source": "typedesc_context/source/function_typedesc12.bal", + "description": "", "items": [ { "label": "TestMap2", @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -229,11 +230,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -253,11 +254,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -317,11 +318,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -341,11 +342,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -365,11 +366,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -389,11 +390,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -422,11 +423,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc15.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc15.json index 5bd1b6b65b2c..60c1c6312a4e 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc15.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc15.json @@ -4,6 +4,7 @@ "character": 35 }, "source": "typedesc_context/source/function_typedesc15.bal", + "description": "", "items": [ { "label": "TestMap2", @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -229,11 +230,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -253,11 +254,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -344,11 +345,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -368,11 +369,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -392,11 +393,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -416,11 +417,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -449,11 +450,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc15a.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc15a.json index 4193e12331c4..cc35b2c0c2a2 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc15a.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc15a.json @@ -63,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -87,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -111,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -135,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -159,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -498,11 +498,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -522,11 +522,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -546,11 +546,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -570,11 +570,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -594,11 +594,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc15b.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc15b.json index a7ef0369d066..a25869cb7c01 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc15b.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc15b.json @@ -63,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -87,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -111,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -135,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -159,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -498,11 +498,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -522,11 +522,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -546,11 +546,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -570,11 +570,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -594,11 +594,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc3.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc3.json index 4c5056df5184..c1fcea4d8e1f 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc3.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc3.json @@ -4,6 +4,7 @@ "character": 32 }, "source": "typedesc_context/source/function_typedesc3.bal", + "description": "", "items": [ { "label": "TestRecord1", @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -229,11 +230,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -253,11 +254,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -317,11 +318,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -341,11 +342,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -365,11 +366,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -389,11 +390,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -430,11 +431,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc4.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc4.json index d59158d9a556..e195ac008d95 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc4.json @@ -4,6 +4,7 @@ "character": 36 }, "source": "typedesc_context/source/function_typedesc4.bal", + "description": "", "items": [ { "label": "TestRecord1", @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -229,11 +230,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -253,11 +254,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -317,11 +318,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -341,11 +342,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -365,11 +366,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -389,11 +390,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -430,11 +431,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc5.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc5.json index c77b706d89a3..d6d1be552f60 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc5.json @@ -4,6 +4,7 @@ "character": 37 }, "source": "typedesc_context/source/function_typedesc5.bal", + "description": "", "items": [ { "label": "TestRecord1", @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -229,11 +230,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -253,11 +254,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -317,11 +318,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -341,11 +342,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -365,11 +366,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -389,11 +390,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -430,11 +431,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc8.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc8.json index acc7389ac74f..92edf5db15be 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc8.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc8.json @@ -4,6 +4,7 @@ "character": 52 }, "source": "typedesc_context/source/function_typedesc8.bal", + "description": "", "items": [ { "label": "TestRecord1", @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -229,11 +230,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -253,11 +254,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -344,11 +345,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -368,11 +369,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -392,11 +393,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -416,11 +417,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -457,11 +458,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc9.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc9.json index f9145e42b856..d8189862f04d 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc9.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/function_typedesc9.json @@ -4,6 +4,7 @@ "character": 53 }, "source": "typedesc_context/source/function_typedesc9.bal", + "description": "", "items": [ { "label": "TestRecord1", @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -229,11 +230,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -253,11 +254,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -344,11 +345,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -368,11 +369,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -392,11 +393,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -416,11 +417,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -457,11 +458,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/future_typedesc1.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/future_typedesc1.json index 299c9d5ca095..fd6ab462f9d5 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/future_typedesc1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/future_typedesc1.json @@ -4,6 +4,7 @@ "character": 11 }, "source": "typedesc_context/source/future_typedesc1.bal", + "description": "", "items": [ { "label": "TestMap3", @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -229,11 +230,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -253,11 +254,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -317,11 +318,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -341,11 +342,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -365,11 +366,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -389,11 +390,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -422,11 +423,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/intersection_type_typedesc1.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/intersection_type_typedesc1.json index 201538c2d18c..fb7bdb4be6db 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/intersection_type_typedesc1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/intersection_type_typedesc1.json @@ -4,6 +4,7 @@ "character": 33 }, "source": "typedesc_context/source/intersection_type_typedesc1.bal", + "description": "", "items": [ { "label": "TestRecord1", @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -229,11 +230,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -253,11 +254,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -317,11 +318,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -341,11 +342,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -365,11 +366,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -389,11 +390,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -422,11 +423,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/intersection_type_typedesc2.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/intersection_type_typedesc2.json index 3f18767913b4..7a01424e1ca6 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/intersection_type_typedesc2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/intersection_type_typedesc2.json @@ -4,6 +4,7 @@ "character": 34 }, "source": "typedesc_context/source/intersection_type_typedesc2.bal", + "description": "", "items": [ { "label": "TestRecord1", @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -229,11 +230,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -253,11 +254,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -317,11 +318,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -341,11 +342,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -365,11 +366,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -389,11 +390,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -422,11 +423,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/map_typedesc1.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/map_typedesc1.json index a8d5faee3762..38bdf8210a9f 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/map_typedesc1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/map_typedesc1.json @@ -4,6 +4,7 @@ "character": 8 }, "source": "typedesc_context/source/map_typedesc1.bal", + "description": "", "items": [ { "label": "TEST_CONST", @@ -125,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -149,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -173,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -197,11 +198,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -221,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -285,11 +286,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -309,11 +310,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -333,11 +334,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -357,11 +358,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -390,11 +391,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/map_typedesc2.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/map_typedesc2.json index d9b50fc08d2e..f2ea2d06c073 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/map_typedesc2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/map_typedesc2.json @@ -4,6 +4,7 @@ "character": 9 }, "source": "typedesc_context/source/map_typedesc2.bal", + "description": "", "items": [ { "label": "TEST_CONST", @@ -125,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -149,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -173,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -197,11 +198,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -221,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -285,11 +286,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -309,11 +310,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -333,11 +334,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -357,11 +358,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -390,11 +391,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc11.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc11.json index 18da1058c7a5..1b555dfaba5e 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc11.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc11.json @@ -4,6 +4,7 @@ "character": 39 }, "source": "typedesc_context/source/object_typedesc11.bal", + "description": "", "items": [ { "label": "ObjectName", @@ -125,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -149,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -173,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -197,11 +198,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -221,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -312,11 +313,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -336,11 +337,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -360,11 +361,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -384,11 +385,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -417,11 +418,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc3.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc3.json index bf5f1bde57af..7e14c4a4c674 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc3.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc3.json @@ -4,6 +4,7 @@ "character": 4 }, "source": "typedesc_context/source/object_typedesc3.bal", + "description": "", "items": [ { "label": "public", @@ -179,11 +180,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -203,11 +204,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -227,11 +228,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -251,11 +252,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -275,11 +276,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -339,11 +340,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -363,11 +364,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -387,11 +388,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -411,11 +412,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -444,11 +445,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc4.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc4.json index a3dc911de26f..faca70036299 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc4.json @@ -4,6 +4,7 @@ "character": 5 }, "source": "typedesc_context/source/object_typedesc4.bal", + "description": "", "items": [ { "label": "public", @@ -179,11 +180,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -203,11 +204,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -227,11 +228,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -251,11 +252,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -275,11 +276,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -339,11 +340,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -363,11 +364,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -387,11 +388,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -411,11 +412,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -444,11 +445,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc5.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc5.json index 37f8007bc8bc..e13c1fab5e18 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc5.json @@ -4,6 +4,7 @@ "character": 11 }, "source": "typedesc_context/source/object_typedesc5.bal", + "description": "", "items": [ { "label": "public", @@ -179,11 +180,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -203,11 +204,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -227,11 +228,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -251,11 +252,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -275,11 +276,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -339,11 +340,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -363,11 +364,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -387,11 +388,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -411,11 +412,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -444,11 +445,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc6.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc6.json index 9154d2614184..bdb5babcf6fe 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc6.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc6.json @@ -4,6 +4,7 @@ "character": 17 }, "source": "typedesc_context/source/object_typedesc6.bal", + "description": "", "items": [ { "label": "public", @@ -179,11 +180,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -203,11 +204,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -227,11 +228,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -251,11 +252,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -275,11 +276,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -339,11 +340,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -363,11 +364,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -387,11 +388,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -411,11 +412,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -444,11 +445,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc7.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc7.json index 2041fea73e2c..d5e8ffed51e2 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc7.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc7.json @@ -4,6 +4,7 @@ "character": 25 }, "source": "typedesc_context/source/object_typedesc7.bal", + "description": "", "items": [ { "label": "public", @@ -179,11 +180,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -203,11 +204,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -227,11 +228,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -251,11 +252,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -275,11 +276,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -339,11 +340,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -363,11 +364,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -387,11 +388,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -411,11 +412,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -444,11 +445,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc8.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc8.json index cbe848035d70..bf7cb6ebc9ef 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc8.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/object_typedesc8.json @@ -4,6 +4,7 @@ "character": 10 }, "source": "typedesc_context/source/object_typedesc8.bal", + "description": "", "items": [ { "label": "public", @@ -179,11 +180,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -203,11 +204,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -227,11 +228,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -251,11 +252,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -275,11 +276,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -339,11 +340,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -363,11 +364,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -387,11 +388,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -411,11 +412,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -444,11 +445,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/stream_typedesc1.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/stream_typedesc1.json index 303b085cbdf3..8296014082db 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/stream_typedesc1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/stream_typedesc1.json @@ -4,6 +4,7 @@ "character": 11 }, "source": "typedesc_context/source/stream_typedesc1.bal", + "description": "", "items": [ { "label": "TestMap3", @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -229,11 +230,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -253,11 +254,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -317,11 +318,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -341,11 +342,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -365,11 +366,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -389,11 +390,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -422,11 +423,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/stream_typedesc4.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/stream_typedesc4.json index e460eeca1b1e..4514cd2ef980 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/stream_typedesc4.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/stream_typedesc4.json @@ -4,6 +4,7 @@ "character": 15 }, "source": "typedesc_context/source/stream_typedesc4.bal", + "description": "", "items": [ { "label": "TestMap3", @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -229,11 +230,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -253,11 +254,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -317,11 +318,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -341,11 +342,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -365,11 +366,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -389,11 +390,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -422,11 +423,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/table_typedesc1.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/table_typedesc1.json index 56ed8dfda7cf..791d81d5ed6c 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/table_typedesc1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/table_typedesc1.json @@ -4,6 +4,7 @@ "character": 10 }, "source": "typedesc_context/source/table_typedesc1.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -224,11 +225,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -248,11 +249,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -272,11 +273,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -296,11 +297,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -320,11 +321,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/table_typedesc10.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/table_typedesc10.json index 0ed7c50aadf3..70314e8b16c7 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/table_typedesc10.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/table_typedesc10.json @@ -4,6 +4,7 @@ "character": 21 }, "source": "typedesc_context/source/table_typedesc10.bal", + "description": "", "items": [ { "label": "EmployeeId", @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -229,11 +230,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -253,11 +254,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -277,11 +278,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -341,11 +342,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -365,11 +366,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -389,11 +390,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -413,11 +414,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -446,11 +447,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/table_typedesc2.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/table_typedesc2.json index 80be0fb65cdf..1012bdf980d3 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/table_typedesc2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/table_typedesc2.json @@ -4,6 +4,7 @@ "character": 11 }, "source": "typedesc_context/source/table_typedesc2.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -224,11 +225,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -248,11 +249,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -272,11 +273,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -296,11 +297,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -320,11 +321,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/tuple_typedesc1.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/tuple_typedesc1.json index 20055222dd48..f2a813c0df70 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/tuple_typedesc1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/tuple_typedesc1.json @@ -4,6 +4,7 @@ "character": 6 }, "source": "typedesc_context/source/tuple_typedesc1.bal", + "description": "", "items": [ { "label": "StrandData", @@ -125,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -149,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -173,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -197,11 +198,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -221,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -285,11 +286,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -309,11 +310,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -333,11 +334,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -357,11 +358,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -390,11 +391,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/tuple_typedesc2.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/tuple_typedesc2.json index bd8a11defda8..f05e17cb252a 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/tuple_typedesc2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/tuple_typedesc2.json @@ -4,6 +4,7 @@ "character": 10 }, "source": "typedesc_context/source/tuple_typedesc2.bal", + "description": "", "items": [ { "label": "StrandData", @@ -125,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -149,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -173,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -197,11 +198,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -221,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -285,11 +286,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -309,11 +310,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -333,11 +334,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -357,11 +358,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -390,11 +391,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/tuple_typedesc5.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/tuple_typedesc5.json index 4c8f372b1e51..828b9ff2f77d 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/tuple_typedesc5.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/tuple_typedesc5.json @@ -4,6 +4,7 @@ "character": 17 }, "source": "typedesc_context/source/tuple_typedesc5.bal", + "description": "", "items": [ { "label": "StrandData", @@ -125,11 +126,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -149,11 +150,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -173,11 +174,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -197,11 +198,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -221,11 +222,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -285,11 +286,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -309,11 +310,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -333,11 +334,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -357,11 +358,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -390,11 +391,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/union_typedesc1.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/union_typedesc1.json index 331a381df678..284f6f58e86f 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/union_typedesc1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/union_typedesc1.json @@ -4,6 +4,7 @@ "character": 9 }, "source": "typedesc_context/source/union_typedesc1.bal", + "description": "", "items": [ { "label": "TestMap2", @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -229,11 +230,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -253,11 +254,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -317,11 +318,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -341,11 +342,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -365,11 +366,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -389,11 +390,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -422,11 +423,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/union_typedesc2.json b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/union_typedesc2.json index eda1e6707590..719919f6edab 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/union_typedesc2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/typedesc_context/config/union_typedesc2.json @@ -4,6 +4,7 @@ "character": 11 }, "source": "typedesc_context/source/union_typedesc2.bal", + "description": "", "items": [ { "label": "TestMap2", @@ -157,11 +158,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -181,11 +182,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -205,11 +206,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -229,11 +230,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -253,11 +254,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -317,11 +318,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -341,11 +342,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -365,11 +366,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -389,11 +390,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -490,11 +491,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/project_var_def_ctx_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/project_var_def_ctx_config1.json index 24f0f7c10ba1..e2a0dc4fa7f4 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/project_var_def_ctx_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/project_var_def_ctx_config1.json @@ -4,6 +4,7 @@ "character": 14 }, "source": "variable-declaration/source/lsproject/main.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -182,11 +183,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -547,11 +548,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -571,11 +572,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -595,11 +596,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -619,11 +620,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -643,11 +644,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/project_var_def_ctx_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/project_var_def_ctx_config2.json index 7854b58bad3c..135f6f926d85 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/project_var_def_ctx_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/project_var_def_ctx_config2.json @@ -4,6 +4,7 @@ "character": 27 }, "source": "variable-declaration/source/lsproject/main.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -182,11 +183,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -555,11 +556,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -579,11 +580,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -603,11 +604,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -627,11 +628,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -651,11 +652,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/var_def_ctx_config1.json b/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/var_def_ctx_config1.json index dfcfe90f0533..b09e8e0d5aa1 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/var_def_ctx_config1.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/var_def_ctx_config1.json @@ -4,6 +4,7 @@ "character": 12 }, "source": "variable-declaration/source/var_def_ctx_source1.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -459,11 +460,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -483,11 +484,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -507,11 +508,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -531,11 +532,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -555,11 +556,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/var_def_ctx_config2.json b/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/var_def_ctx_config2.json index 0ee35e062bd5..da34e7196b79 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/var_def_ctx_config2.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/var_def_ctx_config2.json @@ -4,6 +4,7 @@ "character": 13 }, "source": "variable-declaration/source/var_def_ctx_source2.bal", + "description": "", "items": [ { "label": "start", @@ -62,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -86,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -110,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -134,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -158,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -459,11 +460,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -483,11 +484,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -507,11 +508,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -531,11 +532,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -555,11 +556,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/var_def_ctx_config7.json b/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/var_def_ctx_config7.json index 46bbe0b285b1..87fec939cedf 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/var_def_ctx_config7.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/var_def_ctx_config7.json @@ -63,11 +63,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -87,11 +87,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -111,11 +111,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -135,11 +135,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -159,11 +159,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -460,11 +460,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -484,11 +484,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -508,11 +508,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -532,11 +532,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -556,11 +556,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/var_def_ctx_config8.json b/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/var_def_ctx_config8.json index b4a2dbaa3d3a..f5c65903322d 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/var_def_ctx_config8.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/var_def_ctx_config8.json @@ -4,6 +4,7 @@ "character": 38 }, "source": "variable-declaration/source/var_def_ctx_source8.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -186,11 +187,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -210,11 +211,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -234,11 +235,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -258,11 +259,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -282,11 +283,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/var_def_ctx_config9.json b/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/var_def_ctx_config9.json index 1ead73bbbaa6..778a949814cc 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/var_def_ctx_config9.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/variable-declaration/config/var_def_ctx_config9.json @@ -4,6 +4,7 @@ "character": 39 }, "source": "variable-declaration/source/var_def_ctx_source9.bal", + "description": "", "items": [ { "label": "module1", @@ -26,11 +27,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -50,11 +51,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -74,11 +75,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -98,11 +99,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -122,11 +123,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -186,11 +187,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -210,11 +211,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -234,11 +235,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -258,11 +259,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -282,11 +283,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, From 3c5da0abd5e7b28943ed6e753698eb3c823db6b4 Mon Sep 17 00:00:00 2001 From: Tharushi Jayasekara Date: Tue, 18 Jul 2023 10:15:54 +0530 Subject: [PATCH 37/67] Fix failing compiler plugin completion tests --- ...plugin_completion_single_file_config1.json | 28 +++++++++---------- ...piler_plugin_with_completions_config1.json | 28 +++++++++---------- ...piler_plugin_with_completions_config2.json | 28 +++++++++---------- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/tests/language-server-integration-tests/src/test/resources/completion/compiler-plugins/config/compiler_plugin_completion_single_file_config1.json b/tests/language-server-integration-tests/src/test/resources/completion/compiler-plugins/config/compiler_plugin_completion_single_file_config1.json index ef541c71935d..8641deea9ad1 100644 --- a/tests/language-server-integration-tests/src/test/resources/completion/compiler-plugins/config/compiler_plugin_completion_single_file_config1.json +++ b/tests/language-server-integration-tests/src/test/resources/completion/compiler-plugins/config/compiler_plugin_completion_single_file_config1.json @@ -215,11 +215,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -239,11 +239,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -263,11 +263,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -287,11 +287,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -311,11 +311,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -335,11 +335,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -359,11 +359,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/tests/language-server-integration-tests/src/test/resources/completion/compiler-plugins/config/compiler_plugin_with_completions_config1.json b/tests/language-server-integration-tests/src/test/resources/completion/compiler-plugins/config/compiler_plugin_with_completions_config1.json index fedbf45dc0fb..3bd7585eba4f 100644 --- a/tests/language-server-integration-tests/src/test/resources/completion/compiler-plugins/config/compiler_plugin_with_completions_config1.json +++ b/tests/language-server-integration-tests/src/test/resources/completion/compiler-plugins/config/compiler_plugin_with_completions_config1.json @@ -215,11 +215,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -239,11 +239,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -263,11 +263,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -287,11 +287,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -311,11 +311,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -335,11 +335,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -359,11 +359,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/tests/language-server-integration-tests/src/test/resources/completion/compiler-plugins/config/compiler_plugin_with_completions_config2.json b/tests/language-server-integration-tests/src/test/resources/completion/compiler-plugins/config/compiler_plugin_with_completions_config2.json index a6e7ac535e4a..175ce69bae1c 100644 --- a/tests/language-server-integration-tests/src/test/resources/completion/compiler-plugins/config/compiler_plugin_with_completions_config2.json +++ b/tests/language-server-integration-tests/src/test/resources/completion/compiler-plugins/config/compiler_plugin_with_completions_config2.json @@ -192,11 +192,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -216,11 +216,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -240,11 +240,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -264,11 +264,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -288,11 +288,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -312,11 +312,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -336,11 +336,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, From e5967e79cdac90e79709ece9de29e3a77e678966 Mon Sep 17 00:00:00 2001 From: MaryamZi Date: Mon, 24 Jul 2023 12:22:25 +0530 Subject: [PATCH 38/67] Fix formatting --- .../test/record/RecordAssignabilityTest.java | 2 +- .../ballerinalang/test/types/never/NeverTypeTest.java | 2 +- .../resources/test-src/record/record_assignability.bal | 10 +++++----- .../test-src/record/record_assignability_negative.bal | 8 ++++---- .../test-src/types/never/never-type-negative.bal | 8 ++++---- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/record/RecordAssignabilityTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/record/RecordAssignabilityTest.java index 4a49dff81991..f985d7c68353 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/record/RecordAssignabilityTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/record/RecordAssignabilityTest.java @@ -92,7 +92,7 @@ public void testRecordAssignabilityNegative() { validateError(negativeResult, i++, "incompatible types: expected 'R1', found 'record {| int...; |}'", 66, 12); validateError(negativeResult, i++, "incompatible types: expected 'R3', found 'record {| int...; |}'", 67, 12); validateError(negativeResult, i++, "incompatible types: expected 'record {| int a?; int b; anydata...; |}', " + - "found 'record {| readonly int? b; int...; |}'", 70, 35); + "found 'record {| readonly int? b; int...; |}'", 70, 33); assertEquals(negativeResult.getErrorCount(), i); } } diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/types/never/NeverTypeTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/types/never/NeverTypeTest.java index 82d4baf52344..5d91818eafc1 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/types/never/NeverTypeTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/types/never/NeverTypeTest.java @@ -208,7 +208,7 @@ public void testNeverTypeNegative() { BAssertUtil.validateError(negativeCompileResult, i++, "incompatible types: expected " + "'record {| |} & readonly', found 'record {| int x; never?...; |}'", 258, 25); BAssertUtil.validateError(negativeCompileResult, i++, "incompatible types: expected " + - "'record {| int x; never...; |}', found 'record {| |} & readonly'", 261, 41); + "'record {| int x; never...; |}', found 'record {| |} & readonly'", 261, 40); BAssertUtil.validateError(negativeCompileResult, i++, "incompatible types: expected 'record {| never i?; " + "anydata...; |}', found 'record {| never?...; |}'", 264, 28); BAssertUtil.validateError(negativeCompileResult, i++, "cannot define a variable of type 'never' or " + diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/record/record_assignability.bal b/tests/jballerina-unit-test/src/test/resources/test-src/record/record_assignability.bal index 0fa71ec2bc4d..7fb91f78a063 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/record/record_assignability.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/record/record_assignability.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org) All Rights Reserved. +// Copyright (c) 2023 WSO2 LLC. (http://www.wso2.com). // // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -85,17 +85,17 @@ type R11 record {| function testRecordToRecordWithOptionalFieldTypingRuntimePositive() { R9 a = {}; R8 _ = a; // OK - assertTrue( a is R8); + assertTrue(a is R8); record {| int x?; |} b = {}; - assertTrue( b is R8); + assertTrue(b is R8); record {| int x?; never...; |} c = {}; - assertTrue( c is R8); + assertTrue(c is R8); R9[] d = []; R8[] _ = d; // OK - assertTrue( d is R8[]); + assertTrue(d is R8[]); record {| readonly int? b; int...; |} e = {b: 1}; assertTrue(e is record { int a?; int b; }); diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/record/record_assignability_negative.bal b/tests/jballerina-unit-test/src/test/resources/test-src/record/record_assignability_negative.bal index 0345d0cab08f..a060855effec 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/record/record_assignability_negative.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/record/record_assignability_negative.bal @@ -59,13 +59,13 @@ function testOpenRecordToRecordWithIncompatibleOptionalFieldTyping() { R2 r1 = {x: 1, "y": 10}; R1 _ = r1; - record {| int|string...; |} r2 = {}; + record {|int|string...;|} r2 = {}; R1 _ = r2; - record {| int...; |} r3 = {}; + record {|int...;|} r3 = {}; R1 _ = r3; R3 _ = r3; - record {| readonly int? b; int...; |} r4 = {b: 1}; - record { int a?; int b; } _ = r4; + record {|readonly int? b; int...;|} r4 = {b: 1}; + record {int a?; int b;} _ = r4; } diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/types/never/never-type-negative.bal b/tests/jballerina-unit-test/src/test/resources/test-src/types/never/never-type-negative.bal index 9d548c01e552..20e0b233b8c9 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/types/never/never-type-negative.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/types/never/never-type-negative.bal @@ -248,19 +248,19 @@ function testNeverFieldTypeBinding() { } function testNeverRestFieldType() { - record {|never...; |} a = {}; + record {|never...;|} a = {}; record {|int x;|} copy = a; record {|int x?;|} a1 = {}; record {|never...; |} copy2 = a1; - record {|int x;never?...; |} a2 = {x: 12}; + record {|int x;never?...;|} a2 = {x: 12}; record {||} copy3 = a2; record {||} a3 = {}; - record {|int x;never...; |} copy4 = a3; + record {|int x;never...;|} copy4 = a3; - record {|never?...; |} a4 = {}; + record {|never?...;|} a4 = {}; record {never i?;} _ = a4; } From 4eda95cea8541115d3b1929b51a05723f135768f Mon Sep 17 00:00:00 2001 From: Dulaj Date: Wed, 26 Jul 2023 12:16:30 +0530 Subject: [PATCH 39/67] Use referred type and refactor Extract symbol's null check within the report-deprecated method --- .../semantics/analyzer/CodeAnalyzer.java | 73 ++++++------------- 1 file changed, 22 insertions(+), 51 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java index a8b385ee81c0..d9c8d2c66f39 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java @@ -2233,33 +2233,24 @@ public void visit(BLangTableConstructorExpr tableConstructorExpr, AnalyzerData d @Override public void visit(BLangRecordLiteral recordLiteral, AnalyzerData data) { + BType referredType = Types.getReferredType(recordLiteral.getBType()); List fields = recordLiteral.fields; - BType recLiteralType = recordLiteral.getBType(); for (RecordLiteralNode.RecordField field : fields) { if (field.isKeyValueField()) { analyzeExpr(((BLangRecordKeyValueField) field).valueExpr, data); - - BVarSymbol fieldSymbol = ((BLangRecordKeyValueField) field).key.fieldSymbol; - if (fieldSymbol != null) { - reportIfDeprecatedUsage(fieldSymbol, fieldSymbol.toString(), - recordLiteral, ((BLangRecordKeyValueField) field).pos); - } + reportIfDeprecatedUsage(((BLangRecordKeyValueField) field).key.fieldSymbol, recordLiteral, + ((BLangRecordKeyValueField) field).pos); } else if (field.getKind() == NodeKind.SIMPLE_VARIABLE_REF) { BLangRecordLiteral.BLangRecordVarNameField recField = (BLangRecordLiteral.BLangRecordVarNameField) field; analyzeExpr(recField, data); - if (recLiteralType.tsymbol != null && recLiteralType.tsymbol.type != null - && recLiteralType.tsymbol.type.getKind() == TypeKind.RECORD) { - - BRecordType recordType = (BRecordType) recLiteralType.tsymbol.type; - BField matchingField = recordType.getFields().get(recField.symbol.getName().getValue()); - - if (matchingField != null && matchingField.symbol != null) { - reportIfDeprecatedUsage(matchingField.symbol, matchingField.name.getValue(), - recordLiteral, ((BLangRecordLiteral.BLangRecordVarNameField) field).pos); - } + if (referredType.getKind() == TypeKind.RECORD) { + BField matchingField = ((BRecordType) referredType).getFields().get(recField.symbol + .getName().getValue()); + reportIfDeprecatedUsage(matchingField.symbol, recordLiteral, + ((BLangRecordLiteral.BLangRecordVarNameField) field).pos); } } else { BLangRecordLiteral.BLangRecordSpreadOperatorField spreadField @@ -2267,18 +2258,12 @@ public void visit(BLangRecordLiteral recordLiteral, AnalyzerData data) { analyzeExpr(spreadField.expr, data); BType spreadFieldType = Types.getReferredType(spreadField.expr.getBType()); - BType contextType = Types.getReferredType(recLiteralType); - if (spreadFieldType != null && spreadFieldType.getKind() == TypeKind.RECORD - && contextType.getKind() == TypeKind.RECORD) { + && referredType.getKind() == TypeKind.RECORD) { for (BField fieldEntry: ((BRecordType) spreadFieldType).getFields().values()) { - BRecordType recordType = (BRecordType) contextType; + BRecordType recordType = (BRecordType) referredType; BField matchingField = recordType.getFields().get(fieldEntry.getName().getValue()); - - if (matchingField != null && matchingField.symbol != null) { - reportIfDeprecatedUsage(matchingField.symbol, matchingField.name.getValue(), - recordLiteral, spreadField.expr.pos); - } + reportIfDeprecatedUsage(matchingField.symbol, recordLiteral, spreadField.expr.pos); } } } @@ -2286,9 +2271,8 @@ public void visit(BLangRecordLiteral recordLiteral, AnalyzerData data) { Set names = new HashSet<>(); Set neverTypedKeys = new HashSet<>(); - BType type = Types.getReferredType(recLiteralType); - boolean isRecord = type.tag == TypeTags.RECORD; - boolean isOpenRecord = isRecord && !((BRecordType) type).sealed; + boolean isRecord = referredType.tag == TypeTags.RECORD; + boolean isOpenRecord = isRecord && !((BRecordType) referredType).sealed; // A record type is inferred for a record literal even if the contextually expected type is a map, if the // mapping constructor expression has `readonly` fields. @@ -2359,7 +2343,7 @@ public void visit(BLangRecordLiteral recordLiteral, AnalyzerData data) { if (bField.type.tag != TypeTags.NEVER) { this.dlog.error(spreadOpExpr.pos, DiagnosticErrorCode.DUPLICATE_KEY_IN_RECORD_LITERAL_SPREAD_OP, - type.getKind().typeName(), fieldName, spreadOpField); + referredType.getKind().typeName(), fieldName, spreadOpField); } continue; } @@ -2404,7 +2388,8 @@ public void visit(BLangRecordLiteral recordLiteral, AnalyzerData data) { unescapedName, inclusiveTypeSpreadField); } - if (!isInferredRecordForMapCET && isOpenRecord && !((BRecordType) type).fields.containsKey(name)) { + if (!isInferredRecordForMapCET && isOpenRecord + && !((BRecordType) referredType).fields.containsKey(name)) { dlog.error(keyExpr.pos, DiagnosticErrorCode.INVALID_RECORD_LITERAL_IDENTIFIER_KEY, unescapedName); } @@ -2427,7 +2412,7 @@ public void visit(BLangRecordLiteral recordLiteral, AnalyzerData data) { } if (isInferredRecordForMapCET) { - recordLiteral.expectedType = type; + recordLiteral.expectedType = referredType; } } @@ -2503,10 +2488,7 @@ public void visit(BLangFieldBasedAccess.BLangNSPrefixedFieldBasedAccess nsPrefix private void analyzeFieldBasedAccessExpr(BLangFieldBasedAccess fieldAccessExpr, AnalyzerData data) { BLangExpression expr = fieldAccessExpr.expr; analyzeExpr(expr, data); - BSymbol symbol = fieldAccessExpr.symbol; - if (symbol != null) { - reportIfDeprecatedUsage(symbol, fieldAccessExpr.field.toString(), expr, fieldAccessExpr.pos); - } + reportIfDeprecatedUsage(fieldAccessExpr.symbol, expr, fieldAccessExpr.pos); } @Override @@ -3919,10 +3901,6 @@ private void analyzeInvocationParams(BLangInvocation iExpr, AnalyzerData data) { } BType invocableType = Types.getReferredType(iExpr.symbol.type); - if (invocableType.tag != TypeTags.INVOKABLE) { - return; - } - BInvokableSymbol invokableSymbol = ((BInvokableSymbol) iExpr.symbol); int parameterCountForPositionalArgs = ((BInvokableType) invocableType).getParameterTypes().size(); @@ -3932,11 +3910,7 @@ private void analyzeInvocationParams(BLangInvocation iExpr, AnalyzerData data) { switch (expr.getKind()) { case NAMED_ARGS_EXPR: foundNamedArg = true; - BLangNamedArgsExpression namedArgsExpression = (BLangNamedArgsExpression) expr; - if (namedArgsExpression.varSymbol != null) { - reportIfDeprecatedUsage(namedArgsExpression.varSymbol, namedArgsExpression.varSymbol.toString(), - expr, expr.pos); - } + reportIfDeprecatedUsage(((BLangNamedArgsExpression) expr).varSymbol, expr, expr.pos); i++; break; case REST_ARGS_EXPR: @@ -4014,13 +3988,10 @@ private BType getErrorTypes(BType bType) { return errorType; } - private void reportIfDeprecatedUsage(BSymbol constructSymbol, - String constructName, - BLangExpression expr, - Location usagePos) { - if (Symbols.isFlagOn(constructSymbol.flags, Flags.DEPRECATED)) { + private void reportIfDeprecatedUsage(BSymbol constructSymbol, BLangExpression expr, Location usagePos) { + if (constructSymbol != null && Symbols.isFlagOn(constructSymbol.flags, Flags.DEPRECATED)) { dlog.warning(usagePos, DiagnosticWarningCode.USAGE_OF_DEPRECATED_CONSTRUCT, - generateDeprecatedConstructString(expr, constructName, constructSymbol)); + generateDeprecatedConstructString(expr, constructSymbol.name.getValue(), constructSymbol)); } } From b3cfba1a3e0b8f27eefceac81fc0a65c735b578e Mon Sep 17 00:00:00 2001 From: Dulaj Date: Wed, 26 Jul 2023 15:30:14 +0530 Subject: [PATCH 40/67] Fix NPE if matching field not-found --- .../compiler/semantics/analyzer/CodeAnalyzer.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java index d9c8d2c66f39..89515279e730 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java @@ -2249,8 +2249,9 @@ public void visit(BLangRecordLiteral recordLiteral, AnalyzerData data) { if (referredType.getKind() == TypeKind.RECORD) { BField matchingField = ((BRecordType) referredType).getFields().get(recField.symbol .getName().getValue()); - reportIfDeprecatedUsage(matchingField.symbol, recordLiteral, - ((BLangRecordLiteral.BLangRecordVarNameField) field).pos); + if (matchingField != null) { + reportIfDeprecatedUsage(matchingField.symbol, recordLiteral, recField.pos); + } } } else { BLangRecordLiteral.BLangRecordSpreadOperatorField spreadField @@ -2263,7 +2264,9 @@ public void visit(BLangRecordLiteral recordLiteral, AnalyzerData data) { for (BField fieldEntry: ((BRecordType) spreadFieldType).getFields().values()) { BRecordType recordType = (BRecordType) referredType; BField matchingField = recordType.getFields().get(fieldEntry.getName().getValue()); - reportIfDeprecatedUsage(matchingField.symbol, recordLiteral, spreadField.expr.pos); + if (matchingField != null) { + reportIfDeprecatedUsage(matchingField.symbol, recordLiteral, spreadField.expr.pos); + } } } } From ed1f81ce7a67914fa0d17e2b1ae650f940351972 Mon Sep 17 00:00:00 2001 From: Dulaj Date: Fri, 28 Jul 2023 10:16:42 +0530 Subject: [PATCH 41/67] Add deprecate warning for positional args for rest args --- .../compiler/semantics/analyzer/CodeAnalyzer.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java index 89515279e730..93f0537d2d05 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java @@ -3928,15 +3928,14 @@ private void analyzeInvocationParams(BLangInvocation iExpr, AnalyzerData data) { } if (i < parameterCountForPositionalArgs) { BVarSymbol paramSymbol = invokableSymbol.params.get(i); - if (paramSymbol != null && Symbols.isFlagOn(paramSymbol.flags, Flags.DEPRECATED)) { - logDeprecatedWaring(paramSymbol.toString(), paramSymbol, expr.pos); - } + reportIfDeprecatedUsage(paramSymbol, expr, expr.pos); if (Symbols.isFlagOn(invokableSymbol.params.get(i).flags, Flags.INCLUDED)) { analyzeExpr(expr, data); } + } else { + reportIfDeprecatedUsage(invokableSymbol.restParam, expr, expr.pos); } i++; - } } } From 0b9d0b06fdad1849da548dac067d8096f22214ef Mon Sep 17 00:00:00 2001 From: Dulaj Date: Fri, 28 Jul 2023 10:39:57 +0530 Subject: [PATCH 42/67] Add more tests for deprecated param usages --- .../DeprecationAnnotationTest.java | 26 ++++++++++----- .../annotations/deprecation_annotation.bal | 33 +++++++++++++++++++ 2 files changed, 50 insertions(+), 9 deletions(-) diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java index 9c20f8ac5890..403cb6618b10 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java @@ -122,15 +122,23 @@ public void testDeprecationAnnotation() { BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Company.name' is deprecated", 433, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Company.city' is deprecated", 434, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Company.country' is deprecated", 435, 12); - BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'x2' is deprecated", 446, 15); - BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'x2' is deprecated", 447, 15); - BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'x2' is deprecated", 448, 20); - BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Company.city' is deprecated", 451, 9); - BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Company.country' is deprecated", 452, 9); - BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Company.name' is deprecated", 453, 9); - BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'city' is deprecated", 458, 9); - BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'country' is deprecated", 459, 9); - BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'name' is deprecated", 460, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'x2' is deprecated", 458, 15); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'x2' is deprecated", 459, 15); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'x2' is deprecated", 460, 20); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Company.city' is deprecated", 463, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Company.country' is deprecated", 464, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'Company.name' is deprecated", 465, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'city' is deprecated", 470, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'country' is deprecated", 471, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'name' is deprecated", 472, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'c' is deprecated", 476, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'c' is deprecated", 477, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'c' is deprecated", 478, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'y1' is deprecated", 481, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'y2' is deprecated", 482, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'y1' is deprecated", 485, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'y2' is deprecated", 486, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'age' is deprecated", 492, 13); Assert.assertEquals(compileResult.getWarnCount(), i); } diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal b/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal index 360c6314f9b9..5e73cea1358a 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal @@ -442,6 +442,18 @@ function fooFn(int x1, @deprecated int x2){ function barFn(string s, *Company company) { } +function bazFn(string a, @deprecated int... c) { +} + +function quxFn(@deprecated string y1 = "Qux", @deprecated int y2 = 10) { +} + +function quuxFn(record {| + int id; + record {|string name; @deprecated int age;|} person; +|} z) { +} + public function testDeprecatedParamUsages() { fooFn(10, 11); fooFn(12, x2 = 13); @@ -459,4 +471,25 @@ public function testDeprecatedParamUsages() { country = "Germany", // Warning name = "Bar" // Warning ); + bazFn( + "A", + 1, // warning + 2, // warning + 3 // warning + ); + quxFn( + "Quux", // warning + 11 // warning + ); + quxFn( + y1 = "Quux", // warning + y2 = 11 // warning + ); + quuxFn({ + id: 1, + person: { + name: "John", + age: 12 // warning + } + }); } From 47e900126e6d4e06b1aebb2f8ba60506e595639c Mon Sep 17 00:00:00 2001 From: Dulaj Date: Wed, 2 Aug 2023 10:09:15 +0530 Subject: [PATCH 43/67] Report deprecated usage warning for rest args --- .../compiler/semantics/analyzer/CodeAnalyzer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java index 93f0537d2d05..49e41ed5991d 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java @@ -3920,7 +3920,9 @@ private void analyzeInvocationParams(BLangInvocation iExpr, AnalyzerData data) { if (foundNamedArg) { continue; } - analyzeExpr(expr, data); + if (i > parameterCountForPositionalArgs) { + reportIfDeprecatedUsage(invokableSymbol.restParam, expr, expr.pos); + } break; default: // positional args if (foundNamedArg) { From 916127c76f0b3637400792b2dfa6d7c810edc894 Mon Sep 17 00:00:00 2001 From: kavindu Date: Wed, 2 Aug 2023 10:17:36 +0530 Subject: [PATCH 44/67] Add local module dependency to Ballerina.toml --- .../AddModuleToBallerinaTomlCodeAction.java | 168 ++++++++++++++++++ .../common/constants/CommandConstants.java | 2 + ...ddModuleToBallerinaTomlCodeActionTest.java | 117 ++++++++++++ .../config/add_module1.json | 29 +++ .../config/add_module2.json | 29 +++ .../config/add_module3.json | 29 +++ .../config/add_module4.json | 9 + .../config/add_module5.json | 9 + .../source/testproject1/Ballerina.toml | 7 + .../source/testproject1/main.bal | 5 + .../source/testproject2/Ballerina.toml | 7 + .../source/testproject2/main.bal | 5 + .../source/testproject3/Ballerina.toml | 7 + .../source/testproject3/main.bal | 6 + .../source/testproject4/Ballerina.toml | 7 + .../source/testproject4/main.bal | 5 + .../source/testproject5/Ballerina.toml | 7 + .../source/testproject5/main.bal | 5 + .../local_projects/pkg1/Ballerina.toml | 9 + .../resources/local_projects/pkg1/main.bal | 5 + .../pkg1/modules/mod1/Module.md | 6 + .../local_projects/pkg1/modules/mod1/mod1.bal | 10 ++ .../pkg1/modules/mod1/resources/.keep | 0 .../pkg1/modules/mod1/tests/lib_test.bal | 34 ++++ .../local_projects/pkg2/Ballerina.toml | 8 + .../resources/local_projects/pkg2/main.bal | 5 + .../pkg2/modules/mod1/Module.md | 6 + .../local_projects/pkg2/modules/mod1/mod1.bal | 10 ++ .../pkg2/modules/mod1/resources/.keep | 0 .../pkg2/modules/mod1/tests/lib_test.bal | 34 ++++ 30 files changed, 580 insertions(+) create mode 100644 language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/AddModuleToBallerinaTomlCodeAction.java create mode 100644 language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/AddModuleToBallerinaTomlCodeActionTest.java create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module1.json create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module2.json create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module3.json create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module4.json create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module5.json create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject1/Ballerina.toml create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject1/main.bal create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject2/Ballerina.toml create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject2/main.bal create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject3/Ballerina.toml create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject3/main.bal create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject4/Ballerina.toml create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject4/main.bal create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject5/Ballerina.toml create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject5/main.bal create mode 100644 language-server/modules/langserver-core/src/test/resources/local_projects/pkg1/Ballerina.toml create mode 100644 language-server/modules/langserver-core/src/test/resources/local_projects/pkg1/main.bal create mode 100644 language-server/modules/langserver-core/src/test/resources/local_projects/pkg1/modules/mod1/Module.md create mode 100644 language-server/modules/langserver-core/src/test/resources/local_projects/pkg1/modules/mod1/mod1.bal create mode 100644 language-server/modules/langserver-core/src/test/resources/local_projects/pkg1/modules/mod1/resources/.keep create mode 100644 language-server/modules/langserver-core/src/test/resources/local_projects/pkg1/modules/mod1/tests/lib_test.bal create mode 100644 language-server/modules/langserver-core/src/test/resources/local_projects/pkg2/Ballerina.toml create mode 100644 language-server/modules/langserver-core/src/test/resources/local_projects/pkg2/main.bal create mode 100644 language-server/modules/langserver-core/src/test/resources/local_projects/pkg2/modules/mod1/Module.md create mode 100644 language-server/modules/langserver-core/src/test/resources/local_projects/pkg2/modules/mod1/mod1.bal create mode 100644 language-server/modules/langserver-core/src/test/resources/local_projects/pkg2/modules/mod1/resources/.keep create mode 100644 language-server/modules/langserver-core/src/test/resources/local_projects/pkg2/modules/mod1/tests/lib_test.bal diff --git a/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/AddModuleToBallerinaTomlCodeAction.java b/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/AddModuleToBallerinaTomlCodeAction.java new file mode 100644 index 000000000000..f92ca65f656d --- /dev/null +++ b/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/AddModuleToBallerinaTomlCodeAction.java @@ -0,0 +1,168 @@ +/* + * Copyright (c) 2023, WSO2 LLC. (http://wso2.com) All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.ballerinalang.langserver.codeaction.providers.imports; + +import io.ballerina.projects.BallerinaToml; +import io.ballerina.projects.PackageVersion; +import io.ballerina.projects.Project; +import io.ballerina.projects.SemanticVersion; +import io.ballerina.projects.environment.PackageRepository; +import io.ballerina.projects.internal.environment.BallerinaUserHome; +import io.ballerina.projects.util.ProjectConstants; +import io.ballerina.toml.syntax.tree.DocumentMemberDeclarationNode; +import io.ballerina.toml.syntax.tree.DocumentNode; +import io.ballerina.toml.syntax.tree.NodeList; +import io.ballerina.toml.syntax.tree.SyntaxKind; +import io.ballerina.toml.syntax.tree.TableNode; +import io.ballerina.tools.diagnostics.Diagnostic; +import io.ballerina.tools.diagnostics.DiagnosticProperty; +import org.ballerinalang.annotation.JavaSPIService; +import org.ballerinalang.langserver.LSPackageLoader; +import org.ballerinalang.langserver.LSPackageLoader.ModuleInfo; +import org.ballerinalang.langserver.codeaction.CodeActionNodeValidator; +import org.ballerinalang.langserver.codeaction.CodeActionUtil; +import org.ballerinalang.langserver.common.constants.CommandConstants; +import org.ballerinalang.langserver.commons.CodeActionContext; +import org.ballerinalang.langserver.commons.codeaction.spi.DiagBasedPositionDetails; +import org.ballerinalang.langserver.commons.codeaction.spi.DiagnosticBasedCodeActionProvider; +import org.ballerinalang.langserver.commons.toml.common.TomlSyntaxTreeUtil; +import org.ballerinalang.util.diagnostic.DiagnosticErrorCode; +import org.eclipse.lsp4j.CodeAction; +import org.eclipse.lsp4j.CodeActionKind; +import org.eclipse.lsp4j.Position; +import org.eclipse.lsp4j.Range; +import org.eclipse.lsp4j.TextEdit; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Optional; + +/** + * Code Action for add dependency for Ballerina.toml. + * + * @since 2201.8.0 + */ +@JavaSPIService("org.ballerinalang.langserver.commons.codeaction.spi.LSCodeActionProvider") +public class AddModuleToBallerinaTomlCodeAction implements DiagnosticBasedCodeActionProvider { + + public static final String NAME = "Add Module to Ballerina.toml"; + + @Override + public boolean validate(Diagnostic diagnostic, DiagBasedPositionDetails positionDetails, + CodeActionContext context) { + return CodeActionNodeValidator.validate(context.nodeAtRange()); + } + + @Override + public List getCodeActions(Diagnostic diagnostic, + DiagBasedPositionDetails positionDetails, + CodeActionContext context) { + if (!diagnostic.diagnosticInfo().code().equals(DiagnosticErrorCode.MODULE_NOT_FOUND.diagnosticId())) { + return Collections.emptyList(); + } + String commandTitle = CommandConstants.ADD_MODULE_TO_BALLERINA_TOML; + Optional project = context.workspace().project(context.filePath()); + if (project.isEmpty()) { + return Collections.emptyList(); + } + + List> properties = diagnostic.properties(); + if (properties.isEmpty()) { + return Collections.emptyList(); + } + + String orgName; + String pkgName; + String[] orgNameAndRest = ((String) properties.get(0).value()).split("/"); + if (orgNameAndRest.length == 2) { + orgName = orgNameAndRest[0]; + String[] pkgNameAndRest = orgNameAndRest[1].split("\\."); + if (pkgNameAndRest.length == 0) { + return Collections.emptyList(); + } + pkgName = pkgNameAndRest[0]; + } else { + return Collections.emptyList(); + } + + ArrayList versions = new ArrayList<>(); + getVersions(LSPackageLoader.getInstance(context.languageServercontext()), project.get(), orgName, pkgName, + versions); + if (versions.isEmpty()) { + return Collections.emptyList(); + } + + Optional toml = project.get().currentPackage().ballerinaToml(); + if (toml.isEmpty()) { + return Collections.emptyList(); + } + Position dependencyStart = new Position(getDependencyStartLine(toml.get()), 0); + + String dependency = "[[dependency]]\n" + + "org = \"" + orgName + "\"\n" + + "name = \"" + pkgName + "\"\n" + + "version = \"" + getLatestVersion(versions) + "\"\n" + + "repository = \"local\"\n\n"; + TextEdit textEdit = new TextEdit(new Range(dependencyStart, dependencyStart), dependency); + CodeAction action = CodeActionUtil.createCodeAction(commandTitle, List.of(textEdit), + project.get().sourceRoot().resolve(ProjectConstants.BALLERINA_TOML).toString(), + CodeActionKind.QuickFix); + return Collections.singletonList(action); + } + + @Override + public String getName() { + return NAME; + } + + private void getVersions(LSPackageLoader lsPackageLoader, Project project, String orgName, String pkgName, + ArrayList versions) { + BallerinaUserHome ballerinaUserHome = BallerinaUserHome.from(project.projectEnvironmentContext().environment()); + PackageRepository localRepository = ballerinaUserHome.localPackageRepository(); + List modules = lsPackageLoader.getLocalRepoPackages(localRepository); + for (ModuleInfo mod : modules) { + if (mod.packageOrg().value().equals(orgName) && mod.packageName().value().equals(pkgName)) { + versions.add(mod.packageVersion()); + } + } + } + + private String getLatestVersion(ArrayList versions) { + PackageVersion latestVersion = versions.get(0); + for (int i = 1; i < versions.size(); i++) { + PackageVersion version = versions.get(i); + if (version.compareTo(latestVersion) == SemanticVersion.VersionCompatibilityResult.GREATER_THAN) { + latestVersion = version; + } + } + return latestVersion.toString(); + } + + private int getDependencyStartLine(BallerinaToml toml) { + DocumentNode tomlSyntaxTree = toml.tomlDocument().syntaxTree().rootNode(); + NodeList members = tomlSyntaxTree.members(); + for (DocumentMemberDeclarationNode member : members) { + if (member.kind() == SyntaxKind.TABLE) { + TableNode tableNode = (TableNode) member; + if (TomlSyntaxTreeUtil.toQualifiedName(tableNode.identifier().value()).equals("package")) { + return tableNode.lineRange().endLine().line() + 2; + } + } + } + return 0; + } +} diff --git a/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/common/constants/CommandConstants.java b/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/common/constants/CommandConstants.java index a5854e2b18d5..e0fe98e787e7 100644 --- a/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/common/constants/CommandConstants.java +++ b/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/common/constants/CommandConstants.java @@ -105,6 +105,8 @@ public class CommandConstants { public static final String CREATE_INITIALIZER_TITLE = "Create initializer"; public static final String PULL_MOD_TITLE = "Pull unresolved modules"; + + public static final String ADD_MODULE_TO_BALLERINA_TOML = "Add module to Ballerina.toml"; public static final String CHANGE_RETURN_TYPE_TITLE = "Change return type to '%s'"; diff --git a/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/AddModuleToBallerinaTomlCodeActionTest.java b/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/AddModuleToBallerinaTomlCodeActionTest.java new file mode 100644 index 000000000000..87443ca5ffb0 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/AddModuleToBallerinaTomlCodeActionTest.java @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2023, WSO2 LLC. (http://wso2.com) All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.ballerinalang.langserver.codeaction; + +import io.ballerina.projects.Package; +import org.ballerinalang.langserver.BallerinaLanguageServer; +import org.ballerinalang.langserver.LSPackageLoader; +import org.ballerinalang.langserver.commons.DocumentServiceContext; +import org.ballerinalang.langserver.commons.LanguageServerContext; +import org.ballerinalang.langserver.commons.capability.InitializationOptions; +import org.ballerinalang.langserver.commons.workspace.WorkspaceDocumentException; +import org.ballerinalang.langserver.commons.workspace.WorkspaceManager; +import org.ballerinalang.langserver.contexts.LanguageServerContextImpl; +import org.ballerinalang.langserver.extensions.ballerina.connector.CentralPackageListResult; +import org.ballerinalang.langserver.util.FileUtils; +import org.ballerinalang.langserver.util.TestUtil; +import org.ballerinalang.langserver.workspace.BallerinaWorkspaceManager; +import org.eclipse.lsp4j.jsonrpc.Endpoint; +import org.mockito.Mockito; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import java.io.FileReader; +import java.io.IOException; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * Test class to test module addition to Ballerina.toml. + * + * @since 2201.8.0 + */ +public class AddModuleToBallerinaTomlCodeActionTest extends AbstractCodeActionTest { + + @Override + protected void setupLanguageServer(TestUtil.LanguageServerBuilder builder) { + builder.withInitOption(InitializationOptions.KEY_POSITIONAL_RENAME_SUPPORT, true); + } + + @BeforeClass + public void setup() { + super.setup(); + + LanguageServerContext context = new LanguageServerContextImpl(); + BallerinaLanguageServer languageServer = new BallerinaLanguageServer(); + Endpoint endpoint = TestUtil.initializeLanguageSever(languageServer); + try { + Map localProjects = Map.of("pkg1", "main.bal", "pkg2", "main.bal"); + List localPackages = getPackages(localProjects, + languageServer.getWorkspaceManager(), context).stream().map(LSPackageLoader.ModuleInfo::new) + .collect(Collectors.toList()); + Mockito.when(getLSPackageLoader().getLocalRepoPackages(Mockito.any())).thenReturn(localPackages); + } catch (Exception e) { + //ignore + } finally { + TestUtil.shutdownLanguageServer(endpoint); + } + } + + @Test(dataProvider = "codeaction-data-provider") + @Override + public void test(String config) throws IOException, WorkspaceDocumentException { + super.test(config); + } + + @DataProvider(name = "codeaction-data-provider") + @Override + public Object[][] dataProvider() { + return new Object[][]{ + {"add_module1.json"}, +// {"add_module2.json"}, +// {"add_module3.json"}, +// {"add_module4.json"}, +// {"add_module5.json"}, + }; + } + + @Override + public String getResourceDir() { + return "add-module-ballerina-toml"; + } + + @Override + public boolean loadMockedPackages() { + return true; + } + + protected static List getPackages(Map projects, + WorkspaceManager workspaceManager, + LanguageServerContext context) + throws WorkspaceDocumentException, IOException { + List packages = new ArrayList<>(); + for (Map.Entry entry : projects.entrySet()) { + Path path = FileUtils.RES_DIR.resolve("local_projects").resolve(entry.getKey()) + .resolve(entry.getValue()); + TestUtil.compileAndGetPackage(path, workspaceManager, context).ifPresent(packages::add); + } + return packages; + } +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module1.json b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module1.json new file mode 100644 index 000000000000..3272badd9fab --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module1.json @@ -0,0 +1,29 @@ +{ + "position": { + "line": 0, + "character": 21 + }, + "source": "testproject1/main.bal", + "expected": [ + { + "title": "Add module to Ballerina.toml", + "kind": "quickfix", + "edits": [ + { + "range": { + "start": { + "line": 5, + "character": 0 + }, + "end": { + "line": 5, + "character": 0 + } + }, + "newText": "[[dependency]]\norg = \"ballerina\"\nname = \"pkg1\"\nversion = \"2.1.0\"\nrepository = \"local\"\n\n" + } + ], + "resolvable": false + } + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module2.json b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module2.json new file mode 100644 index 000000000000..83edf7cd5faa --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module2.json @@ -0,0 +1,29 @@ +{ + "position": { + "line": 0, + "character": 20 + }, + "source": "testproject2/main.bal", + "expected": [ + { + "title": "Add module to Ballerina.toml", + "kind": "quickfix", + "edits": [ + { + "range": { + "start": { + "line": 5, + "character": 0 + }, + "end": { + "line": 5, + "character": 0 + } + }, + "newText": "[[dependency]]\norg = \"ballerina\"\nname = \"pkg1\"\nversion = \"2.1.0\"\nrepository = \"local\"\n\n" + } + ], + "resolvable": false + } + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module3.json b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module3.json new file mode 100644 index 000000000000..61f69a8156ff --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module3.json @@ -0,0 +1,29 @@ +{ + "position": { + "line": 1, + "character": 20 + }, + "source": "testproject3/main.bal", + "expected": [ + { + "title": "Add module to Ballerina.toml", + "kind": "quickfix", + "edits": [ + { + "range": { + "start": { + "line": 5, + "character": 0 + }, + "end": { + "line": 5, + "character": 0 + } + }, + "newText": "[[dependency]]\norg = \"ballerina\"\nname = \"pkg2\"\nversion = \"0.1.0\"\nrepository = \"local\"\n\n" + } + ], + "resolvable": false + } + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module4.json b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module4.json new file mode 100644 index 000000000000..8cdd0c3e7cb1 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module4.json @@ -0,0 +1,9 @@ +{ + "position": { + "line": 0, + "character": 20 + }, + "source": "testproject4/main.bal", + "expected": [ + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module5.json b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module5.json new file mode 100644 index 000000000000..7e1e4bb2358c --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module5.json @@ -0,0 +1,9 @@ +{ + "position": { + "line": 0, + "character": 14 + }, + "source": "testproject5/main.bal", + "expected": [ + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject1/Ballerina.toml b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject1/Ballerina.toml new file mode 100644 index 000000000000..ccfc1a5cd018 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject1/Ballerina.toml @@ -0,0 +1,7 @@ +[package] +org = "lstest" +name = "testproject" +version = "0.1.0" + +[build-options] +observabilityIncluded = false \ No newline at end of file diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject1/main.bal b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject1/main.bal new file mode 100644 index 000000000000..7da30e75145d --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject1/main.bal @@ -0,0 +1,5 @@ +import ballerina/pkg1; + +public function main() { + +} \ No newline at end of file diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject2/Ballerina.toml b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject2/Ballerina.toml new file mode 100644 index 000000000000..ccfc1a5cd018 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject2/Ballerina.toml @@ -0,0 +1,7 @@ +[package] +org = "lstest" +name = "testproject" +version = "0.1.0" + +[build-options] +observabilityIncluded = false \ No newline at end of file diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject2/main.bal b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject2/main.bal new file mode 100644 index 000000000000..e04c01caddb8 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject2/main.bal @@ -0,0 +1,5 @@ +import ballerina/pkg1 + +public function main() { + +} \ No newline at end of file diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject3/Ballerina.toml b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject3/Ballerina.toml new file mode 100644 index 000000000000..ccfc1a5cd018 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject3/Ballerina.toml @@ -0,0 +1,7 @@ +[package] +org = "lstest" +name = "testproject" +version = "0.1.0" + +[build-options] +observabilityIncluded = false \ No newline at end of file diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject3/main.bal b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject3/main.bal new file mode 100644 index 000000000000..bddd8ed660b2 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject3/main.bal @@ -0,0 +1,6 @@ +import ballerina/pkg1; +import ballerina/pkg2; + +public function main() { + +} \ No newline at end of file diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject4/Ballerina.toml b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject4/Ballerina.toml new file mode 100644 index 000000000000..ccfc1a5cd018 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject4/Ballerina.toml @@ -0,0 +1,7 @@ +[package] +org = "lstest" +name = "testproject" +version = "0.1.0" + +[build-options] +observabilityIncluded = false \ No newline at end of file diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject4/main.bal b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject4/main.bal new file mode 100644 index 000000000000..f32d6ad0e85c --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject4/main.bal @@ -0,0 +1,5 @@ +import ballerina/pkg; + +public function main() { + +} \ No newline at end of file diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject5/Ballerina.toml b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject5/Ballerina.toml new file mode 100644 index 000000000000..ccfc1a5cd018 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject5/Ballerina.toml @@ -0,0 +1,7 @@ +[package] +org = "lstest" +name = "testproject" +version = "0.1.0" + +[build-options] +observabilityIncluded = false \ No newline at end of file diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject5/main.bal b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject5/main.bal new file mode 100644 index 000000000000..f9541aefdaf6 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject5/main.bal @@ -0,0 +1,5 @@ +import ballerina; + +public function main() { + +} \ No newline at end of file diff --git a/language-server/modules/langserver-core/src/test/resources/local_projects/pkg1/Ballerina.toml b/language-server/modules/langserver-core/src/test/resources/local_projects/pkg1/Ballerina.toml new file mode 100644 index 000000000000..f460bc58c06c --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/local_projects/pkg1/Ballerina.toml @@ -0,0 +1,9 @@ +[package] +org = "ballerina" +name = "pkg1" +version = "2.1.0" +distribution = "2201.7.0" +export = ["pkg1", "pkg1.mod1"] + +[build-options] +observabilityIncluded = false diff --git a/language-server/modules/langserver-core/src/test/resources/local_projects/pkg1/main.bal b/language-server/modules/langserver-core/src/test/resources/local_projects/pkg1/main.bal new file mode 100644 index 000000000000..31e8785bf98f --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/local_projects/pkg1/main.bal @@ -0,0 +1,5 @@ +import ballerina/io; + +public function main() { + io:println("Hello, World!"); +} diff --git a/language-server/modules/langserver-core/src/test/resources/local_projects/pkg1/modules/mod1/Module.md b/language-server/modules/langserver-core/src/test/resources/local_projects/pkg1/modules/mod1/Module.md new file mode 100644 index 000000000000..8a69f51930aa --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/local_projects/pkg1/modules/mod1/Module.md @@ -0,0 +1,6 @@ +Prints "Hello, World!" with a main function. +[//]: # (above is the module summary) + +# Module Overview +Provides an overview about the module when generating the API documentations. +For example, refer to https://lib.ballerina.io/ballerina/io/latest diff --git a/language-server/modules/langserver-core/src/test/resources/local_projects/pkg1/modules/mod1/mod1.bal b/language-server/modules/langserver-core/src/test/resources/local_projects/pkg1/modules/mod1/mod1.bal new file mode 100644 index 000000000000..7a0681e5344c --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/local_projects/pkg1/modules/mod1/mod1.bal @@ -0,0 +1,10 @@ +# Returns the string `Hello` with the input string name. +# +# + name - name as a string +# + return - "Hello, " with the input string name +public function hello(string name) returns string { + if !(name is "") { + return "Hello, " + name; + } + return "Hello, World!"; +} diff --git a/language-server/modules/langserver-core/src/test/resources/local_projects/pkg1/modules/mod1/resources/.keep b/language-server/modules/langserver-core/src/test/resources/local_projects/pkg1/modules/mod1/resources/.keep new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/language-server/modules/langserver-core/src/test/resources/local_projects/pkg1/modules/mod1/tests/lib_test.bal b/language-server/modules/langserver-core/src/test/resources/local_projects/pkg1/modules/mod1/tests/lib_test.bal new file mode 100644 index 000000000000..31ce10dfbb64 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/local_projects/pkg1/modules/mod1/tests/lib_test.bal @@ -0,0 +1,34 @@ +import ballerina/io; +import ballerina/test; + +// Before Suite Function + +@test:BeforeSuite +function beforeSuiteFunc() { + io:println("I'm the before suite function!"); +} + +// Test function + +@test:Config {} +function testFunction() { + string name = "John"; + string welcomeMsg = hello(name); + test:assertEquals("Hello, John", welcomeMsg); +} + +// Negative Test function + +@test:Config {} +function negativeTestFunction() { + string name = ""; + string welcomeMsg = hello(name); + test:assertEquals("Hello, World!", welcomeMsg); +} + +// After Suite Function + +@test:AfterSuite +function afterSuiteFunc() { + io:println("I'm the after suite function!"); +} diff --git a/language-server/modules/langserver-core/src/test/resources/local_projects/pkg2/Ballerina.toml b/language-server/modules/langserver-core/src/test/resources/local_projects/pkg2/Ballerina.toml new file mode 100644 index 000000000000..377acff969c3 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/local_projects/pkg2/Ballerina.toml @@ -0,0 +1,8 @@ +[package] +org = "ballerina" +name = "pkg2" +version = "0.1.0" +distribution = "2201.7.0" + +[build-options] +observabilityIncluded = false diff --git a/language-server/modules/langserver-core/src/test/resources/local_projects/pkg2/main.bal b/language-server/modules/langserver-core/src/test/resources/local_projects/pkg2/main.bal new file mode 100644 index 000000000000..31e8785bf98f --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/local_projects/pkg2/main.bal @@ -0,0 +1,5 @@ +import ballerina/io; + +public function main() { + io:println("Hello, World!"); +} diff --git a/language-server/modules/langserver-core/src/test/resources/local_projects/pkg2/modules/mod1/Module.md b/language-server/modules/langserver-core/src/test/resources/local_projects/pkg2/modules/mod1/Module.md new file mode 100644 index 000000000000..8a69f51930aa --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/local_projects/pkg2/modules/mod1/Module.md @@ -0,0 +1,6 @@ +Prints "Hello, World!" with a main function. +[//]: # (above is the module summary) + +# Module Overview +Provides an overview about the module when generating the API documentations. +For example, refer to https://lib.ballerina.io/ballerina/io/latest diff --git a/language-server/modules/langserver-core/src/test/resources/local_projects/pkg2/modules/mod1/mod1.bal b/language-server/modules/langserver-core/src/test/resources/local_projects/pkg2/modules/mod1/mod1.bal new file mode 100644 index 000000000000..7a0681e5344c --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/local_projects/pkg2/modules/mod1/mod1.bal @@ -0,0 +1,10 @@ +# Returns the string `Hello` with the input string name. +# +# + name - name as a string +# + return - "Hello, " with the input string name +public function hello(string name) returns string { + if !(name is "") { + return "Hello, " + name; + } + return "Hello, World!"; +} diff --git a/language-server/modules/langserver-core/src/test/resources/local_projects/pkg2/modules/mod1/resources/.keep b/language-server/modules/langserver-core/src/test/resources/local_projects/pkg2/modules/mod1/resources/.keep new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/language-server/modules/langserver-core/src/test/resources/local_projects/pkg2/modules/mod1/tests/lib_test.bal b/language-server/modules/langserver-core/src/test/resources/local_projects/pkg2/modules/mod1/tests/lib_test.bal new file mode 100644 index 000000000000..31ce10dfbb64 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/local_projects/pkg2/modules/mod1/tests/lib_test.bal @@ -0,0 +1,34 @@ +import ballerina/io; +import ballerina/test; + +// Before Suite Function + +@test:BeforeSuite +function beforeSuiteFunc() { + io:println("I'm the before suite function!"); +} + +// Test function + +@test:Config {} +function testFunction() { + string name = "John"; + string welcomeMsg = hello(name); + test:assertEquals("Hello, John", welcomeMsg); +} + +// Negative Test function + +@test:Config {} +function negativeTestFunction() { + string name = ""; + string welcomeMsg = hello(name); + test:assertEquals("Hello, World!", welcomeMsg); +} + +// After Suite Function + +@test:AfterSuite +function afterSuiteFunc() { + io:println("I'm the after suite function!"); +} From 964f8a305600cb77ae2023231970b945aa2951ce Mon Sep 17 00:00:00 2001 From: Dulaj Date: Wed, 2 Aug 2023 10:30:21 +0530 Subject: [PATCH 45/67] Remove unreachable logic --- .../compiler/semantics/analyzer/CodeAnalyzer.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java index 49e41ed5991d..1ffd7e1843a6 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java @@ -3908,26 +3908,18 @@ private void analyzeInvocationParams(BLangInvocation iExpr, AnalyzerData data) { int parameterCountForPositionalArgs = ((BInvokableType) invocableType).getParameterTypes().size(); int i = 0; - boolean foundNamedArg = false; for (BLangExpression expr : iExpr.argExprs) { switch (expr.getKind()) { case NAMED_ARGS_EXPR: - foundNamedArg = true; reportIfDeprecatedUsage(((BLangNamedArgsExpression) expr).varSymbol, expr, expr.pos); i++; break; case REST_ARGS_EXPR: - if (foundNamedArg) { - continue; - } if (i > parameterCountForPositionalArgs) { reportIfDeprecatedUsage(invokableSymbol.restParam, expr, expr.pos); } break; default: // positional args - if (foundNamedArg) { - continue; - } if (i < parameterCountForPositionalArgs) { BVarSymbol paramSymbol = invokableSymbol.params.get(i); reportIfDeprecatedUsage(paramSymbol, expr, expr.pos); From 11543b77864911233abeedb29f753d9d55255b48 Mon Sep 17 00:00:00 2001 From: Dulaj Date: Mon, 7 Aug 2023 06:15:38 +0530 Subject: [PATCH 46/67] Add support for complex deprecated scenes --- .../semantics/analyzer/CodeAnalyzer.java | 66 ++++++++++++++++--- .../DeprecationAnnotationTest.java | 20 ++++-- .../annotations/deprecation_annotation.bal | 41 ++++++++++-- 3 files changed, 107 insertions(+), 20 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java index 1ffd7e1843a6..51b4c783284b 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java @@ -2626,11 +2626,11 @@ private void logDeprecatedWarningForInvocation(BLangInvocation invocationExpr) { private String generateDeprecatedConstructString(BLangExpression expr, String fieldOrMethodName, BSymbol symbol) { BType bType = expr.getBType(); - if (bType.tag == TypeTags.TYPEREFDESC) { + if (bType != null && bType.tag == TypeTags.TYPEREFDESC) { return bType + "." + fieldOrMethodName; } - if (bType.tag == TypeTags.OBJECT) { + if (bType != null && bType.tag == TypeTags.OBJECT) { BObjectType objectType = (BObjectType) bType; // for anonymous objects, only the field name will be in the error msg if (objectType.classDef == null || objectType.classDef.internal == false) { @@ -3905,33 +3905,75 @@ private void analyzeInvocationParams(BLangInvocation iExpr, AnalyzerData data) { BType invocableType = Types.getReferredType(iExpr.symbol.type); BInvokableSymbol invokableSymbol = ((BInvokableSymbol) iExpr.symbol); + List reqParamSymbols = invokableSymbol.params; int parameterCountForPositionalArgs = ((BInvokableType) invocableType).getParameterTypes().size(); - int i = 0; + // data.visitedArgCount must be 0 for (BLangExpression expr : iExpr.argExprs) { switch (expr.getKind()) { case NAMED_ARGS_EXPR: reportIfDeprecatedUsage(((BLangNamedArgsExpression) expr).varSymbol, expr, expr.pos); - i++; + data.visitedArgCount++; break; case REST_ARGS_EXPR: - if (i > parameterCountForPositionalArgs) { + if (data.visitedArgCount >= parameterCountForPositionalArgs) { reportIfDeprecatedUsage(invokableSymbol.restParam, expr, expr.pos); + } else { + BLangExpression restExpr = ((BLangRestArgsExpression) expr).expr; + if (restExpr.getKind() == NodeKind.LIST_CONSTRUCTOR_EXPR) { + analyzeRestArgsAgainstReqParams((BLangListConstructorExpr) restExpr, data, + reqParamSymbols, invokableSymbol.restParam); + } else { + for (int i = data.visitedArgCount; i < parameterCountForPositionalArgs; i++) { + if (reportIfDeprecatedUsage(reqParamSymbols.get(i), expr, expr.pos)) { + break; + } + } + } } break; default: // positional args - if (i < parameterCountForPositionalArgs) { - BVarSymbol paramSymbol = invokableSymbol.params.get(i); + if (data.visitedArgCount < parameterCountForPositionalArgs) { + BVarSymbol paramSymbol = reqParamSymbols.get(data.visitedArgCount); reportIfDeprecatedUsage(paramSymbol, expr, expr.pos); - if (Symbols.isFlagOn(invokableSymbol.params.get(i).flags, Flags.INCLUDED)) { + if (Symbols.isFlagOn(reqParamSymbols.get(data.visitedArgCount).flags, Flags.INCLUDED)) { analyzeExpr(expr, data); } } else { reportIfDeprecatedUsage(invokableSymbol.restParam, expr, expr.pos); } - i++; + data.visitedArgCount++; + } + } + // Reset the visited arg count for the next invocation + data.visitedArgCount = 0; + } + + private void analyzeRestArgsAgainstReqParams(BLangListConstructorExpr listConstructorExpr, AnalyzerData data, + List reqParamSymbols, BVarSymbol restParamSymbol) { + for (BLangExpression expr : listConstructorExpr.exprs) { + if (data.visitedArgCount >= reqParamSymbols.size()) { + // Visiting args matching with the rest-param + reportIfDeprecatedUsage(restParamSymbol, expr, expr.pos); + continue; + } + if (expr.getKind() == NodeKind.LIST_CONSTRUCTOR_SPREAD_OP ) { + BLangExpression innerExpr = ((BLangListConstructorSpreadOpExpr) expr).expr; + if (innerExpr.getKind() == NodeKind.LIST_CONSTRUCTOR_EXPR) { + analyzeRestArgsAgainstReqParams((BLangListConstructorExpr) innerExpr, data, + reqParamSymbols, restParamSymbol); + } else { + for (int i = data.visitedArgCount; i < reqParamSymbols.size(); i++) { + if (reportIfDeprecatedUsage(reqParamSymbols.get(i), expr, expr.pos)) { + break; + } + } + } + } else { + reportIfDeprecatedUsage(reqParamSymbols.get(data.visitedArgCount++), expr, expr.pos); } } + } private void validateModuleInitFunction(BLangFunction funcNode) { @@ -3984,11 +4026,13 @@ private BType getErrorTypes(BType bType) { return errorType; } - private void reportIfDeprecatedUsage(BSymbol constructSymbol, BLangExpression expr, Location usagePos) { + private boolean reportIfDeprecatedUsage(BSymbol constructSymbol, BLangExpression expr, Location usagePos) { if (constructSymbol != null && Symbols.isFlagOn(constructSymbol.flags, Flags.DEPRECATED)) { dlog.warning(usagePos, DiagnosticWarningCode.USAGE_OF_DEPRECATED_CONSTRUCT, generateDeprecatedConstructString(expr, constructSymbol.name.getValue(), constructSymbol)); + return true; } + return false; } /** @@ -4273,5 +4317,7 @@ public static class AnalyzerData { Stack> returnTypes = new Stack<>(); Stack> errorTypes = new Stack<>(); DefaultValueState defaultValueState = DefaultValueState.NOT_IN_DEFAULT_VALUE; + // Field related to args and params + int visitedArgCount = 0; } } diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java index 403cb6618b10..0701deda6649 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/annotations/DeprecationAnnotationTest.java @@ -131,14 +131,22 @@ public void testDeprecationAnnotation() { BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'city' is deprecated", 470, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'country' is deprecated", 471, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'name' is deprecated", 472, 9); - BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'c' is deprecated", 476, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'b' is deprecated", 476, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'c' is deprecated", 477, 9); BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'c' is deprecated", 478, 9); - BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'y1' is deprecated", 481, 9); - BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'y2' is deprecated", 482, 9); - BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'y1' is deprecated", 485, 9); - BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'y2' is deprecated", 486, 9); - BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'age' is deprecated", 492, 13); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'c' is deprecated", 479, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'y1' is deprecated", 482, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'y2' is deprecated", 483, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'y1' is deprecated", 486, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'y2' is deprecated", 487, 9); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'age' is deprecated", 493, 13); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'x2' is deprecated", 499, 11); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'x2' is deprecated", 502, 13); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'x2' is deprecated", 509, 13); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'x2' is deprecated", 516, 16); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'b' is deprecated", 523, 13); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'c' is deprecated", 524, 13); + BAssertUtil.validateWarning(compileResult, i++, "usage of construct 'c' is deprecated", 525, 13); Assert.assertEquals(compileResult.getWarnCount(), i); } diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal b/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal index 5e73cea1358a..b505bcf6fd24 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/annotations/deprecation_annotation.bal @@ -442,7 +442,7 @@ function fooFn(int x1, @deprecated int x2){ function barFn(string s, *Company company) { } -function bazFn(string a, @deprecated int... c) { +function bazFn(string a, @deprecated string b, @deprecated int... c) { } function quxFn(@deprecated string y1 = "Qux", @deprecated int y2 = 10) { @@ -473,9 +473,10 @@ public function testDeprecatedParamUsages() { ); bazFn( "A", - 1, // warning - 2, // warning - 3 // warning + "B", // warning + 1, // warning + 2, // warning + 3 // warning ); quxFn( "Quux", // warning @@ -492,4 +493,36 @@ public function testDeprecatedParamUsages() { age: 12 // warning } }); + + // As rest args + [int, int] argX = [1, 2]; + fooFn(...argX); + fooFn(...[ + 1, + 2 // warning + ] + ); + var fn1 = function () returns int => 1; + fooFn(...[ + 1, + ...[ + fn1() // warning + ] + ] + ); + var fn2 = function () returns [int, int] => [1, 2]; + fooFn(...[ + ...[ + ...fn2() // warning + ] + ] + ); + bazFn( + "A", + ...[ + "B", // warning + 1, // warning + 3 // warning + ] + ); } From 9225056010dd5789b4d8ce9b5f86c9967765f51b Mon Sep 17 00:00:00 2001 From: Dulaj Date: Mon, 7 Aug 2023 06:16:40 +0530 Subject: [PATCH 47/67] Replace with tag comparison --- .../compiler/semantics/analyzer/CodeAnalyzer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java index 51b4c783284b..bce76cd1dcef 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java @@ -2246,7 +2246,7 @@ public void visit(BLangRecordLiteral recordLiteral, AnalyzerData data) { = (BLangRecordLiteral.BLangRecordVarNameField) field; analyzeExpr(recField, data); - if (referredType.getKind() == TypeKind.RECORD) { + if (referredType.tag == TypeTags.RECORD) { BField matchingField = ((BRecordType) referredType).getFields().get(recField.symbol .getName().getValue()); if (matchingField != null) { @@ -2259,8 +2259,8 @@ public void visit(BLangRecordLiteral recordLiteral, AnalyzerData data) { analyzeExpr(spreadField.expr, data); BType spreadFieldType = Types.getReferredType(spreadField.expr.getBType()); - if (spreadFieldType != null && spreadFieldType.getKind() == TypeKind.RECORD - && referredType.getKind() == TypeKind.RECORD) { + if (spreadFieldType != null && spreadFieldType.tag == TypeTags.RECORD + && referredType.tag == TypeTags.RECORD) { for (BField fieldEntry: ((BRecordType) spreadFieldType).getFields().values()) { BRecordType recordType = (BRecordType) referredType; BField matchingField = recordType.getFields().get(fieldEntry.getName().getValue()); From 94617717687298964b7c3b730750d94277d13f37 Mon Sep 17 00:00:00 2001 From: Dulaj Date: Mon, 7 Aug 2023 06:25:24 +0530 Subject: [PATCH 48/67] Improved referredType usages --- .../semantics/analyzer/CodeAnalyzer.java | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java index bce76cd1dcef..faf2318fa81e 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java @@ -2234,9 +2234,15 @@ public void visit(BLangTableConstructorExpr tableConstructorExpr, AnalyzerData d @Override public void visit(BLangRecordLiteral recordLiteral, AnalyzerData data) { BType referredType = Types.getReferredType(recordLiteral.getBType()); - List fields = recordLiteral.fields; + boolean isRecord = referredType.tag == TypeTags.RECORD; + List recordLiteralFields = recordLiteral.fields; + + LinkedHashMap recordFields = null; + if (isRecord) { + recordFields = ((BRecordType) referredType).getFields(); + } - for (RecordLiteralNode.RecordField field : fields) { + for (RecordLiteralNode.RecordField field : recordLiteralFields) { if (field.isKeyValueField()) { analyzeExpr(((BLangRecordKeyValueField) field).valueExpr, data); reportIfDeprecatedUsage(((BLangRecordKeyValueField) field).key.fieldSymbol, recordLiteral, @@ -2246,9 +2252,8 @@ public void visit(BLangRecordLiteral recordLiteral, AnalyzerData data) { = (BLangRecordLiteral.BLangRecordVarNameField) field; analyzeExpr(recField, data); - if (referredType.tag == TypeTags.RECORD) { - BField matchingField = ((BRecordType) referredType).getFields().get(recField.symbol - .getName().getValue()); + if (isRecord) { + BField matchingField = recordFields.get(recField.symbol.getName().getValue()); if (matchingField != null) { reportIfDeprecatedUsage(matchingField.symbol, recordLiteral, recField.pos); } @@ -2259,11 +2264,9 @@ public void visit(BLangRecordLiteral recordLiteral, AnalyzerData data) { analyzeExpr(spreadField.expr, data); BType spreadFieldType = Types.getReferredType(spreadField.expr.getBType()); - if (spreadFieldType != null && spreadFieldType.tag == TypeTags.RECORD - && referredType.tag == TypeTags.RECORD) { + if (spreadFieldType != null && spreadFieldType.tag == TypeTags.RECORD && isRecord) { for (BField fieldEntry: ((BRecordType) spreadFieldType).getFields().values()) { - BRecordType recordType = (BRecordType) referredType; - BField matchingField = recordType.getFields().get(fieldEntry.getName().getValue()); + BField matchingField = recordFields.get(fieldEntry.getName().getValue()); if (matchingField != null) { reportIfDeprecatedUsage(matchingField.symbol, recordLiteral, spreadField.expr.pos); } @@ -2274,16 +2277,15 @@ public void visit(BLangRecordLiteral recordLiteral, AnalyzerData data) { Set names = new HashSet<>(); Set neverTypedKeys = new HashSet<>(); - boolean isRecord = referredType.tag == TypeTags.RECORD; boolean isOpenRecord = isRecord && !((BRecordType) referredType).sealed; // A record type is inferred for a record literal even if the contextually expected type is a map, if the - // mapping constructor expression has `readonly` fields. + // mapping constructor expression has `readonly` recordLiteralFields. boolean isInferredRecordForMapCET = isRecord && recordLiteral.expectedType != null && recordLiteral.expectedType.tag == TypeTags.MAP; BLangRecordLiteral.BLangRecordSpreadOperatorField inclusiveTypeSpreadField = null; - for (RecordLiteralNode.RecordField field : fields) { + for (RecordLiteralNode.RecordField field : recordLiteralFields) { BLangExpression keyExpr; @@ -2303,7 +2305,7 @@ public void visit(BLangRecordLiteral recordLiteral, AnalyzerData data) { } inclusiveTypeSpreadField = spreadOpField; - if (fields.size() > 1) { + if (recordLiteralFields.size() > 1) { if (names.size() > 0) { this.dlog.error(spreadOpExpr.pos, DiagnosticErrorCode.SPREAD_FIELD_MAY_DULPICATE_ALREADY_SPECIFIED_KEYS, From eee15e9f0c694a6b119d5a27c4b114ef9d322e12 Mon Sep 17 00:00:00 2001 From: Dulaj Date: Mon, 7 Aug 2023 06:28:46 +0530 Subject: [PATCH 49/67] Fixed unnecessary change in comment --- .../ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java index faf2318fa81e..0e62fcfab345 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java @@ -2280,7 +2280,7 @@ public void visit(BLangRecordLiteral recordLiteral, AnalyzerData data) { boolean isOpenRecord = isRecord && !((BRecordType) referredType).sealed; // A record type is inferred for a record literal even if the contextually expected type is a map, if the - // mapping constructor expression has `readonly` recordLiteralFields. + // mapping constructor expression has `readonly` fields. boolean isInferredRecordForMapCET = isRecord && recordLiteral.expectedType != null && recordLiteral.expectedType.tag == TypeTags.MAP; From cae7e918b700f9b93e644509612fb3794f84c28c Mon Sep 17 00:00:00 2001 From: Dulaj Date: Mon, 7 Aug 2023 08:44:24 +0530 Subject: [PATCH 50/67] Fix checkstyle errors --- .../compiler/semantics/analyzer/CodeAnalyzer.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java index 0e62fcfab345..fedd255a3cac 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java @@ -31,7 +31,6 @@ import org.ballerinalang.model.tree.expressions.XMLNavigationAccess; import org.ballerinalang.model.tree.statements.StatementNode; import org.ballerinalang.model.tree.statements.VariableDefinitionNode; -import org.ballerinalang.model.types.TypeKind; import org.ballerinalang.util.diagnostic.DiagnosticErrorCode; import org.ballerinalang.util.diagnostic.DiagnosticHintCode; import org.ballerinalang.util.diagnostic.DiagnosticWarningCode; @@ -3959,7 +3958,7 @@ private void analyzeRestArgsAgainstReqParams(BLangListConstructorExpr listConstr reportIfDeprecatedUsage(restParamSymbol, expr, expr.pos); continue; } - if (expr.getKind() == NodeKind.LIST_CONSTRUCTOR_SPREAD_OP ) { + if (expr.getKind() == NodeKind.LIST_CONSTRUCTOR_SPREAD_OP) { BLangExpression innerExpr = ((BLangListConstructorSpreadOpExpr) expr).expr; if (innerExpr.getKind() == NodeKind.LIST_CONSTRUCTOR_EXPR) { analyzeRestArgsAgainstReqParams((BLangListConstructorExpr) innerExpr, data, From 897f0c9f2624a38a27caf44c4dcd3e27df4bb46b Mon Sep 17 00:00:00 2001 From: kavindu Date: Thu, 3 Aug 2023 14:42:07 +0530 Subject: [PATCH 51/67] Fix review suggestions --- .../AddModuleToBallerinaTomlCodeAction.java | 58 ++++++++++--------- ...ddModuleToBallerinaTomlCodeActionTest.java | 28 +++++---- ...odule4.json => add_module_negative_1.json} | 0 ...odule5.json => add_module_negative_2.json} | 0 4 files changed, 48 insertions(+), 38 deletions(-) rename language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/{add_module4.json => add_module_negative_1.json} (100%) rename language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/{add_module5.json => add_module_negative_2.json} (100%) diff --git a/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/AddModuleToBallerinaTomlCodeAction.java b/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/AddModuleToBallerinaTomlCodeAction.java index f92ca65f656d..8b1651963689 100644 --- a/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/AddModuleToBallerinaTomlCodeAction.java +++ b/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/AddModuleToBallerinaTomlCodeAction.java @@ -28,7 +28,6 @@ import io.ballerina.toml.syntax.tree.SyntaxKind; import io.ballerina.toml.syntax.tree.TableNode; import io.ballerina.tools.diagnostics.Diagnostic; -import io.ballerina.tools.diagnostics.DiagnosticProperty; import org.ballerinalang.annotation.JavaSPIService; import org.ballerinalang.langserver.LSPackageLoader; import org.ballerinalang.langserver.LSPackageLoader.ModuleInfo; @@ -52,7 +51,7 @@ import java.util.Optional; /** - * Code Action for add dependency for Ballerina.toml. + * Code Action for adding a dependency to Ballerina.toml file. * * @since 2201.8.0 */ @@ -74,20 +73,23 @@ public List getCodeActions(Diagnostic diagnostic, if (!diagnostic.diagnosticInfo().code().equals(DiagnosticErrorCode.MODULE_NOT_FOUND.diagnosticId())) { return Collections.emptyList(); } - String commandTitle = CommandConstants.ADD_MODULE_TO_BALLERINA_TOML; Optional project = context.workspace().project(context.filePath()); if (project.isEmpty()) { return Collections.emptyList(); } - - List> properties = diagnostic.properties(); - if (properties.isEmpty()) { + Optional toml = project.get().currentPackage().ballerinaToml(); + if (toml.isEmpty()) { + return Collections.emptyList(); + } + + Optional msg = positionDetails.diagnosticProperty(0); + if (msg.isEmpty()) { return Collections.emptyList(); } String orgName; String pkgName; - String[] orgNameAndRest = ((String) properties.get(0).value()).split("/"); + String[] orgNameAndRest = msg.get().split("/"); if (orgNameAndRest.length == 2) { orgName = orgNameAndRest[0]; String[] pkgNameAndRest = orgNameAndRest[1].split("\\."); @@ -99,27 +101,24 @@ public List getCodeActions(Diagnostic diagnostic, return Collections.emptyList(); } - ArrayList versions = new ArrayList<>(); - getVersions(LSPackageLoader.getInstance(context.languageServercontext()), project.get(), orgName, pkgName, - versions); - if (versions.isEmpty()) { - return Collections.emptyList(); - } - - Optional toml = project.get().currentPackage().ballerinaToml(); - if (toml.isEmpty()) { + List loadedPackageVersions = getAvailablePackageVersionsFromLocalRepo( + LSPackageLoader.getInstance(context.languageServercontext()), project.get(), orgName, pkgName); + if (loadedPackageVersions.isEmpty()) { return Collections.emptyList(); } - Position dependencyStart = new Position(getDependencyStartLine(toml.get()), 0); - String dependency = "[[dependency]]\n" + - "org = \"" + orgName + "\"\n" + - "name = \"" + pkgName + "\"\n" + - "version = \"" + getLatestVersion(versions) + "\"\n" + - "repository = \"local\"\n\n"; + Position dependencyStart = new Position(getDependencyStartLine(toml.get()), 0); + String dependency = String.format(""" + [[dependency]] + org = "%s" + name = "%s" + version = "%s" + repository = "local" + + """, orgName, pkgName, getLatestVersion(loadedPackageVersions)); TextEdit textEdit = new TextEdit(new Range(dependencyStart, dependencyStart), dependency); - CodeAction action = CodeActionUtil.createCodeAction(commandTitle, List.of(textEdit), - project.get().sourceRoot().resolve(ProjectConstants.BALLERINA_TOML).toString(), + CodeAction action = CodeActionUtil.createCodeAction(CommandConstants.ADD_MODULE_TO_BALLERINA_TOML, + List.of(textEdit), project.get().sourceRoot().resolve(ProjectConstants.BALLERINA_TOML).toString(), CodeActionKind.QuickFix); return Collections.singletonList(action); } @@ -129,19 +128,22 @@ public String getName() { return NAME; } - private void getVersions(LSPackageLoader lsPackageLoader, Project project, String orgName, String pkgName, - ArrayList versions) { - BallerinaUserHome ballerinaUserHome = BallerinaUserHome.from(project.projectEnvironmentContext().environment()); + private List getAvailablePackageVersionsFromLocalRepo( + LSPackageLoader lsPackageLoader, Project project, String orgName, String pkgName) { + BallerinaUserHome ballerinaUserHome = + BallerinaUserHome.from(project.projectEnvironmentContext().environment()); PackageRepository localRepository = ballerinaUserHome.localPackageRepository(); List modules = lsPackageLoader.getLocalRepoPackages(localRepository); + List versions = new ArrayList<>(); for (ModuleInfo mod : modules) { if (mod.packageOrg().value().equals(orgName) && mod.packageName().value().equals(pkgName)) { versions.add(mod.packageVersion()); } } + return versions; } - private String getLatestVersion(ArrayList versions) { + private String getLatestVersion(List versions) { PackageVersion latestVersion = versions.get(0); for (int i = 1; i < versions.size(); i++) { PackageVersion version = versions.get(i); diff --git a/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/AddModuleToBallerinaTomlCodeActionTest.java b/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/AddModuleToBallerinaTomlCodeActionTest.java index 30f2444a141a..c65bb41f5a19 100644 --- a/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/AddModuleToBallerinaTomlCodeActionTest.java +++ b/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/AddModuleToBallerinaTomlCodeActionTest.java @@ -18,23 +18,19 @@ import io.ballerina.projects.Package; import org.ballerinalang.langserver.BallerinaLanguageServer; import org.ballerinalang.langserver.LSPackageLoader; -import org.ballerinalang.langserver.commons.DocumentServiceContext; import org.ballerinalang.langserver.commons.LanguageServerContext; import org.ballerinalang.langserver.commons.capability.InitializationOptions; import org.ballerinalang.langserver.commons.workspace.WorkspaceDocumentException; import org.ballerinalang.langserver.commons.workspace.WorkspaceManager; import org.ballerinalang.langserver.contexts.LanguageServerContextImpl; -import org.ballerinalang.langserver.extensions.ballerina.connector.CentralPackageListResult; import org.ballerinalang.langserver.util.FileUtils; import org.ballerinalang.langserver.util.TestUtil; -import org.ballerinalang.langserver.workspace.BallerinaWorkspaceManager; import org.eclipse.lsp4j.jsonrpc.Endpoint; import org.mockito.Mockito; import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; -import java.io.FileReader; import java.io.IOException; import java.nio.file.Path; import java.util.ArrayList; @@ -55,6 +51,7 @@ protected void setupLanguageServer(TestUtil.LanguageServerBuilder builder) { } @BeforeClass + @Override public void setup() { super.setup(); @@ -63,7 +60,7 @@ public void setup() { Endpoint endpoint = TestUtil.initializeLanguageSever(languageServer); try { Map localProjects = Map.of("pkg1", "main.bal", "pkg2", "main.bal"); - List localPackages = getPackages(localProjects, + List localPackages = getLocalPackages(localProjects, languageServer.getWorkspaceManager(), context).stream().map(LSPackageLoader.ModuleInfo::new) .collect(Collectors.toList()); Mockito.when(getLSPackageLoader().getLocalRepoPackages(Mockito.any())).thenReturn(localPackages); @@ -87,8 +84,20 @@ public Object[][] dataProvider() { {"add_module1.json"}, {"add_module2.json"}, {"add_module3.json"}, - {"add_module4.json"}, - {"add_module5.json"}, + }; + } + + @Test(dataProvider = "negativeDataProvider") + @Override + public void negativeTest(String config) throws IOException, WorkspaceDocumentException { + super.negativeTest(config); + } + + @DataProvider + public Object[][] negativeDataProvider() { + return new Object[][]{ + {"add_module_negative_1.json"}, + {"add_module_negative_2.json"} }; } @@ -102,9 +111,8 @@ public boolean loadMockedPackages() { return true; } - protected static List getPackages(Map projects, - WorkspaceManager workspaceManager, - LanguageServerContext context) + protected static List getLocalPackages(Map projects, WorkspaceManager workspaceManager, + LanguageServerContext context) throws WorkspaceDocumentException, IOException { List packages = new ArrayList<>(); for (Map.Entry entry : projects.entrySet()) { diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module4.json b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module_negative_1.json similarity index 100% rename from language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module4.json rename to language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module_negative_1.json diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module5.json b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module_negative_2.json similarity index 100% rename from language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module5.json rename to language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module_negative_2.json From 4962af1763ce7502e476b1d06605ba82832ef295 Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Mon, 7 Aug 2023 22:56:12 +0530 Subject: [PATCH 52/67] Handle error completion with aggregation clause --- .../semantics/analyzer/QueryTypeChecker.java | 16 +++-- .../test/query/CollectClauseTest.java | 6 +- .../test-src/query/collect_clause.bal | 71 ++++++++++++++++++- .../query/collect_clause_negative.bal | 37 ++++++++++ 4 files changed, 120 insertions(+), 10 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/QueryTypeChecker.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/QueryTypeChecker.java index 026c4f5ec917..04dfd8b6eaa3 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/QueryTypeChecker.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/QueryTypeChecker.java @@ -189,6 +189,11 @@ public void checkQueryType(BLangQueryExpr queryExpr, TypeChecker.AnalyzerData da } BLangExpression finalClauseExpr = ((BLangCollectClause) finalClause).expression; BType queryType = checkExpr(finalClauseExpr, commonAnalyzerData.queryEnvs.peek(), data); + List collectionTypes = getCollectionTypes(clauses); + BType completionType = getCompletionType(collectionTypes, Types.QueryConstructType.DEFAULT, data); + if (completionType != null) { + queryType = BUnionType.create(null, queryType, completionType); + } actualType = types.checkType(finalClauseExpr.pos, queryType, data.expType, DiagnosticErrorCode.INCOMPATIBLE_TYPES); } @@ -497,14 +502,12 @@ private BType getCompletionType(List collectionTypes, Types.QueryConstruc } collectionType = Types.getReferredType(collectionType); switch (collectionType.tag) { - case TypeTags.STREAM: + case TypeTags.STREAM -> { completionType = ((BStreamType) collectionType).completionType; returnType = completionType; - break; - case TypeTags.OBJECT: - returnType = types.getVarTypeFromIterableObject((BObjectType) collectionType); - break; - default: + } + case TypeTags.OBJECT -> returnType = types.getVarTypeFromIterableObject((BObjectType) collectionType); + default -> { BSymbol itrSymbol = symResolver.lookupLangLibMethod(collectionType, Names.fromString(BLangCompilerConstants.ITERABLE_COLLECTION_ITERATOR_FUNC), data.env); if (itrSymbol == this.symTable.notFoundSymbol) { @@ -513,6 +516,7 @@ private BType getCompletionType(List collectionTypes, Types.QueryConstruc BInvokableSymbol invokableSymbol = (BInvokableSymbol) itrSymbol; returnType = types.getResultTypeOfNextInvocation( (BObjectType) Types.getReferredType(invokableSymbol.retType)); + } } if (returnType != null) { if (queryConstructType == Types.QueryConstructType.STREAM || diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/query/CollectClauseTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/query/CollectClauseTest.java index aaec2acc4ae5..cf86ad3222f8 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/query/CollectClauseTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/query/CollectClauseTest.java @@ -56,7 +56,8 @@ public Object[] dataToTestCollectClause() { "testGroupByAndCollectInSameQuery", "testMultipleCollect", "testDoClause", - "testErrorSeq" + "testErrorSeq", + "testErrorCompletion" }; } @@ -138,6 +139,9 @@ public void testNegativeCases() { "list constructor or function invocation", 150, 42); BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected " + "'([int,int...]|record {| int n; |})', found '[int...]'", 154, 36); + BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected 'int', found '(int|error)'", 181, 17); + BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected 'int', found '(int|error)'", 186, 17); + BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected 'int', found '(int|error)'", 190, 39); Assert.assertEquals(negativeResult.getErrorCount(), i); } } diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/query/collect_clause.bal b/tests/jballerina-unit-test/src/test/resources/test-src/query/collect_clause.bal index 4424dd720d3f..1a84c6e68441 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/query/collect_clause.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/query/collect_clause.bal @@ -451,9 +451,74 @@ function testErrorSeq() { assertEquality("msg1", x[0].message()); } -function assertEquality(anydata expected, anydata actual) { - if expected == actual { +class NumberGenerator { + int i = 0; + boolean resultError = false; + public isolated function next() returns record {|int value;|}|error? { + if self.i > 5 { + if self.resultError { + return error("Number exceed 5"); + } + return (); + } + int value = self.i; + self.i += 1; + return {value}; + } + + function init(boolean resultError = false) { + self.resultError = resultError; + } +} + +function testErrorCompletion() { + NumberGenerator numGenratorErrorResult = new(true); + stream numberStream1 = new (numGenratorErrorResult); + int|error collectResult1 = from int number in numberStream1 + collect sum(number); + assertEquality(error("Number exceed 5"), collectResult1); + + NumberGenerator numGenrator = new(); + stream numberStream2 = new (numGenrator); + int|error collectResult2 = from int number in numberStream2 + collect sum(number); + assertEquality(15, collectResult2); + + int|error collectResult3 = from int num1 in 1...5 + join int num2 in numberStream1 + on num1 equals num2 + collect sum(num1); + assertEquality(error("Number exceed 5"), collectResult3); + + NumberGenerator numGenrator2 = new(); + stream numberStream3 = new (numGenrator2); + (int|error)[] collectResult4 = from int number in 1...3 + let int|error sum = from int i in numberStream3 + collect sum(i) + select sum; + assertTrue(collectResult4[0] is int); + assertEquality(15, collectResult4[0]); +} + +const ASSERTION_ERROR_REASON = "AssertionError"; + +function assertEquality(anydata|error expected, anydata|error actual) { + if expected is anydata && actual is anydata && expected == actual { + return; + } + + if expected is error && actual is error && expected.message() == actual.message(){ return; } - panic error("expected '" + expected.toString() + "', found '" + actual.toString() + "'"); + + string expectedValAsString = expected is error ? expected.toString() : expected.toString(); + string actualValAsString = actual is error ? actual.toString() : actual.toString(); + panic error(ASSERTION_ERROR_REASON, + message = "expected '" + expectedValAsString + "', found '" + actualValAsString + "'"); +} + +function assertTrue(boolean condition) { + if (!condition) { + panic error(ASSERTION_ERROR_REASON, message = "expected 'true', found 'false'"); + } } diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/query/collect_clause_negative.bal b/tests/jballerina-unit-test/src/test/resources/test-src/query/collect_clause_negative.bal index 735850320afe..1c9f6791e30a 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/query/collect_clause_negative.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/query/collect_clause_negative.bal @@ -153,3 +153,40 @@ function testInvalidArgOrder() { where name == "XX" collect int:max(...[price]); // error } + +class NumberGenerator { + int i = 0; + boolean resultError = false; + public isolated function next() returns record {|int value;|}|error? { + if self.i > 5 { + if self.resultError { + return error("Number exceed 5"); + } + return (); + } + int value = self.i; + self.i += 1; + return {value}; + } + + function init(boolean resultError = false) { + self.resultError = resultError; + } +} + +function testErrorCompletion() { + NumberGenerator numGenrator = new(); + stream numberStream = new (numGenrator); + int _ = from int number in numberStream + collect sum(number); + + int _ = from int num1 in 1...5 + join int num2 in numberStream + on num1 equals num2 + collect sum(num1); + + _ = from int number in 1...5 + let int sum = from int i in numberStream + collect sum(i) + select number; +} From 3615abb2d04d747e13d7b18a44d6ce54d6b3b608 Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Tue, 8 Aug 2023 10:58:20 +0530 Subject: [PATCH 53/67] Add few negative tests --- .../test/query/CollectClauseTest.java | 4 +- .../query/collect_clause_negative.bal | 37 +++++++++++++------ 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/query/CollectClauseTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/query/CollectClauseTest.java index cf86ad3222f8..0ee89b0493ef 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/query/CollectClauseTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/query/CollectClauseTest.java @@ -141,7 +141,9 @@ public void testNegativeCases() { "'([int,int...]|record {| int n; |})', found '[int...]'", 154, 36); BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected 'int', found '(int|error)'", 181, 17); BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected 'int', found '(int|error)'", 186, 17); - BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected 'int', found '(int|error)'", 190, 39); + BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected 'int', found '(int|error)'", 190, 21); + BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected 'int', found '(int|error)'", 196, 25); + BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected 'int', found '(int|error)'", 203, 25); Assert.assertEquals(negativeResult.getErrorCount(), i); } } diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/query/collect_clause_negative.bal b/tests/jballerina-unit-test/src/test/resources/test-src/query/collect_clause_negative.bal index 1c9f6791e30a..048f62eaf06f 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/query/collect_clause_negative.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/query/collect_clause_negative.bal @@ -59,14 +59,14 @@ function testInvalidAssignment() { function testUndefinedModule() { int sum = from var {name, price} in [{name: "Saman", price: 11}] - collect foo:sum(price); // error + collect foo:sum(price); // error } function testUserDefinedFunctions() { int sum = from var {name, price} in [{name: "Saman", price: 11}] - collect sumy(price); + collect sumy(price); sum = from var {name, price} in [{name: "Saman", price: 11}] - collect sumx(price); + collect sumx(price); } function sumx(int... p) returns int { @@ -79,11 +79,11 @@ function testQueryConstructTypes() { var sum1 = stream from var {name, price1, price2} in input collect sum(price1); // error var sum2 = map from var {name, price1, price2} in input - collect sum(price1); // error + collect sum(price1); // error map sum3 = map from var {name, price1, price2} in input - collect sum(price1); // error + collect sum(price1); // error var sum4 = table key(name) from var {name, price1, price2} in input - collect sum(price1); // error + collect sum(price1); // error } function testInvalidExpressions2() { @@ -117,7 +117,7 @@ function testVariablesSeqMoreThanOnce() { {name: "Kamal", price1: 10, price2: 9}, {name: "Amal", price1: 11, price2: 13}, {name: "Amal", price1: 11, price2: 15}]; - + var x1 = from var {name, price1, price2} in input1 group by name collect [price1]; // error @@ -131,7 +131,7 @@ function testVariablesSeqMoreThanOnce() { function testInvalidReturnTypesForEmptyGroups() { int x7 = from var {name, price1} in [{name: "Saman", price1: 2}] where name == "X" - collect max(price1); // error + collect max(price1); // error } function testInvalidArgOrder() { @@ -175,18 +175,31 @@ class NumberGenerator { } function testErrorCompletion() { - NumberGenerator numGenrator = new(); + NumberGenerator numGenrator = new (); stream numberStream = new (numGenrator); int _ = from int number in numberStream collect sum(number); - int _ = from int num1 in 1...5 + int _ = from int num1 in 1 ... 5 join int num2 in numberStream on num1 equals num2 collect sum(num1); - _ = from int number in 1...5 + _ = from int number in 1 ... 5 let int sum = from int i in numberStream - collect sum(i) + collect sum(i) select number; + + _ = from int number in 1 ... 5 + do { + int _ = from int i in numberStream + collect sum(i); + }; + + _ = from int number in 1 ... 5 + do { + int _ = from int i in 1 ... 3 + from int j in numberStream + collect sum(i); + }; } From 706e7113d92f4b63671bbc852af9dfbe21641956 Mon Sep 17 00:00:00 2001 From: kavindu Date: Tue, 8 Aug 2023 13:40:33 +0530 Subject: [PATCH 54/67] Fix spotbug --- .../imports/AddModuleToBallerinaTomlCodeAction.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/AddModuleToBallerinaTomlCodeAction.java b/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/AddModuleToBallerinaTomlCodeAction.java index 8b1651963689..5c4bc0b7bde1 100644 --- a/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/AddModuleToBallerinaTomlCodeAction.java +++ b/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/AddModuleToBallerinaTomlCodeAction.java @@ -108,14 +108,8 @@ public List getCodeActions(Diagnostic diagnostic, } Position dependencyStart = new Position(getDependencyStartLine(toml.get()), 0); - String dependency = String.format(""" - [[dependency]] - org = "%s" - name = "%s" - version = "%s" - repository = "local" - - """, orgName, pkgName, getLatestVersion(loadedPackageVersions)); + String dependency = String.format("[[dependency]]%norg = \"%s\"%nname = \"%s\"%nversion = " + + "\"%s\"%nrepository = \"local\"%n%n", orgName, pkgName, getLatestVersion(loadedPackageVersions)); TextEdit textEdit = new TextEdit(new Range(dependencyStart, dependencyStart), dependency); CodeAction action = CodeActionUtil.createCodeAction(CommandConstants.ADD_MODULE_TO_BALLERINA_TOML, List.of(textEdit), project.get().sourceRoot().resolve(ProjectConstants.BALLERINA_TOML).toString(), From 1a1c3669f88a29cd61c3d47c381d52f09222a9a8 Mon Sep 17 00:00:00 2001 From: Chiran Fernando Date: Tue, 8 Aug 2023 16:18:22 +0530 Subject: [PATCH 55/67] Fix checkstyle failure --- .../test/query/CollectClauseTest.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/query/CollectClauseTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/query/CollectClauseTest.java index 0ee89b0493ef..92b310f86261 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/query/CollectClauseTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/query/CollectClauseTest.java @@ -139,11 +139,16 @@ public void testNegativeCases() { "list constructor or function invocation", 150, 42); BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected " + "'([int,int...]|record {| int n; |})', found '[int...]'", 154, 36); - BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected 'int', found '(int|error)'", 181, 17); - BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected 'int', found '(int|error)'", 186, 17); - BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected 'int', found '(int|error)'", 190, 21); - BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected 'int', found '(int|error)'", 196, 25); - BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected 'int', found '(int|error)'", 203, 25); + BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected 'int', found '(int|error)'", + 181, 17); + BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected 'int', found '(int|error)'", + 186, 17); + BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected 'int', found '(int|error)'", + 190, 21); + BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected 'int', found '(int|error)'", + 196, 25); + BAssertUtil.validateError(negativeResult, i++, "incompatible types: expected 'int', found '(int|error)'", + 203, 25); Assert.assertEquals(negativeResult.getErrorCount(), i); } } From ca1a07a270aa83bf3ddf3675ad69f5bf42e4eae7 Mon Sep 17 00:00:00 2001 From: Dulaj Date: Wed, 9 Aug 2023 16:35:52 +0530 Subject: [PATCH 56/67] Address review comments --- .../semantics/analyzer/CodeAnalyzer.java | 38 +++++++++---------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java index fedd255a3cac..62bb3b2db1d1 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java @@ -2263,7 +2263,7 @@ public void visit(BLangRecordLiteral recordLiteral, AnalyzerData data) { analyzeExpr(spreadField.expr, data); BType spreadFieldType = Types.getReferredType(spreadField.expr.getBType()); - if (spreadFieldType != null && spreadFieldType.tag == TypeTags.RECORD && isRecord) { + if (isRecord && spreadFieldType != null && spreadFieldType.tag == TypeTags.RECORD) { for (BField fieldEntry: ((BRecordType) spreadFieldType).getFields().values()) { BField matchingField = recordFields.get(fieldEntry.getName().getValue()); if (matchingField != null) { @@ -3909,23 +3909,23 @@ private void analyzeInvocationParams(BLangInvocation iExpr, AnalyzerData data) { List reqParamSymbols = invokableSymbol.params; int parameterCountForPositionalArgs = ((BInvokableType) invocableType).getParameterTypes().size(); - // data.visitedArgCount must be 0 + int visitedArgCount = 0; for (BLangExpression expr : iExpr.argExprs) { switch (expr.getKind()) { case NAMED_ARGS_EXPR: reportIfDeprecatedUsage(((BLangNamedArgsExpression) expr).varSymbol, expr, expr.pos); - data.visitedArgCount++; + visitedArgCount++; break; case REST_ARGS_EXPR: - if (data.visitedArgCount >= parameterCountForPositionalArgs) { + if (visitedArgCount >= parameterCountForPositionalArgs) { reportIfDeprecatedUsage(invokableSymbol.restParam, expr, expr.pos); } else { BLangExpression restExpr = ((BLangRestArgsExpression) expr).expr; if (restExpr.getKind() == NodeKind.LIST_CONSTRUCTOR_EXPR) { - analyzeRestArgsAgainstReqParams((BLangListConstructorExpr) restExpr, data, - reqParamSymbols, invokableSymbol.restParam); + visitedArgCount = analyzeRestArgsAgainstReqParams((BLangListConstructorExpr) restExpr, + visitedArgCount, reqParamSymbols, invokableSymbol.restParam); } else { - for (int i = data.visitedArgCount; i < parameterCountForPositionalArgs; i++) { + for (int i = visitedArgCount; i < parameterCountForPositionalArgs; i++) { if (reportIfDeprecatedUsage(reqParamSymbols.get(i), expr, expr.pos)) { break; } @@ -3934,26 +3934,24 @@ private void analyzeInvocationParams(BLangInvocation iExpr, AnalyzerData data) { } break; default: // positional args - if (data.visitedArgCount < parameterCountForPositionalArgs) { - BVarSymbol paramSymbol = reqParamSymbols.get(data.visitedArgCount); + if (visitedArgCount < parameterCountForPositionalArgs) { + BVarSymbol paramSymbol = reqParamSymbols.get(visitedArgCount); reportIfDeprecatedUsage(paramSymbol, expr, expr.pos); - if (Symbols.isFlagOn(reqParamSymbols.get(data.visitedArgCount).flags, Flags.INCLUDED)) { + if (Symbols.isFlagOn(reqParamSymbols.get(visitedArgCount).flags, Flags.INCLUDED)) { analyzeExpr(expr, data); } } else { reportIfDeprecatedUsage(invokableSymbol.restParam, expr, expr.pos); } - data.visitedArgCount++; + visitedArgCount++; } } - // Reset the visited arg count for the next invocation - data.visitedArgCount = 0; } - private void analyzeRestArgsAgainstReqParams(BLangListConstructorExpr listConstructorExpr, AnalyzerData data, + private int analyzeRestArgsAgainstReqParams(BLangListConstructorExpr listConstructorExpr, int visitedArgCount, List reqParamSymbols, BVarSymbol restParamSymbol) { for (BLangExpression expr : listConstructorExpr.exprs) { - if (data.visitedArgCount >= reqParamSymbols.size()) { + if (visitedArgCount >= reqParamSymbols.size()) { // Visiting args matching with the rest-param reportIfDeprecatedUsage(restParamSymbol, expr, expr.pos); continue; @@ -3961,20 +3959,20 @@ private void analyzeRestArgsAgainstReqParams(BLangListConstructorExpr listConstr if (expr.getKind() == NodeKind.LIST_CONSTRUCTOR_SPREAD_OP) { BLangExpression innerExpr = ((BLangListConstructorSpreadOpExpr) expr).expr; if (innerExpr.getKind() == NodeKind.LIST_CONSTRUCTOR_EXPR) { - analyzeRestArgsAgainstReqParams((BLangListConstructorExpr) innerExpr, data, + analyzeRestArgsAgainstReqParams((BLangListConstructorExpr) innerExpr, visitedArgCount, reqParamSymbols, restParamSymbol); } else { - for (int i = data.visitedArgCount; i < reqParamSymbols.size(); i++) { + for (int i = visitedArgCount; i < reqParamSymbols.size(); i++) { if (reportIfDeprecatedUsage(reqParamSymbols.get(i), expr, expr.pos)) { break; } } } } else { - reportIfDeprecatedUsage(reqParamSymbols.get(data.visitedArgCount++), expr, expr.pos); + reportIfDeprecatedUsage(reqParamSymbols.get(visitedArgCount++), expr, expr.pos); } } - + return visitedArgCount; } private void validateModuleInitFunction(BLangFunction funcNode) { @@ -4318,7 +4316,5 @@ public static class AnalyzerData { Stack> returnTypes = new Stack<>(); Stack> errorTypes = new Stack<>(); DefaultValueState defaultValueState = DefaultValueState.NOT_IN_DEFAULT_VALUE; - // Field related to args and params - int visitedArgCount = 0; } } From 59a338d22746039715b81c28715e0c37730351f3 Mon Sep 17 00:00:00 2001 From: Dulaj Date: Thu, 10 Aug 2023 08:34:50 +0530 Subject: [PATCH 57/67] Address review comments --- .../compiler/semantics/analyzer/CodeAnalyzer.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java index 62bb3b2db1d1..3f6aab44a5dd 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java @@ -2627,7 +2627,7 @@ private void logDeprecatedWarningForInvocation(BLangInvocation invocationExpr) { private String generateDeprecatedConstructString(BLangExpression expr, String fieldOrMethodName, BSymbol symbol) { BType bType = expr.getBType(); - if (bType != null && bType.tag == TypeTags.TYPEREFDESC) { + if (bType.tag == TypeTags.TYPEREFDESC) { return bType + "." + fieldOrMethodName; } @@ -3956,14 +3956,15 @@ private int analyzeRestArgsAgainstReqParams(BLangListConstructorExpr listConstru reportIfDeprecatedUsage(restParamSymbol, expr, expr.pos); continue; } + if (expr.getKind() == NodeKind.LIST_CONSTRUCTOR_SPREAD_OP) { BLangExpression innerExpr = ((BLangListConstructorSpreadOpExpr) expr).expr; if (innerExpr.getKind() == NodeKind.LIST_CONSTRUCTOR_EXPR) { - analyzeRestArgsAgainstReqParams((BLangListConstructorExpr) innerExpr, visitedArgCount, - reqParamSymbols, restParamSymbol); + visitedArgCount = analyzeRestArgsAgainstReqParams((BLangListConstructorExpr) innerExpr, + visitedArgCount, reqParamSymbols, restParamSymbol); } else { for (int i = visitedArgCount; i < reqParamSymbols.size(); i++) { - if (reportIfDeprecatedUsage(reqParamSymbols.get(i), expr, expr.pos)) { + if (reportIfDeprecatedUsage(reqParamSymbols.get(i), innerExpr, innerExpr.pos)) { break; } } From 49f8e545cfd1dd37ba1c772e23721b31a4afdd42 Mon Sep 17 00:00:00 2001 From: Dulaj Date: Thu, 10 Aug 2023 14:16:25 +0530 Subject: [PATCH 58/67] Remove null check for type --- .../ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java index 3f6aab44a5dd..298d9705daba 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java @@ -2631,7 +2631,7 @@ private String generateDeprecatedConstructString(BLangExpression expr, String fi return bType + "." + fieldOrMethodName; } - if (bType != null && bType.tag == TypeTags.OBJECT) { + if (bType.tag == TypeTags.OBJECT) { BObjectType objectType = (BObjectType) bType; // for anonymous objects, only the field name will be in the error msg if (objectType.classDef == null || objectType.classDef.internal == false) { From 5b69400a3701b7495f20265535791cf735433810 Mon Sep 17 00:00:00 2001 From: kavindu Date: Thu, 10 Aug 2023 15:38:20 +0530 Subject: [PATCH 59/67] Change logic to resolve module seperated by dot --- .../AddModuleToBallerinaTomlCodeAction.java | 45 ++++++++++++------- ...ddModuleToBallerinaTomlCodeActionTest.java | 10 ++++- .../config/add_module10.json | 29 ++++++++++++ .../config/add_module4.json | 29 ++++++++++++ .../config/add_module5.json | 29 ++++++++++++ .../config/add_module6.json | 29 ++++++++++++ .../config/add_module7.json | 29 ++++++++++++ .../config/add_module8.json | 29 ++++++++++++ .../config/add_module9.json | 29 ++++++++++++ .../source/testproject10/Ballerina.toml | 7 +++ .../source/testproject10/main.bal | 5 +++ .../source/testproject11/Ballerina.toml | 7 +++ .../source/testproject11/main.bal | 5 +++ .../source/testproject12/Ballerina.toml | 7 +++ .../source/testproject12/main.bal | 5 +++ .../source/testproject6/Ballerina.toml | 7 +++ .../source/testproject6/main.bal | 5 +++ .../source/testproject7/Ballerina.toml | 7 +++ .../source/testproject7/main.bal | 5 +++ .../source/testproject8/Ballerina.toml | 7 +++ .../source/testproject8/main.bal | 5 +++ .../source/testproject9/Ballerina.toml | 7 +++ .../source/testproject9/main.bal | 5 +++ .../local_projects/x.y/Ballerina.toml | 8 ++++ .../resources/local_projects/x.y/main.bal | 5 +++ .../local_projects/x.y/modules/mod1/mod1.bal | 10 +++++ .../resources/local_projects/x/Ballerina.toml | 8 ++++ .../test/resources/local_projects/x/main.bal | 5 +++ .../local_projects/x/modules/y/y.bal | 10 +++++ 29 files changed, 372 insertions(+), 16 deletions(-) create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module10.json create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module4.json create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module5.json create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module6.json create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module7.json create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module8.json create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module9.json create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject10/Ballerina.toml create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject10/main.bal create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject11/Ballerina.toml create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject11/main.bal create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject12/Ballerina.toml create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject12/main.bal create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject6/Ballerina.toml create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject6/main.bal create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject7/Ballerina.toml create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject7/main.bal create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject8/Ballerina.toml create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject8/main.bal create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject9/Ballerina.toml create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject9/main.bal create mode 100644 language-server/modules/langserver-core/src/test/resources/local_projects/x.y/Ballerina.toml create mode 100644 language-server/modules/langserver-core/src/test/resources/local_projects/x.y/main.bal create mode 100644 language-server/modules/langserver-core/src/test/resources/local_projects/x.y/modules/mod1/mod1.bal create mode 100644 language-server/modules/langserver-core/src/test/resources/local_projects/x/Ballerina.toml create mode 100644 language-server/modules/langserver-core/src/test/resources/local_projects/x/main.bal create mode 100644 language-server/modules/langserver-core/src/test/resources/local_projects/x/modules/y/y.bal diff --git a/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/AddModuleToBallerinaTomlCodeAction.java b/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/AddModuleToBallerinaTomlCodeAction.java index 5c4bc0b7bde1..44f1f044644b 100644 --- a/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/AddModuleToBallerinaTomlCodeAction.java +++ b/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/AddModuleToBallerinaTomlCodeAction.java @@ -87,35 +87,50 @@ public List getCodeActions(Diagnostic diagnostic, return Collections.emptyList(); } - String orgName; - String pkgName; - String[] orgNameAndRest = msg.get().split("/"); - if (orgNameAndRest.length == 2) { - orgName = orgNameAndRest[0]; - String[] pkgNameAndRest = orgNameAndRest[1].split("\\."); - if (pkgNameAndRest.length == 0) { - return Collections.emptyList(); - } - pkgName = pkgNameAndRest[0]; - } else { + // Consider orgname empty case + String[] orgAndRest = msg.get().split("/"); + if (orgAndRest.length != 2) { return Collections.emptyList(); } - - List loadedPackageVersions = getAvailablePackageVersionsFromLocalRepo( - LSPackageLoader.getInstance(context.languageServercontext()), project.get(), orgName, pkgName); + String org = orgAndRest[0]; + String[] moduleAndPrefix = orgAndRest[1].split(" as "); + List loadedPackageVersions = new ArrayList<>(); + String pkg = getPkgAndVersions(LSPackageLoader.getInstance(context.languageServercontext()), project.get(), + org, moduleAndPrefix[0], loadedPackageVersions); if (loadedPackageVersions.isEmpty()) { return Collections.emptyList(); } Position dependencyStart = new Position(getDependencyStartLine(toml.get()), 0); String dependency = String.format("[[dependency]]%norg = \"%s\"%nname = \"%s\"%nversion = " + - "\"%s\"%nrepository = \"local\"%n%n", orgName, pkgName, getLatestVersion(loadedPackageVersions)); + "\"%s\"%nrepository = \"local\"%n%n", org, pkg, getLatestVersion(loadedPackageVersions)); TextEdit textEdit = new TextEdit(new Range(dependencyStart, dependencyStart), dependency); CodeAction action = CodeActionUtil.createCodeAction(CommandConstants.ADD_MODULE_TO_BALLERINA_TOML, List.of(textEdit), project.get().sourceRoot().resolve(ProjectConstants.BALLERINA_TOML).toString(), CodeActionKind.QuickFix); return Collections.singletonList(action); } + + private String getPkgAndVersions(LSPackageLoader lsPackageLoader, Project project, String org, + String moduleWithPkg, List versions) { + String names = moduleWithPkg; + while (true) { + int i = names.lastIndexOf("."); + if (i == -1) { + versions.addAll(getAvailablePackageVersionsFromLocalRepo(lsPackageLoader, project, org, names)); + if (!versions.isEmpty()) { + return names; + } + versions.addAll(getAvailablePackageVersionsFromLocalRepo(lsPackageLoader, project, org, moduleWithPkg)); + return moduleWithPkg; + } + names = names.substring(0, i); + versions.addAll(getAvailablePackageVersionsFromLocalRepo(lsPackageLoader, project, org, names)); + if (!versions.isEmpty()) { + return names; + } + } + } @Override public String getName() { diff --git a/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/AddModuleToBallerinaTomlCodeActionTest.java b/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/AddModuleToBallerinaTomlCodeActionTest.java index c65bb41f5a19..00f51a2685f3 100644 --- a/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/AddModuleToBallerinaTomlCodeActionTest.java +++ b/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/AddModuleToBallerinaTomlCodeActionTest.java @@ -59,7 +59,8 @@ public void setup() { BallerinaLanguageServer languageServer = new BallerinaLanguageServer(); Endpoint endpoint = TestUtil.initializeLanguageSever(languageServer); try { - Map localProjects = Map.of("pkg1", "main.bal", "pkg2", "main.bal"); + Map localProjects = Map.of("pkg1", "main.bal", "pkg2", "main.bal", "x", "main.bal", + "x.y", "main.bal"); List localPackages = getLocalPackages(localProjects, languageServer.getWorkspaceManager(), context).stream().map(LSPackageLoader.ModuleInfo::new) .collect(Collectors.toList()); @@ -84,6 +85,13 @@ public Object[][] dataProvider() { {"add_module1.json"}, {"add_module2.json"}, {"add_module3.json"}, + {"add_module4.json"}, + {"add_module5.json"}, + {"add_module6.json"}, + {"add_module7.json"}, + {"add_module8.json"}, + {"add_module9.json"}, + {"add_module10.json"}, }; } diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module10.json b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module10.json new file mode 100644 index 000000000000..c49f60b5b685 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module10.json @@ -0,0 +1,29 @@ +{ + "position": { + "line": 0, + "character": 31 + }, + "source": "testproject12/main.bal", + "expected": [ + { + "title": "Add module to Ballerina.toml", + "kind": "quickfix", + "edits": [ + { + "range": { + "start": { + "line": 5, + "character": 0 + }, + "end": { + "line": 5, + "character": 0 + } + }, + "newText": "[[dependency]]\norg = \"ballerina\"\nname = \"x.y\"\nversion = \"0.1.0\"\nrepository = \"local\"\n\n" + } + ], + "resolvable": false + } + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module4.json b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module4.json new file mode 100644 index 000000000000..502ea449d1d4 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module4.json @@ -0,0 +1,29 @@ +{ + "position": { + "line": 0, + "character": 16 + }, + "source": "testproject6/main.bal", + "expected": [ + { + "title": "Add module to Ballerina.toml", + "kind": "quickfix", + "edits": [ + { + "range": { + "start": { + "line": 5, + "character": 0 + }, + "end": { + "line": 5, + "character": 0 + } + }, + "newText": "[[dependency]]\norg = \"ballerina\"\nname = \"x\"\nversion = \"0.1.0\"\nrepository = \"local\"\n\n" + } + ], + "resolvable": false + } + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module5.json b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module5.json new file mode 100644 index 000000000000..771bdbecd4dd --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module5.json @@ -0,0 +1,29 @@ +{ + "position": { + "line": 0, + "character": 16 + }, + "source": "testproject7/main.bal", + "expected": [ + { + "title": "Add module to Ballerina.toml", + "kind": "quickfix", + "edits": [ + { + "range": { + "start": { + "line": 5, + "character": 0 + }, + "end": { + "line": 5, + "character": 0 + } + }, + "newText": "[[dependency]]\norg = \"ballerina\"\nname = \"x\"\nversion = \"0.1.0\"\nrepository = \"local\"\n\n" + } + ], + "resolvable": false + } + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module6.json b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module6.json new file mode 100644 index 000000000000..81f758442db2 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module6.json @@ -0,0 +1,29 @@ +{ + "position": { + "line": 0, + "character": 16 + }, + "source": "testproject8/main.bal", + "expected": [ + { + "title": "Add module to Ballerina.toml", + "kind": "quickfix", + "edits": [ + { + "range": { + "start": { + "line": 5, + "character": 0 + }, + "end": { + "line": 5, + "character": 0 + } + }, + "newText": "[[dependency]]\norg = \"ballerina\"\nname = \"x\"\nversion = \"0.1.0\"\nrepository = \"local\"\n\n" + } + ], + "resolvable": false + } + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module7.json b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module7.json new file mode 100644 index 000000000000..4f30ea142c84 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module7.json @@ -0,0 +1,29 @@ +{ + "position": { + "line": 0, + "character": 16 + }, + "source": "testproject9/main.bal", + "expected": [ + { + "title": "Add module to Ballerina.toml", + "kind": "quickfix", + "edits": [ + { + "range": { + "start": { + "line": 5, + "character": 0 + }, + "end": { + "line": 5, + "character": 0 + } + }, + "newText": "[[dependency]]\norg = \"ballerina\"\nname = \"x\"\nversion = \"0.1.0\"\nrepository = \"local\"\n\n" + } + ], + "resolvable": false + } + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module8.json b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module8.json new file mode 100644 index 000000000000..9d4b7140b5ca --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module8.json @@ -0,0 +1,29 @@ +{ + "position": { + "line": 0, + "character": 16 + }, + "source": "testproject10/main.bal", + "expected": [ + { + "title": "Add module to Ballerina.toml", + "kind": "quickfix", + "edits": [ + { + "range": { + "start": { + "line": 5, + "character": 0 + }, + "end": { + "line": 5, + "character": 0 + } + }, + "newText": "[[dependency]]\norg = \"ballerina\"\nname = \"x.y\"\nversion = \"0.1.0\"\nrepository = \"local\"\n\n" + } + ], + "resolvable": false + } + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module9.json b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module9.json new file mode 100644 index 000000000000..2468c73400e1 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/config/add_module9.json @@ -0,0 +1,29 @@ +{ + "position": { + "line": 0, + "character": 31 + }, + "source": "testproject11/main.bal", + "expected": [ + { + "title": "Add module to Ballerina.toml", + "kind": "quickfix", + "edits": [ + { + "range": { + "start": { + "line": 5, + "character": 0 + }, + "end": { + "line": 5, + "character": 0 + } + }, + "newText": "[[dependency]]\norg = \"ballerina\"\nname = \"x.y\"\nversion = \"0.1.0\"\nrepository = \"local\"\n\n" + } + ], + "resolvable": false + } + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject10/Ballerina.toml b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject10/Ballerina.toml new file mode 100644 index 000000000000..9e51f8993a35 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject10/Ballerina.toml @@ -0,0 +1,7 @@ +[package] +org = "lstest" +name = "testproject" +version = "0.1.0" + +[build-options] +observabilityIncluded = false diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject10/main.bal b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject10/main.bal new file mode 100644 index 000000000000..5c19c388b5b4 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject10/main.bal @@ -0,0 +1,5 @@ +import ballerina/x.y.mod1 + +public function main() { + +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject11/Ballerina.toml b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject11/Ballerina.toml new file mode 100644 index 000000000000..9e51f8993a35 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject11/Ballerina.toml @@ -0,0 +1,7 @@ +[package] +org = "lstest" +name = "testproject" +version = "0.1.0" + +[build-options] +observabilityIncluded = false diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject11/main.bal b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject11/main.bal new file mode 100644 index 000000000000..19769fda7c88 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject11/main.bal @@ -0,0 +1,5 @@ +import ballerina/x.y.mod1 as mod1; + +public function main() { + +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject12/Ballerina.toml b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject12/Ballerina.toml new file mode 100644 index 000000000000..9e51f8993a35 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject12/Ballerina.toml @@ -0,0 +1,7 @@ +[package] +org = "lstest" +name = "testproject" +version = "0.1.0" + +[build-options] +observabilityIncluded = false diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject12/main.bal b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject12/main.bal new file mode 100644 index 000000000000..bd7815675591 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject12/main.bal @@ -0,0 +1,5 @@ +import ballerina/x.y.mod as mod1; + +public function main() { + +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject6/Ballerina.toml b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject6/Ballerina.toml new file mode 100644 index 000000000000..9e51f8993a35 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject6/Ballerina.toml @@ -0,0 +1,7 @@ +[package] +org = "lstest" +name = "testproject" +version = "0.1.0" + +[build-options] +observabilityIncluded = false diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject6/main.bal b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject6/main.bal new file mode 100644 index 000000000000..9ee208d30a84 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject6/main.bal @@ -0,0 +1,5 @@ +import ballerina/x; + +public function main() { + +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject7/Ballerina.toml b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject7/Ballerina.toml new file mode 100644 index 000000000000..9e51f8993a35 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject7/Ballerina.toml @@ -0,0 +1,7 @@ +[package] +org = "lstest" +name = "testproject" +version = "0.1.0" + +[build-options] +observabilityIncluded = false diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject7/main.bal b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject7/main.bal new file mode 100644 index 000000000000..1bb010d3a305 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject7/main.bal @@ -0,0 +1,5 @@ +import ballerina/x.y; + +public function main() { + +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject8/Ballerina.toml b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject8/Ballerina.toml new file mode 100644 index 000000000000..9e51f8993a35 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject8/Ballerina.toml @@ -0,0 +1,7 @@ +[package] +org = "lstest" +name = "testproject" +version = "0.1.0" + +[build-options] +observabilityIncluded = false diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject8/main.bal b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject8/main.bal new file mode 100644 index 000000000000..a85e7f4fb8d2 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject8/main.bal @@ -0,0 +1,5 @@ +import ballerina/x.y as + +public function main() { + +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject9/Ballerina.toml b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject9/Ballerina.toml new file mode 100644 index 000000000000..9e51f8993a35 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject9/Ballerina.toml @@ -0,0 +1,7 @@ +[package] +org = "lstest" +name = "testproject" +version = "0.1.0" + +[build-options] +observabilityIncluded = false diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject9/main.bal b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject9/main.bal new file mode 100644 index 000000000000..712d9bead5aa --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/add-module-ballerina-toml/source/testproject9/main.bal @@ -0,0 +1,5 @@ +import ballerina/x.y a y + +public function main() { + +} diff --git a/language-server/modules/langserver-core/src/test/resources/local_projects/x.y/Ballerina.toml b/language-server/modules/langserver-core/src/test/resources/local_projects/x.y/Ballerina.toml new file mode 100644 index 000000000000..76e73ce69c19 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/local_projects/x.y/Ballerina.toml @@ -0,0 +1,8 @@ +[package] +org = "ballerina" +name = "x.y" +version = "0.1.0" +distribution = "2201.7.0" + +[build-options] +observabilityIncluded = false diff --git a/language-server/modules/langserver-core/src/test/resources/local_projects/x.y/main.bal b/language-server/modules/langserver-core/src/test/resources/local_projects/x.y/main.bal new file mode 100644 index 000000000000..31e8785bf98f --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/local_projects/x.y/main.bal @@ -0,0 +1,5 @@ +import ballerina/io; + +public function main() { + io:println("Hello, World!"); +} diff --git a/language-server/modules/langserver-core/src/test/resources/local_projects/x.y/modules/mod1/mod1.bal b/language-server/modules/langserver-core/src/test/resources/local_projects/x.y/modules/mod1/mod1.bal new file mode 100644 index 000000000000..7a0681e5344c --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/local_projects/x.y/modules/mod1/mod1.bal @@ -0,0 +1,10 @@ +# Returns the string `Hello` with the input string name. +# +# + name - name as a string +# + return - "Hello, " with the input string name +public function hello(string name) returns string { + if !(name is "") { + return "Hello, " + name; + } + return "Hello, World!"; +} diff --git a/language-server/modules/langserver-core/src/test/resources/local_projects/x/Ballerina.toml b/language-server/modules/langserver-core/src/test/resources/local_projects/x/Ballerina.toml new file mode 100644 index 000000000000..723de2889bb8 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/local_projects/x/Ballerina.toml @@ -0,0 +1,8 @@ +[package] +org = "ballerina" +name = "x" +version = "0.1.0" +distribution = "2201.7.0" + +[build-options] +observabilityIncluded = false diff --git a/language-server/modules/langserver-core/src/test/resources/local_projects/x/main.bal b/language-server/modules/langserver-core/src/test/resources/local_projects/x/main.bal new file mode 100644 index 000000000000..31e8785bf98f --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/local_projects/x/main.bal @@ -0,0 +1,5 @@ +import ballerina/io; + +public function main() { + io:println("Hello, World!"); +} diff --git a/language-server/modules/langserver-core/src/test/resources/local_projects/x/modules/y/y.bal b/language-server/modules/langserver-core/src/test/resources/local_projects/x/modules/y/y.bal new file mode 100644 index 000000000000..7a0681e5344c --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/local_projects/x/modules/y/y.bal @@ -0,0 +1,10 @@ +# Returns the string `Hello` with the input string name. +# +# + name - name as a string +# + return - "Hello, " with the input string name +public function hello(string name) returns string { + if !(name is "") { + return "Hello, " + name; + } + return "Hello, World!"; +} From 5dc67645e9b92f1cf65a61a93c06bc35fb94262a Mon Sep 17 00:00:00 2001 From: Dulaj Date: Fri, 11 Aug 2023 08:43:46 +0530 Subject: [PATCH 60/67] Reduce indentation by adding continue; --- .../semantics/analyzer/CodeAnalyzer.java | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java index 298d9705daba..45f0b0734db4 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java @@ -3919,18 +3919,18 @@ private void analyzeInvocationParams(BLangInvocation iExpr, AnalyzerData data) { case REST_ARGS_EXPR: if (visitedArgCount >= parameterCountForPositionalArgs) { reportIfDeprecatedUsage(invokableSymbol.restParam, expr, expr.pos); - } else { - BLangExpression restExpr = ((BLangRestArgsExpression) expr).expr; - if (restExpr.getKind() == NodeKind.LIST_CONSTRUCTOR_EXPR) { - visitedArgCount = analyzeRestArgsAgainstReqParams((BLangListConstructorExpr) restExpr, - visitedArgCount, reqParamSymbols, invokableSymbol.restParam); - } else { - for (int i = visitedArgCount; i < parameterCountForPositionalArgs; i++) { - if (reportIfDeprecatedUsage(reqParamSymbols.get(i), expr, expr.pos)) { - break; - } - } - } + continue; + } + + BLangExpression restExpr = ((BLangRestArgsExpression) expr).expr; + if (restExpr.getKind() == NodeKind.LIST_CONSTRUCTOR_EXPR) { + visitedArgCount = analyzeRestArgsAgainstReqParams((BLangListConstructorExpr) restExpr, + visitedArgCount, reqParamSymbols, invokableSymbol.restParam); + continue; + } + + for (int i = visitedArgCount; i < parameterCountForPositionalArgs; i++) { + reportIfDeprecatedUsage(reqParamSymbols.get(i), expr, expr.pos); } break; default: // positional args @@ -3957,20 +3957,20 @@ private int analyzeRestArgsAgainstReqParams(BLangListConstructorExpr listConstru continue; } - if (expr.getKind() == NodeKind.LIST_CONSTRUCTOR_SPREAD_OP) { - BLangExpression innerExpr = ((BLangListConstructorSpreadOpExpr) expr).expr; - if (innerExpr.getKind() == NodeKind.LIST_CONSTRUCTOR_EXPR) { - visitedArgCount = analyzeRestArgsAgainstReqParams((BLangListConstructorExpr) innerExpr, - visitedArgCount, reqParamSymbols, restParamSymbol); - } else { - for (int i = visitedArgCount; i < reqParamSymbols.size(); i++) { - if (reportIfDeprecatedUsage(reqParamSymbols.get(i), innerExpr, innerExpr.pos)) { - break; - } - } - } - } else { + if (expr.getKind() != NodeKind.LIST_CONSTRUCTOR_SPREAD_OP) { reportIfDeprecatedUsage(reqParamSymbols.get(visitedArgCount++), expr, expr.pos); + continue; + } + + BLangExpression innerExpr = ((BLangListConstructorSpreadOpExpr) expr).expr; + if (innerExpr.getKind() == NodeKind.LIST_CONSTRUCTOR_EXPR) { + visitedArgCount = analyzeRestArgsAgainstReqParams((BLangListConstructorExpr) innerExpr, + visitedArgCount, reqParamSymbols, restParamSymbol); + continue; + } + + for (int i = visitedArgCount; i < reqParamSymbols.size(); i++) { + reportIfDeprecatedUsage(reqParamSymbols.get(i), innerExpr, innerExpr.pos); } } return visitedArgCount; From 8d59e783a84e94ac5a91d5e2c3079897af79ef00 Mon Sep 17 00:00:00 2001 From: malinthar Date: Fri, 11 Aug 2023 10:49:32 +0530 Subject: [PATCH 61/67] Fix failing tests --- .../module_var_context/config/config20.json | 40 +++++++++--------- .../module_var_context/config/config21.json | 40 +++++++++--------- .../record_type_desc/config/config15.json | 41 ++++++++++--------- 3 files changed, 61 insertions(+), 60 deletions(-) diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config20.json b/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config20.json index 5887e56a4a1e..665b2029ef6f 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config20.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config20.json @@ -192,11 +192,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -216,11 +216,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -240,11 +240,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -264,11 +264,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -288,11 +288,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -312,11 +312,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -336,11 +336,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -360,11 +360,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -384,11 +384,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -408,11 +408,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config21.json b/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config21.json index af34fc9ae6fd..71134fe1c96a 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config21.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/module_var_context/config/config21.json @@ -192,11 +192,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -216,11 +216,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -240,11 +240,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -264,11 +264,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -288,11 +288,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -312,11 +312,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -336,11 +336,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -360,11 +360,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -384,11 +384,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -408,11 +408,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, diff --git a/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config15.json b/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config15.json index b7cc81d8983d..839d2a95ded8 100644 --- a/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config15.json +++ b/language-server/modules/langserver-core/src/test/resources/completion/record_type_desc/config/config15.json @@ -4,6 +4,7 @@ "character": 5 }, "source": "record_type_desc/source/source15.bal", + "description": "", "items": [ { "label": "StrandData", @@ -199,11 +200,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -223,11 +224,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -247,11 +248,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -271,11 +272,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -295,11 +296,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -319,11 +320,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -343,11 +344,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -367,11 +368,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -391,11 +392,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, @@ -415,11 +416,11 @@ { "range": { "start": { - "line": 0, + "line": 1, "character": 0 }, "end": { - "line": 0, + "line": 1, "character": 0 } }, From 77b09bb44c82c93c50959de2356ac567bf939c0b Mon Sep 17 00:00:00 2001 From: LakshanWeerasinghe Date: Wed, 19 Jul 2023 09:38:51 +0530 Subject: [PATCH 62/67] Fix field name resolving for immutable record type --- .../compiler/util/TypeDefBuilderHelper.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/util/TypeDefBuilderHelper.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/util/TypeDefBuilderHelper.java index 1f4ecde6dc7f..6f5627115351 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/util/TypeDefBuilderHelper.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/util/TypeDefBuilderHelper.java @@ -331,12 +331,13 @@ public static void populateStructureFields(Types types, SymbolTable symTable, fieldType = origField.type; } - Name origFieldName = origField.name; + Name origFieldName = origField.symbol.originalName; + Name fieldName = origField.name; BVarSymbol fieldSymbol; BType referredType = Types.getReferredType(fieldType); if (referredType.tag == TypeTags.INVOKABLE && referredType.tsymbol != null) { fieldSymbol = new BInvokableSymbol(origField.symbol.tag, origField.symbol.flags | flag, - origFieldName, pkgID, fieldType, + fieldName, origFieldName, pkgID, fieldType, structureSymbol, origField.symbol.pos, SOURCE); BInvokableTypeSymbol tsymbol = (BInvokableTypeSymbol) referredType.tsymbol; BInvokableSymbol invokableSymbol = (BInvokableSymbol) fieldSymbol; @@ -347,16 +348,16 @@ public static void populateStructureFields(Types types, SymbolTable symTable, } else if (fieldType == symTable.semanticError) { // Can only happen for records. fieldSymbol = new BVarSymbol(origField.symbol.flags | flag | Flags.OPTIONAL, - origFieldName, pkgID, symTable.neverType, + fieldName, origFieldName, pkgID, symTable.neverType, structureSymbol, origField.symbol.pos, SOURCE); } else { - fieldSymbol = new BVarSymbol(origField.symbol.flags | flag, origFieldName, pkgID, + fieldSymbol = new BVarSymbol(origField.symbol.flags | flag, fieldName, origFieldName, pkgID, fieldType, structureSymbol, origField.symbol.pos, SOURCE); } - String nameString = origFieldName.value; - fields.put(nameString, new BField(origFieldName, null, fieldSymbol)); - structureSymbol.scope.define(origFieldName, fieldSymbol); + String nameString = fieldName.value; + fields.put(nameString, new BField(fieldName, null, fieldSymbol)); + structureSymbol.scope.define(fieldName, fieldSymbol); } structureType.fields = fields; From 0139a96fee33da09cafd86aacd1d9eb6a8e4a6b9 Mon Sep 17 00:00:00 2001 From: LakshanWeerasinghe Date: Wed, 19 Jul 2023 10:17:25 +0530 Subject: [PATCH 63/67] Fix find exisiting record fields in RecordUtil --- .../org/ballerinalang/langserver/common/utils/RecordUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/common/utils/RecordUtil.java b/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/common/utils/RecordUtil.java index 6613f3eb1ab0..87b34cf25f81 100644 --- a/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/common/utils/RecordUtil.java +++ b/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/common/utils/RecordUtil.java @@ -186,7 +186,7 @@ public static String getFillAllRecordFieldInsertText(Map getRecordFields(RawTypeSymbolWrapper wrapper, List existingFields) { return wrapper.getRawType().fieldDescriptors().entrySet().stream() - .filter(e -> !existingFields.contains(e.getKey())) + .filter(e -> !existingFields.contains(e.getValue().getName().get())) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); } From 9ed5f105cce88ab0994e9cbcac2a89bfcded734a Mon Sep 17 00:00:00 2001 From: LakshanWeerasinghe Date: Wed, 19 Jul 2023 10:45:59 +0530 Subject: [PATCH 64/67] Add tests for fill record field code action --- .../FillRecordFieldsCodeActionTest.java | 7 ++++- .../config/fill_record_fields_config19.json | 30 +++++++++++++++++++ .../config/fill_record_fields_config20.json | 30 +++++++++++++++++++ .../config/fill_record_fields_config21.json | 30 +++++++++++++++++++ .../config/fill_record_fields_config22.json | 30 +++++++++++++++++++ .../config/fill_record_fields_config23.json | 30 +++++++++++++++++++ .../source/fill_record_fields_source16.bal | 29 ++++++++++++++++++ 7 files changed, 185 insertions(+), 1 deletion(-) create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/config/fill_record_fields_config19.json create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/config/fill_record_fields_config20.json create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/config/fill_record_fields_config21.json create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/config/fill_record_fields_config22.json create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/config/fill_record_fields_config23.json create mode 100644 language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/source/fill_record_fields_source16.bal diff --git a/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/FillRecordFieldsCodeActionTest.java b/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/FillRecordFieldsCodeActionTest.java index 98f02334e2d1..08a45f146364 100644 --- a/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/FillRecordFieldsCodeActionTest.java +++ b/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/FillRecordFieldsCodeActionTest.java @@ -59,7 +59,12 @@ public Object[][] dataProvider() { {"fill_record_fields_config15.json"}, {"fill_record_fields_config16.json"}, {"fill_record_fields_config17.json"}, - {"fill_record_fields_config18.json"} + {"fill_record_fields_config18.json"}, + {"fill_record_fields_config19.json"}, + {"fill_record_fields_config20.json"}, + {"fill_record_fields_config21.json"}, + {"fill_record_fields_config22.json"}, + {"fill_record_fields_config23.json"} }; } } diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/config/fill_record_fields_config19.json b/language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/config/fill_record_fields_config19.json new file mode 100644 index 000000000000..33bb1d5aa158 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/config/fill_record_fields_config19.json @@ -0,0 +1,30 @@ +{ + "position": { + "line": 16, + "character": 27 + }, + "source": "fill_record_fields_source16.bal", + "description": "Fill record fields in object field", + "expected": [ + { + "title": "Fill 'Foo' required fields", + "kind": "quickfix", + "edits": [ + { + "range": { + "start": { + "line": 16, + "character": 27 + }, + "end": { + "line": 16, + "character": 27 + } + }, + "newText": ",id: 0" + } + ], + "resolvable": false + } + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/config/fill_record_fields_config20.json b/language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/config/fill_record_fields_config20.json new file mode 100644 index 000000000000..7cc091c592b1 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/config/fill_record_fields_config20.json @@ -0,0 +1,30 @@ +{ + "position": { + "line": 18, + "character": 27 + }, + "source": "fill_record_fields_source16.bal", + "description": "Fill record fields in object field", + "expected": [ + { + "title": "Fill 'Bar' required fields", + "kind": "quickfix", + "edits": [ + { + "range": { + "start": { + "line": 18, + "character": 27 + }, + "end": { + "line": 18, + "character": 27 + } + }, + "newText": ",id: 0" + } + ], + "resolvable": false + } + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/config/fill_record_fields_config21.json b/language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/config/fill_record_fields_config21.json new file mode 100644 index 000000000000..fa7b5540e5e9 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/config/fill_record_fields_config21.json @@ -0,0 +1,30 @@ +{ + "position": { + "line": 20, + "character": 27 + }, + "source": "fill_record_fields_source16.bal", + "description": "Fill record fields in object field", + "expected": [ + { + "title": "Fill 'Baz' required fields", + "kind": "quickfix", + "edits": [ + { + "range": { + "start": { + "line": 20, + "character": 27 + }, + "end": { + "line": 20, + "character": 27 + } + }, + "newText": ",id: 0" + } + ], + "resolvable": false + } + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/config/fill_record_fields_config22.json b/language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/config/fill_record_fields_config22.json new file mode 100644 index 000000000000..ae13570a40f8 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/config/fill_record_fields_config22.json @@ -0,0 +1,30 @@ +{ + "position": { + "line": 22, + "character": 46 + }, + "source": "fill_record_fields_source16.bal", + "description": "Fill record fields in object field", + "expected": [ + { + "title": "Fill 'record {|readonly string 'type; readonly int id; anydata & readonly...;|}' required fields", + "kind": "quickfix", + "edits": [ + { + "range": { + "start": { + "line": 22, + "character": 46 + }, + "end": { + "line": 22, + "character": 46 + } + }, + "newText": ",id: 0" + } + ], + "resolvable": false + } + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/config/fill_record_fields_config23.json b/language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/config/fill_record_fields_config23.json new file mode 100644 index 000000000000..7ec91e60b3c1 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/config/fill_record_fields_config23.json @@ -0,0 +1,30 @@ +{ + "position": { + "line": 27, + "character": 45 + }, + "source": "fill_record_fields_source16.bal", + "description": "Fill record fields in object field", + "expected": [ + { + "title": "Fill 'record {|readonly string 'type; readonly int id; anydata & readonly...;|}' required fields", + "kind": "quickfix", + "edits": [ + { + "range": { + "start": { + "line": 27, + "character": 45 + }, + "end": { + "line": 27, + "character": 45 + } + }, + "newText": ",id: 0" + } + ], + "resolvable": false + } + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/source/fill_record_fields_source16.bal b/language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/source/fill_record_fields_source16.bal new file mode 100644 index 000000000000..9832377fd6f3 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/codeaction/fill-record-fields/source/fill_record_fields_source16.bal @@ -0,0 +1,29 @@ +type Foo record { + string 'type; + int id; +}; + +type Bar readonly & record { + string 'type; + int id; +}; + +type Baz record { + readonly string 'type; + int id; +}; + +function testFillRecordFields() { + Foo foo = {'type: "foo"}; + + Bar bar = {'type: "bar"}; + + Baz baz = {'type: "baz"}; + + Foo & readonly fooReadonly = {'type: "foo"}; + + record { + string 'type; + int id; + } & readonly fooReadonly2 = {'type: "foo"}; +} From cc5e506102da5a69c7bfa3178d82cfa60ab59462 Mon Sep 17 00:00:00 2001 From: LakshanWeerasinghe Date: Wed, 9 Aug 2023 15:15:10 +0530 Subject: [PATCH 65/67] Add tests for fill record field completions --- ...mapping_constructor_expr_ctx_config10.json | 36 +++++++++++++++++++ ...mapping_constructor_expr_ctx_config11.json | 36 +++++++++++++++++++ ...mapping_constructor_expr_ctx_config12.json | 36 +++++++++++++++++++ ...mapping_constructor_expr_ctx_config13.json | 36 +++++++++++++++++++ ...mapping_constructor_expr_ctx_config14.json | 36 +++++++++++++++++++ .../mapping_constructor_expr_ctx_config9.json | 36 +++++++++++++++++++ .../mapping_constructor_expr_ctx_source8.bal | 33 +++++++++++++++++ 7 files changed, 249 insertions(+) create mode 100644 language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config10.json create mode 100644 language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config11.json create mode 100644 language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config12.json create mode 100644 language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config13.json create mode 100644 language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config14.json create mode 100644 language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config9.json create mode 100644 language-server/modules/langserver-core/src/test/resources/completion/expression_context/source/mapping_constructor_expr_ctx_source8.bal diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config10.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config10.json new file mode 100644 index 000000000000..2c4ea2562919 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config10.json @@ -0,0 +1,36 @@ +{ + "position": { + "line": 20, + "character": 28 + }, + "source": "expression_context/source/mapping_constructor_expr_ctx_source8.bal", + "description": "", + "items": [ + { + "label": "readonly", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "U", + "filterText": "readonly", + "insertText": "readonly ", + "insertTextFormat": "Snippet" + }, + { + "label": "Fill Bar Required Fields", + "kind": "Property", + "detail": "Bar", + "sortText": "R", + "filterText": "fill", + "insertText": "id: ${1:0}", + "insertTextFormat": "Snippet" + }, + { + "label": "id", + "kind": "Field", + "detail": "Bar.id", + "sortText": "K", + "insertText": "id: ${1:0}", + "insertTextFormat": "Snippet" + } + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config11.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config11.json new file mode 100644 index 000000000000..8ebbb978ea9a --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config11.json @@ -0,0 +1,36 @@ +{ + "position": { + "line": 22, + "character": 28 + }, + "source": "expression_context/source/mapping_constructor_expr_ctx_source8.bal", + "description": "", + "items": [ + { + "label": "readonly", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "U", + "filterText": "readonly", + "insertText": "readonly ", + "insertTextFormat": "Snippet" + }, + { + "label": "Fill Baz Required Fields", + "kind": "Property", + "detail": "Baz", + "sortText": "R", + "filterText": "fill", + "insertText": "id: ${1:0}", + "insertTextFormat": "Snippet" + }, + { + "label": "id", + "kind": "Field", + "detail": "Baz.id", + "sortText": "K", + "insertText": "id: ${1:0}", + "insertTextFormat": "Snippet" + } + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config12.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config12.json new file mode 100644 index 000000000000..42e7a29a2106 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config12.json @@ -0,0 +1,36 @@ +{ + "position": { + "line": 24, + "character": 47 + }, + "source": "expression_context/source/mapping_constructor_expr_ctx_source8.bal", + "description": "", + "items": [ + { + "label": "readonly", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "U", + "filterText": "readonly", + "insertText": "readonly ", + "insertTextFormat": "Snippet" + }, + { + "label": "Fill record {|readonly string 'type; readonly int id; anydata & readonly...;|} Required Fields", + "kind": "Property", + "detail": "record {|readonly string 'type; readonly int id; anydata & readonly...;|}", + "sortText": "R", + "filterText": "fill", + "insertText": "id: ${1:0}", + "insertTextFormat": "Snippet" + }, + { + "label": "id", + "kind": "Field", + "detail": "(record {|readonly string 'type; readonly int id; anydata & readonly...;|}).id", + "sortText": "K", + "insertText": "id: ${1:0}", + "insertTextFormat": "Snippet" + } + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config13.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config13.json new file mode 100644 index 000000000000..ab98c109a13f --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config13.json @@ -0,0 +1,36 @@ +{ + "position": { + "line": 29, + "character": 46 + }, + "source": "expression_context/source/mapping_constructor_expr_ctx_source8.bal", + "description": "", + "items": [ + { + "label": "readonly", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "U", + "filterText": "readonly", + "insertText": "readonly ", + "insertTextFormat": "Snippet" + }, + { + "label": "Fill record {|readonly string 'type; readonly int id; anydata & readonly...;|} Required Fields", + "kind": "Property", + "detail": "record {|readonly string 'type; readonly int id; anydata & readonly...;|}", + "sortText": "R", + "filterText": "fill", + "insertText": "id: ${1:0}", + "insertTextFormat": "Snippet" + }, + { + "label": "id", + "kind": "Field", + "detail": "(record {|readonly string 'type; readonly int id; anydata & readonly...;|}).id", + "sortText": "K", + "insertText": "id: ${1:0}", + "insertTextFormat": "Snippet" + } + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config14.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config14.json new file mode 100644 index 000000000000..c82c055b1afc --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config14.json @@ -0,0 +1,36 @@ +{ + "position": { + "line": 31, + "character": 24 + }, + "source": "expression_context/source/mapping_constructor_expr_ctx_source8.bal", + "description": "", + "items": [ + { + "label": "readonly", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "U", + "filterText": "readonly", + "insertText": "readonly ", + "insertTextFormat": "Snippet" + }, + { + "label": "Fill A Required Fields", + "kind": "Property", + "detail": "A", + "sortText": "R", + "filterText": "fill", + "insertText": "id: ${1:0}", + "insertTextFormat": "Snippet" + }, + { + "label": "id", + "kind": "Field", + "detail": "A.id", + "sortText": "K", + "insertText": "id: ${1:0}", + "insertTextFormat": "Snippet" + } + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config9.json b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config9.json new file mode 100644 index 000000000000..a4bbb2723f6b --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/config/mapping_constructor_expr_ctx_config9.json @@ -0,0 +1,36 @@ +{ + "position": { + "line": 18, + "character": 28 + }, + "source": "expression_context/source/mapping_constructor_expr_ctx_source8.bal", + "description": "", + "items": [ + { + "label": "readonly", + "kind": "Keyword", + "detail": "Keyword", + "sortText": "U", + "filterText": "readonly", + "insertText": "readonly ", + "insertTextFormat": "Snippet" + }, + { + "label": "Fill Foo Required Fields", + "kind": "Property", + "detail": "Foo", + "sortText": "R", + "filterText": "fill", + "insertText": "id: ${1:0}", + "insertTextFormat": "Snippet" + }, + { + "label": "id", + "kind": "Field", + "detail": "Foo.id", + "sortText": "K", + "insertText": "id: ${1:0}", + "insertTextFormat": "Snippet" + } + ] +} diff --git a/language-server/modules/langserver-core/src/test/resources/completion/expression_context/source/mapping_constructor_expr_ctx_source8.bal b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/source/mapping_constructor_expr_ctx_source8.bal new file mode 100644 index 000000000000..18ba350a4215 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/completion/expression_context/source/mapping_constructor_expr_ctx_source8.bal @@ -0,0 +1,33 @@ +type Foo record { + string 'type; + int id; +}; + +type Bar readonly & record { + string 'type; + int id; +}; + +type Baz record { + readonly string 'type; + int id; +}; + +type A Baz; + +function testFillRecordFields() { + Foo foo = {'type: "foo",}; + + Bar bar = {'type: "bar",}; + + Baz baz = {'type: "baz",}; + + Foo & readonly fooReadonly = {'type: "foo",}; + + record { + string 'type; + int id; + } & readonly fooReadonly2 = {'type: "foo",}; + + A a = {'type: "baz",}; +} From cf2095675999141744facfc7ae5c976854928cd6 Mon Sep 17 00:00:00 2001 From: ushirask Date: Mon, 14 Aug 2023 12:08:10 +0530 Subject: [PATCH 66/67] Address review suggestions --- .../compiler/semantics/analyzer/Types.java | 6 +----- .../test/expressions/access/FieldAccessTest.java | 11 +++++++++++ .../test-src/expressions/access/field_access.bal | 8 ++++++++ .../expressions/access/field_access_negative.bal | 15 +++++++++++++++ 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java index a54a3ff74cb3..0d6d8224a2c7 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/Types.java @@ -274,11 +274,7 @@ public BType checkType(Location pos, public boolean isLaxFieldAccessAllowed(BType type) { Set visited = new HashSet<>(); - int result = isLaxType(type, visited); - if (result == 1 || type.tag == TypeTags.XML || type.tag == TypeTags.XML_ELEMENT) { - return true; - } - return false; + return isLaxType(type, visited) == 1 || type.tag == TypeTags.XML || type.tag == TypeTags.XML_ELEMENT; } // TODO : clean diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/expressions/access/FieldAccessTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/expressions/access/FieldAccessTest.java index 1ae50b7c2426..9a7e13c57da6 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/expressions/access/FieldAccessTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/expressions/access/FieldAccessTest.java @@ -146,6 +146,12 @@ public void testNegativeCases() { , 393, 19); validateError(negativeResult, i++, "invalid operation: type 'map<(xml|json)>' does not support field access" , 399, 24); + validateError(negativeResult, i++, "invalid operation: type 'map' does not support " + + "optional field access", 404, 13); + validateError(negativeResult, i++, "invalid operation: type 'map' does not support " + + "optional field access", 409, 14); + validateError(negativeResult, i++, "invalid operation: type 'map' does not support " + + "optional field access", 414, 13); Assert.assertEquals(negativeResult.getErrorCount(), i); } @@ -298,6 +304,11 @@ public void testAccessingMethodOnUnionObjectType() { BRunUtil.invoke(result, "testAccessingMethodOnUnionObjectType"); } + @Test + public void testValidXMLmapFieldAccess() { + BRunUtil.invoke(result, "testValidXMLmapFieldAccess"); + } + @Test(dataProvider = "fieldAccessOnJsonTypedRecordFields") public void testFieldAccessOnJsonTypedRecordFields(String function) { BRunUtil.invoke(result, function); diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access.bal b/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access.bal index 88a2337b75ea..18d4c3ebc944 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access.bal @@ -536,6 +536,14 @@ function validateJSONOperationErrorMsg(json|error val) { assertEquals( checkpanic err.detail()["message"], "JSON value is not a mapping"); } +function testValidXMLmapFieldAccess() { + map m = {a: xml `foo`, b: xml `bar`}; + xml? x = m["a"]; + xml? y = m["c"]; + assertEquals(x, xml `foo`); + assertEquals(y, null); +} + isolated function isEqual(anydata|error val1, anydata|error val2) returns boolean { if (val1 is anydata && val2 is anydata) { return (val1 == val2); diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access_negative.bal b/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access_negative.bal index bf4718b37087..5657ee785102 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access_negative.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/expressions/access/field_access_negative.bal @@ -398,3 +398,18 @@ function testInvalidXMLMapFieldAccess4() returns error? { m["a"] = xml `foo`; xml|json x = check m.a; // error } + +function testInvalidXMLMapFieldAccess5() returns error? { + map m = {a: xml `foo`}; + xml x = m?.a; // error +} + +function testInvalidXMLMapFieldAccess6() returns error? { + record {|map a; xml c;|} m = {a: {b: xml `foo`}, c: xml `bar`}; + xml? x = m["a"]?.b.c; +} + +function testInvalidXMLMapFieldAccess7() returns error? { + map m = {a: xml `foo`}; + xml x = m?.b; // error +} From 2be36e6615b9f8110766a0b249ee4c46651efa2b Mon Sep 17 00:00:00 2001 From: kavindu Date: Mon, 14 Aug 2023 09:45:56 +0530 Subject: [PATCH 67/67] Add review suggestions --- .../AddModuleToBallerinaTomlCodeAction.java | 50 ++++++++----------- ...ddModuleToBallerinaTomlCodeActionTest.java | 6 +-- 2 files changed, 23 insertions(+), 33 deletions(-) diff --git a/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/AddModuleToBallerinaTomlCodeAction.java b/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/AddModuleToBallerinaTomlCodeAction.java index 1f500cdd0c60..e1ca20225bc4 100644 --- a/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/AddModuleToBallerinaTomlCodeAction.java +++ b/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/codeaction/providers/imports/AddModuleToBallerinaTomlCodeAction.java @@ -21,16 +21,13 @@ import io.ballerina.projects.environment.PackageRepository; import io.ballerina.projects.internal.environment.BallerinaUserHome; import io.ballerina.projects.util.ProjectConstants; -import io.ballerina.toml.syntax.tree.DocumentMemberDeclarationNode; import io.ballerina.toml.syntax.tree.DocumentNode; -import io.ballerina.toml.syntax.tree.NodeList; import io.ballerina.toml.syntax.tree.SyntaxKind; import io.ballerina.toml.syntax.tree.TableNode; import io.ballerina.tools.diagnostics.Diagnostic; import org.ballerinalang.annotation.JavaSPIService; import org.ballerinalang.langserver.LSPackageLoader; import org.ballerinalang.langserver.LSPackageLoader.ModuleInfo; -import org.ballerinalang.langserver.codeaction.CodeActionNodeValidator; import org.ballerinalang.langserver.codeaction.CodeActionUtil; import org.ballerinalang.langserver.common.constants.CommandConstants; import org.ballerinalang.langserver.commons.CodeActionContext; @@ -62,16 +59,13 @@ public class AddModuleToBallerinaTomlCodeAction implements DiagnosticBasedCodeAc @Override public boolean validate(Diagnostic diagnostic, DiagBasedPositionDetails positionDetails, CodeActionContext context) { - return CodeActionNodeValidator.validate(context.nodeAtRange()); + return diagnostic.diagnosticInfo().code().equals(DiagnosticErrorCode.MODULE_NOT_FOUND.diagnosticId()); } @Override public List getCodeActions(Diagnostic diagnostic, DiagBasedPositionDetails positionDetails, CodeActionContext context) { - if (!diagnostic.diagnosticInfo().code().equals(DiagnosticErrorCode.MODULE_NOT_FOUND.diagnosticId())) { - return Collections.emptyList(); - } Optional project = context.workspace().project(context.filePath()); if (project.isEmpty()) { return Collections.emptyList(); @@ -94,8 +88,8 @@ public List getCodeActions(Diagnostic diagnostic, String org = orgAndRest[0]; String[] moduleAndPrefix = orgAndRest[1].split(" as "); List loadedPackageVersions = new ArrayList<>(); - String pkg = getPkgAndVersions(LSPackageLoader.getInstance(context.languageServercontext()), project.get(), - org, moduleAndPrefix[0], loadedPackageVersions); + String pkg = resolvePackageVersionsAndName(LSPackageLoader.getInstance(context.languageServercontext()), + project.get(), org, moduleAndPrefix[0], loadedPackageVersions); if (loadedPackageVersions.isEmpty()) { return Collections.emptyList(); } @@ -110,23 +104,23 @@ public List getCodeActions(Diagnostic diagnostic, return Collections.singletonList(action); } - private String getPkgAndVersions(LSPackageLoader lsPackageLoader, Project project, String org, - String moduleWithPkg, List versions) { - String names = moduleWithPkg; + private String resolvePackageVersionsAndName(LSPackageLoader lsPackageLoader, Project project, String org, + String moduleName, List versions) { + String packageName = moduleName; while (true) { - int i = names.lastIndexOf("."); + int i = packageName.lastIndexOf("."); if (i == -1) { - versions.addAll(getAvailablePackageVersionsFromLocalRepo(lsPackageLoader, project, org, names)); + versions.addAll(getAvailablePackageVersionsFromLocalRepo(lsPackageLoader, project, org, packageName)); if (!versions.isEmpty()) { - return names; + return packageName; } - versions.addAll(getAvailablePackageVersionsFromLocalRepo(lsPackageLoader, project, org, moduleWithPkg)); - return moduleWithPkg; + versions.addAll(getAvailablePackageVersionsFromLocalRepo(lsPackageLoader, project, org, moduleName)); + return moduleName; } - names = names.substring(0, i); - versions.addAll(getAvailablePackageVersionsFromLocalRepo(lsPackageLoader, project, org, names)); + packageName = packageName.substring(0, i); + versions.addAll(getAvailablePackageVersionsFromLocalRepo(lsPackageLoader, project, org, packageName)); if (!versions.isEmpty()) { - return names; + return packageName; } } } @@ -164,15 +158,11 @@ private String getLatestVersion(List versions) { private int getDependencyStartLine(BallerinaToml toml) { DocumentNode tomlSyntaxTree = toml.tomlDocument().syntaxTree().rootNode(); - NodeList members = tomlSyntaxTree.members(); - for (DocumentMemberDeclarationNode member : members) { - if (member.kind() == SyntaxKind.TABLE) { - TableNode tableNode = (TableNode) member; - if (TomlSyntaxTreeUtil.toQualifiedName(tableNode.identifier().value()).equals("package")) { - return tableNode.lineRange().endLine().line() + 2; - } - } - } - return 0; + return tomlSyntaxTree.members().stream() + .filter(member -> member.kind().equals(SyntaxKind.TABLE) && + TomlSyntaxTreeUtil.toQualifiedName(((TableNode) member).identifier().value()).equals("package")) + .findFirst() + .map(member -> ((TableNode) member).lineRange().endLine().line() + 2) + .orElse(0); } } diff --git a/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/AddModuleToBallerinaTomlCodeActionTest.java b/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/AddModuleToBallerinaTomlCodeActionTest.java index be4ba12eba12..e83781031d9a 100644 --- a/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/AddModuleToBallerinaTomlCodeActionTest.java +++ b/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/AddModuleToBallerinaTomlCodeActionTest.java @@ -94,13 +94,13 @@ public Object[][] dataProvider() { }; } - @Test(dataProvider = "negativeDataProvider") + @Test(dataProvider = "negative-test-data-provider") @Override public void negativeTest(String config) throws IOException, WorkspaceDocumentException { super.negativeTest(config); } - @DataProvider + @DataProvider(name = "negative-test-data-provider") public Object[][] negativeDataProvider() { return new Object[][]{ {"add_module_negative_1.json"}, @@ -119,7 +119,7 @@ public boolean loadMockedPackages() { } private static List getLocalPackages(Map projects, WorkspaceManager workspaceManager, - LanguageServerContext context) + LanguageServerContext context) throws WorkspaceDocumentException, IOException { List packages = new ArrayList<>(); for (Map.Entry entry : projects.entrySet()) {