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

[hosted plugin] fix no indication for selecting an invalid node.js project #7636

Merged
merged 1 commit into from
Apr 22, 2020

Conversation

DoroNahari
Copy link
Contributor

@DoroNahari DoroNahari commented Apr 21, 2020

What it does

When selecting a node.js project that is not a valid plugin(vscode ext or theia plugin) for hosted plugin instance, it failed selecting the project as expected but doesn't notify the user.

In the hosted-plugin-manager-client.js it checks if the plugin is valid. then the isPluginValid function in hosted-instance-manger.js (backend) calling to getScanner which throws an error because there's no valid scanner for this project.

I wrote a code to catch this error in the isPluginValid function and return false to the client accordingly.

Before:
hosted-before

After:
hosted-after

How to test

Clone node.js project which is not a vscode extension or theia plugin.
Press f1 -> Hosted Plugin: Select Path -> select the project.
See that there's a notification telling the user that the folder is not a valid plugin.

Review checklist

Reminder for reviewers

…oject

Signed-off-by: Doron Nahari <doron.nahari@sap.com>
Copy link
Member

@amiramw amiramw left a comment

Choose a reason for hiding this comment

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

Code looks good to me and tested on git pod, the alert is shown as expected.

Copy link
Contributor

@RomanNikitenko RomanNikitenko left a comment

Choose a reason for hiding this comment

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

Looks good to me.
Tested, it works well for me!

@amiramw amiramw merged commit d3d2a71 into eclipse-theia:master Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plug-in system issues related to the plug-in system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants