Skip to content
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 codeLens feature for Language Server #13297

Merged
merged 20 commits into from Jan 24, 2019
Merged

Add codeLens feature for Language Server #13297

merged 20 commits into from Jan 24, 2019

Conversation

rasika
Copy link
Contributor

@rasika rasika commented Jan 24, 2019

Purpose

Implenting Code Lens feature for Ballerina. Code lenses are the code links in your code. They often used to provide additional information of the code lines and allow actionable commands.

Code Lenses

codelenses

Customizing Code Lenses

config

Signed-off-by: Rasika <info.rasika@gmail.com>
Signed-off-by: Rasika <info.rasika@gmail.com>
Modified API Designer to open specific service when service name is
passed as an argument.

Signed-off-by: Rasika <info.rasika@gmail.com>
Modified showDocs docs renderer  to focus on a specific construct when
an argument is passed

Signed-off-by: Rasika <info.rasika@gmail.com>
Signed-off-by: Rasika <info.rasika@gmail.com>
Signed-off-by: Rasika <info.rasika@gmail.com>
Signed-off-by: Rasika <info.rasika@gmail.com>
Signed-off-by: Rasika <info.rasika@gmail.com>
Signed-off-by: Rasika <info.rasika@gmail.com>
Signed-off-by: Rasika <info.rasika@gmail.com>
Signed-off-by: Rasika <info.rasika@gmail.com>
Signed-off-by: Rasika <info.rasika@gmail.com>
Signed-off-by: Rasika <info.rasika@gmail.com>
Signed-off-by: Rasika <info.rasika@gmail.com>
Signed-off-by: Rasika <info.rasika@gmail.com>
@rasika rasika added Team/LanguageServer Language Server Implementation related issues. #Compiler Component/VScode plugin labels Jan 24, 2019
import java.util.List;

/**
* Find the endpoints visiting functions and services of a BLangCompilationUnit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing full stop

if (topLevelNode instanceof BLangTypeDefinition) {
BLangTypeDefinition definition = (BLangTypeDefinition) topLevelNode;
if (definition.typeNode instanceof BLangObjectTypeNode) {
if (!((BLangObjectTypeNode) definition.typeNode).flagSet.contains(Flag.SERVICE)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to merge these two if conditions to a single one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since there's a casting involved; bringing it into a single line affects the readability. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, let's keep this way :)

@codecov-io
Copy link

Codecov Report

Merging #13297 into master will increase coverage by 0.05%.
The diff coverage is 65.31%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #13297      +/-   ##
============================================
+ Coverage      59.9%   59.96%   +0.05%     
  Complexity      659      659              
============================================
  Files          2146     2156      +10     
  Lines        104029   104360     +331     
  Branches      13253    13301      +48     
============================================
+ Hits          62320    62580     +260     
- Misses        36483    36544      +61     
- Partials       5226     5236      +10
Impacted Files Coverage Δ Complexity Δ
tool-plugins/vscode/src/docs/renderer.ts 0% <ø> (ø) 0 <0> (ø) ⬇️
.../langserver/common/constants/CommandConstants.java 66.66% <ø> (ø) 0 <0> (ø) ⬇️
.../ballerinalang/langserver/compiler/LSCompiler.java 35.77% <ø> (-0.83%) 0 <0> (ø)
tool-plugins/vscode/src/diagram/activator.ts 0% <0%> (ø) 0 <0> (ø) ⬇️
tool-plugins/vscode/src/api-editor/activator.ts 0% <0%> (ø) 0 <0> (ø) ⬇️
tool-plugins/vscode/src/docs/activator.ts 0% <0%> (ø) 0 <0> (ø) ⬇️
...rver/codelenses/LSCodeLensesProviderException.java 0% <0%> (ø) 0 <0> (?)
...lerinalang/langserver/BallerinaLanguageServer.java 87.34% <100%> (+0.32%) 0 <0> (ø) ⬇️
.../ballerinalang/langserver/command/CommandUtil.java 66.44% <100%> (ø) 0 <0> (ø) ⬇️
tool-plugins/vscode/src/core/extension.ts 19.48% <25%> (-0.39%) 0 <0> (ø)
... and 36 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 480366d...caab472. Read the comment docs.

Copy link
Contributor

@nadeeshaan nadeeshaan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed

@nadeeshaan nadeeshaan merged commit cd2edd1 into master Jan 24, 2019
@rasika rasika deleted the code-lense branch January 27, 2019 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team/LanguageServer Language Server Implementation related issues. #Compiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants