Skip to content
This repository was archived by the owner on Oct 5, 2021. It is now read-only.

Commit 75a92df

Browse files
authored
Merge pull request #504 from maheeka/bug-fixes
remove Current Package in connector declaration and action invocation…
2 parents 4d08d29 + d845b79 commit 75a92df

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

modules/web/js/ballerina/ast/action-invocation-expression.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ define(['lodash', 'log', './statement'], function (_, log, Statement) {
204204
: (argsString = this.getConnectorVariableReference() + ' , ' + argsString);
205205
}
206206

207-
if (!_.isNil(this.getActionPackageName()) && !_.isEmpty(this.getActionPackageName().trim())) {
207+
if (!_.isNil(this.getActionPackageName()) && !_.isEmpty(this.getActionPackageName().trim())
208+
&& !_.isEqual(this.getActionPackageName().trim(), 'Current Package')) {
208209
if(this._isActionInvocationStatement){
209210
return this.getActionPackageName() + ':' + this.getActionConnectorName() + '.' + this.getActionName() +
210211
'(' + argsString + ')';

modules/web/js/ballerina/item-provider/tool-palette-item-provider.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ define(['log', 'lodash', './../env/package', './../tool-palette/tool-palette', '
180180
action.classNames = "tool-connector-action tool-connector-last-action";
181181
}
182182
action.meta = {
183-
action: action.getAction(),
183+
action: action.getName(),
184184
actionConnectorName: connector.getName(),
185185
actionPackageName: packageName
186186
};

modules/web/js/ballerina/visitors/source-gen/connector-declaration-visitor.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ define(['lodash', 'log', 'event_channel', './abstract-source-gen-visitor'],
3939
* If we need to add additional parameters which are dynamically added to the configuration start
4040
* that particular source generation has to be constructed here
4141
*/
42-
var connectorPkg = !_.isNil(connectorDeclaration.getConnectorPkgName()) ?
42+
var connectorPkg = ((!_.isNil(connectorDeclaration.getConnectorPkgName()))
43+
&& (!_.isEqual(connectorDeclaration.getConnectorPkgName(), 'Current Package'))) ?
4344
(connectorDeclaration.getConnectorPkgName() + ":") : "";
4445
var constructedSource = connectorPkg +
4546
connectorDeclaration.getConnectorName() + ' ' + connectorDeclaration.getConnectorVariable() +

0 commit comments

Comments
 (0)