-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add LS API support for component deletion #480
Add LS API support for component deletion #480
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we add a test where it send a JSON request containing codedata?
We don't need right? It already has tests including codedata in 'deleteFlowNode' (deprecated) tests. However, evaluating codedata part will be removed later with deprecated API |
} | ||
|
||
// Assume that the node has the following attributes: startLine, startColumn, endLine, endColumn | ||
JsonObject jsonObject = node.getAsJsonObject(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we send the flow-node for all cases from the front end?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we can't. In the Design view (Component Diagram), we don't have FlowNode information. Therefore, we implemented this. The idea is to eventually move deleteFlowNode
usages to the new deleteComponent
API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK. Since we don't have flow node information for the component what is the purpose of L:120-L:123?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because, Still we have some usages in deleteFlowNode API. In the diagram we use 'deleteFlowNode' API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the function is used elsewhere, are there any prompts to notify the user, or is it deleted without warning?
...s-extension/src/test/java/io/ballerina/flowmodelgenerator/extension/DeleteComponentTest.java
Outdated
Show resolved
Hide resolved
...s-extension/src/test/java/io/ballerina/flowmodelgenerator/extension/DeleteComponentTest.java
Outdated
Show resolved
Hide resolved
...odel-generator-ls-extension/src/test/resources/delete_component/source/delete_component1.bal
Outdated
Show resolved
Hide resolved
It deletes without warning. However, checking usability is a separate API and it needed to be called from the frontend before this. Note: is-used API is still in progress |
Co-authored-by: Nipuna Fernando <[email protected]>
1a27c22
into
ballerina-platform:flow_model
Purpose
Goals
Approach
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning