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

Use 'viewId' as progress location #8700

Merged
merged 1 commit into from
Nov 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
}

protected toViewContainerIdentifier(viewContainerId: string): ViewContainerIdentifier {
return { id: PLUGIN_VIEW_CONTAINER_FACTORY_ID + ':' + viewContainerId };
return { id: PLUGIN_VIEW_CONTAINER_FACTORY_ID + ':' + viewContainerId, progressLocationId: viewContainerId };
}
protected toViewContainerId(identifier: ViewContainerIdentifier): string {
return identifier.id.substr(PLUGIN_VIEW_CONTAINER_FACTORY_ID.length + 1);
Expand Down
8 changes: 6 additions & 2 deletions packages/plugin-ext/src/plugin/notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ export class NotificationExtImpl implements NotificationExt {
return progress;
}

protected mapLocation(pluginLocation: ProgressLocation): string | undefined {
switch (pluginLocation) {
protected mapLocation(location: ProgressLocation | { viewId: string }): string | undefined {
if (typeof location === 'object') {
return location.viewId;
}

switch (location) {
case ProgressLocation.Notification: return 'notification';
case ProgressLocation.SourceControl: return 'scm';
case ProgressLocation.Window: return 'window';
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin/src/theia.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4181,7 +4181,7 @@ declare module '@theia/plugin' {
/**
* The location at which progress should show.
*/
location: ProgressLocation;
location: ProgressLocation | { viewId: string };
/**
* A human-readable string which will be used to describe the
* operation.
Expand Down