-
Notifications
You must be signed in to change notification settings - Fork 111
Conversation
@@ -42,4 +45,4 @@ | |||
"backend": "lib/node/che-backend-module" | |||
} | |||
] | |||
} | |||
} |
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.
Fix line ending please.
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.
Done
|
||
bindViewContribution(bind, ChePluginViewContribution); | ||
|
||
bind(ChePluginWidget).toSelf(); |
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.
Maybe it should be singleton?
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.
Fixed. Thanks.
// const { yaml } = require('js-yaml'); | ||
const yaml = require('js-yaml'); | ||
|
||
export interface ChePluginMetadataInternal { |
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.
Maybe ChePluginMetadataInternal extends ChePluginMetadata?
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.
There is another ChePluginMetadata
defined in common/che-protocol
return getPluginsRequest.data; | ||
} | ||
|
||
return []; |
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.
Maybe throw an error instead of empty array?
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.
Has been reworked
} | ||
|
||
private installedPlugins: string[] = [ | ||
'org.eclipse.che.editor.theia:1.0.0', |
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.
I think we should get this information from workspace config attributes.
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.
Yep, it's only draft for now
this.title.closable = true; | ||
this.addClass('theia-plugins'); | ||
|
||
this.node.tabIndex = -1; |
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.
Why do we use '-1' for the tabIndex(not 0)?
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.
Fixed. Thanks!
Very cool @vitaliy-guliy ! Can we also take the opportunity to improve a little bit the formatting of each "plugin row" ?
|
@slemeur Yes, sure. I will add a screenshot here with updates |
Thanks @vitaliy-guliy |
@slemeur WDYT? The space between title and description is reduced a bit. But I reserved space for description to be able to show 3 lines of text. |
hello, what os the status of this PR ? |
ci-build is failing and ECA check as well |
@benoitf Looks same as I reported in my comment. |
FYI I tried to build this PR branch on my CI server. https://dev.azure.com/pizzafactory/camino/_build/results?buildId=670
|
FYI Build failures I repoted above will be fixed after rebasing or merging from the master branch. (I checked by hand) |
Signed-off-by: Vitaliy Gulyy <vgulyy@redhat.com>
77e3e08
to
c02aa4f
Compare
Too much things has been reworked. PR is ready to review. |
@@ -0,0 +1,177 @@ | |||
/******************************************************************************** | |||
* Copyright (C) 2018 Red Hat, Inc. and others. |
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.
Fix year, please, for all files...
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.
Done
Signed-off-by: Vitaliy Guliy <vgulyy@redhat.com>
// @builtin | ||
// @enabled | ||
// @disabled | ||
hasType(filter: string, type: string) { |
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.
Minor: apply, please, return type :boolean
. But up to you.
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.
Done. Thanks
|
||
const registry = this.registryList.find(r => r.uri === uri); | ||
if (registry === undefined) { | ||
instance.registryList.push({ |
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.
In the two lines upper you used this.registryList
:
const registry = this.registryList.find(r => r.uri === uri);
Could you do the same this.registryList.push({
and remove const instance = this;
?
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.
Done
private getIdPublisher(input: string): string { | ||
if (input.startsWith('ext install ')) { | ||
// check for 'ext install rebornix.Ruby' | ||
return input.substring('ext install '.length); |
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.
It would be nice to trim result.
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.
This is intentional decision. Space is a part of a prefix of the command.
The first command has a space at the end, the second command has a slash.
if (input.startsWith('ext install ')) {
// check for 'ext install rebornix.Ruby'
return input.substring('ext install '.length);
} else if (input.startsWith('vscode:extension/')) {
// check for 'vscode:extension/rebornix.Ruby'
return input.substring('vscode:extension/'.length);
}
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 you need to merge it ASAP you may ignore my comments for now and handle them in the following PR
extensions/eclipse-che-theia-plugin-ext/src/browser/plugin/che-plugin-command-contribution.ts
Show resolved
Hide resolved
extensions/eclipse-che-theia-plugin-ext/src/browser/plugin/che-plugin-command-contribution.ts
Outdated
Show resolved
Hide resolved
return plugins; | ||
} | ||
|
||
private determinePluginType(meta: PluginMetadata): string { |
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.
Maybe use literals type or enum as return value?
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.
It could be any string
extensions/eclipse-che-theia-plugin-ext/src/browser/plugin/che-plugin-frontend-service.ts
Outdated
Show resolved
Hide resolved
extensions/eclipse-che-theia-plugin-ext/src/browser/plugin/che-plugin-manager.ts
Outdated
Show resolved
Hide resolved
extensions/eclipse-che-theia-plugin-ext/src/browser/plugin/che-plugin-menu.ts
Outdated
Show resolved
Hide resolved
extensions/eclipse-che-theia-plugin-ext/src/browser/plugin/che-plugin-widget.tsx
Show resolved
Hide resolved
extensions/eclipse-che-theia-plugin-ext/src/node/che-plugin-service.ts
Outdated
Show resolved
Hide resolved
extensions/eclipse-che-theia-plugin-ext/src/browser/plugin/che-plugin-frontend-service.ts
Outdated
Show resolved
Hide resolved
const metadata = await this.hostedPluginServer.getDeployedMetadata(); | ||
|
||
const plugins: ChePluginMetadata[] = await Promise.all( | ||
metadata.map(async (meta: PluginMetadata) => { |
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.
Here is a synchronous function in map
method. I seem you don't need promises here.
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.
Has been reworked. Thanks!
category: 'string', | ||
latestUpdateDate: 'string', | ||
|
||
// Plugin KEY. Used to set in workpsace configuration |
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.
typo: workpsace -> workspace
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.
Fixed. Thanks!
|
||
const prefs = this.chePluginPreferences['chePlugins.repositories']; | ||
if (prefs) { | ||
const instance = this; |
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.
You don't need to save this
as instance
because an arrow function doesn't have its own this
, and this
of surrounding scope is used.
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.
Yes, it's already fixed. Thanks!
try { | ||
// add the plugin to workspace configuration | ||
await this.chePluginService.addPlugin(plugin.key); | ||
await this.delay(1000); |
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.
Could you explain why do you need a delay here?
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.
It's already removed. No delay anymore :=))
} | ||
|
||
try { | ||
const workpsaceSettings: WorkspaceSettings = await this.cheApiService.getWorkspaceSettings(); |
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.
typo: workpsaceSettings -> workspaceSettings
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.
Fixed. Thanks!
I have to fix everything. No options here. |
Signed-off-by: Vitaliy Guliy <vgulyy@redhat.com>
Signed-off-by: Vitaliy Guliy <vgulyy@redhat.com>
* Makes it possible to install a plugin from Theia Signed-off-by: Vitaliy Gulyy <vgulyy@redhat.com> * Update year in license Signed-off-by: Vitaliy Guliy <vgulyy@redhat.com> * PR feebbacks Signed-off-by: Vitaliy Guliy <vgulyy@redhat.com> * Solving PR feedbacks Signed-off-by: Vitaliy Guliy <vgulyy@redhat.com>
…ins (#162) * Use eclipse/che-remote-plugin-runner-java11:next image for java based plugins Signed-off-by: Valeriy Svydenko <vsvydenk@redhat.com> * Revert changes to use Java8 for sonarlint plugin Signed-off-by: Valeriy Svydenko <vsvydenk@redhat.com> * Set up memory limit for apache-camel plugin Signed-off-by: Valeriy Svydenko <vsvydenk@redhat.com> * Set up memory limit for sonarlint plugin Signed-off-by: Valeriy Svydenko <vsvydenk@redhat.com>
What does this PR do?
Video demonstrating the feature
https://www.youtube.com/watch?v=2_GPZb1_Hew
What issues does this PR fix or reference?
eclipse-che/che#12932
Signed-off-by: Vitaliy Gulyy vgulyy@redhat.com