wso2 / ballerina-vscode

To keep Ballerina VSCode plugin related issues, discussions, etc.
Apache License 2.0
41 stars 20 forks source link

Adding a connector via the Diagram view results in invalid code #551

Open MaryamZi opened 2 months ago

MaryamZi commented 2 months ago

Description: $title, and then continues to add invalid code like in https://github.com/wso2/ballerina-vscode/issues/541.

Steps to reproduce:

public function main() {

}<cursor>

Adding a connector (e.g., worldbank) adds

import ballerinax/worldbank;
public function main() {

}worldbank:Client worldbankEp = check new ();
}

When I then try to remove the extra curly brace, continuously adds client variables like in #541.

import ballerinax/worldbank;
public function main() {

}worldbank:Client worldbankEp = check new ();
worldbank:Client worldbankEp1 = check new ();
worldbank:Client worldbankEp2 = check new ();
worldbank:Client worldbankEp3 = check new ();
worldbank:Client worldbankEp4 = check new ();
worldbank:Client worldbankEp5 = check new ();
worldbank:Client worldbankEp6 = check new ();
worldbank:Client worldbankEp7 = check new ();
worldbank:Client worldbankEp8 = check new ();
worldbank:Client worldbankEp9 = check new ();
worldbank:Client worldbankEp10 = check new ();
worldbank:Client worldbankEp11 = check new ();

Affected Versions: Ballerina 2201.9.0 test pack Plugin v4.5.624022010