Skip to content

Commit

Permalink
Use 'viewId' as progress location
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Nikitenko <[email protected]>
  • Loading branch information
RomanNikitenko committed Nov 12, 2020
1 parent a64e9d2 commit 5c164f7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
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

0 comments on commit 5c164f7

Please sign in to comment.