˘fix incorrect naming of generated view containers

上级 61bc74a8
......@@ -187,7 +187,7 @@ export class ActivitybarPart extends Part implements IPaneCompositeSelectorPart
actions.push(toAction({ id: ToggleActivityBarVisibilityAction.ID, label: localize('hideActivitBar', "Hide Activity Bar"), run: () => this.instantiationService.invokeFunction(accessor => new ToggleActivityBarVisibilityAction().run(accessor)) }));
},
getContextMenuActionsForComposite: compositeId => this.getContextMenuActionsForComposite(compositeId),
getDefaultCompositeId: () => this.viewDescriptorService.getDefaultViewContainer(this.location)!.id,
getDefaultCompositeId: () => this.viewDescriptorService.getDefaultViewContainer(this.location)?.id,
hidePart: () => this.layoutService.setPartHidden(true, Parts.SIDEBAR_PART),
dndHandler: new CompositeDragAndDrop(this.viewDescriptorService, ViewContainerLocation.Sidebar,
async (id: string, focus?: boolean) => { return await this.paneCompositePart.openPaneComposite(id, focus) ?? null; },
......
......@@ -155,7 +155,7 @@ export interface ICompositeBarOptions {
fillExtraContextMenuActions: (actions: IAction[], e?: MouseEvent | GestureEvent) => void;
getContextMenuActionsForComposite: (compositeId: string) => IAction[];
openComposite: (compositeId: string, preserveFocus?: boolean) => Promise<IComposite | null>;
getDefaultCompositeId: () => string;
getDefaultCompositeId: () => string | undefined;
hidePart: () => void;
}
......@@ -417,7 +417,7 @@ export class CompositeBar extends Widget implements ICompositeBar {
// Case: composite is not the default composite and default composite is still showing
// Solv: we open the default composite
if (defaultCompositeId !== compositeId && this.isPinned(defaultCompositeId)) {
if (defaultCompositeId && defaultCompositeId !== compositeId && this.isPinned(defaultCompositeId)) {
this.options.openComposite(defaultCompositeId, true);
}
......
......@@ -171,7 +171,7 @@ export abstract class BasePanelPart extends CompositePart<PaneComposite> impleme
]);
},
getContextMenuActionsForComposite: compositeId => this.getContextMenuActionsForComposite(compositeId),
getDefaultCompositeId: () => viewDescriptorService.getDefaultViewContainer(this.viewContainerLocation)!.id,
getDefaultCompositeId: () => viewDescriptorService.getDefaultViewContainer(this.viewContainerLocation)?.id,
hidePart: () => this.layoutService.setPartHidden(true, this.partId),
dndHandler: this.dndHandler,
compositeSize: 0,
......
......@@ -592,7 +592,7 @@ export class ViewDescriptorService extends Disposable implements IViewDescriptor
// Old Format (deprecated)
// {Common Prefix}.{Uniqueness Id}.{Source View Id}
private generateContainerId(location: ViewContainerLocation): string {
return `${ViewDescriptorService.COMMON_CONTAINER_ID_PREFIX}.${ViewContainerLocationToString(location) ? 'panel' : 'sidebar'}.${generateUuid()}`;
return `${ViewDescriptorService.COMMON_CONTAINER_ID_PREFIX}.${ViewContainerLocationToString(location)}.${generateUuid()}`;
}
private getStoredCachedViewPositionsValue(): string {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册