diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index 4531a0ed648b1799064f9bea687b5325a2d1cdd4..b043c4c70599894aa5f8714eb92b500a5d1b9b13 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -682,6 +682,7 @@ export class CodeMenu { } const moveSidebar = this.createMenuItem(moveSideBarLabel, 'workbench.action.toggleSidebarPosition'); + const movePanel = this.createMenuItem(nls.localize('togglePanelPosition', "Toggle Panel Position"), 'workbench.action.togglePanelPosition'); const togglePanel = this.createMenuItem(nls.localize({ key: 'miTogglePanel', comment: ['&& denotes a mnemonic'] }, "Toggle &&Panel"), 'workbench.action.togglePanel'); let statusBarLabel: string; @@ -712,6 +713,7 @@ export class CodeMenu { __separator__(), moveSidebar, toggleSidebar, + movePanel, togglePanel, toggleStatusbar, toggleActivtyBar, @@ -1291,4 +1293,4 @@ export class CodeMenu { function __separator__(): Electron.MenuItem { return new MenuItem({ type: 'separator' }); -} \ No newline at end of file +} diff --git a/src/vs/workbench/api/browser/viewsContainersExtensionPoint.ts b/src/vs/workbench/api/browser/viewsContainersExtensionPoint.ts index b603f45eacb961ff1d8cf9e9d3d3ef94ba4e43b7..3f1959cd6953c7fab3c5b1cb17f4d4a7a74650c6 100644 --- a/src/vs/workbench/api/browser/viewsContainersExtensionPoint.ts +++ b/src/vs/workbench/api/browser/viewsContainersExtensionPoint.ts @@ -30,6 +30,7 @@ import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IEditorGroupsService } from 'vs/workbench/services/group/common/editorGroupsService'; import { URI } from 'vs/base/common/uri'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; export interface IUserFriendlyViewsContainerDescriptor { id: string; @@ -161,6 +162,7 @@ class ViewsContainersExtensionHandler implements IWorkbenchContribution { // Register as viewlet class CustomViewlet extends ViewContainerViewlet { constructor( + @IConfigurationService configurationService: IConfigurationService, @IPartService partService: IPartService, @ITelemetryService telemetryService: ITelemetryService, @IWorkspaceContextService contextService: IWorkspaceContextService, @@ -171,7 +173,7 @@ class ViewsContainersExtensionHandler implements IWorkbenchContribution { @IContextMenuService contextMenuService: IContextMenuService, @IExtensionService extensionService: IExtensionService ) { - super(id, `${id}.state`, true, partService, telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService); + super(id, `${id}.state`, true, configurationService, partService, telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService); } } const viewletDescriptor = new ViewletDescriptor( diff --git a/src/vs/workbench/browser/actions/toggleSidebarPosition.ts b/src/vs/workbench/browser/actions/toggleSidebarPosition.ts index 3c64a5a1c6dc75954b7b229f40b3399a8844d336..6d07ae4f7497618067940f7547a4572e1a711072 100644 --- a/src/vs/workbench/browser/actions/toggleSidebarPosition.ts +++ b/src/vs/workbench/browser/actions/toggleSidebarPosition.ts @@ -37,6 +37,10 @@ export class ToggleSidebarPositionAction extends Action { return this.configurationService.updateValue(ToggleSidebarPositionAction.sidebarPositionConfigurationKey, newPositionValue, ConfigurationTarget.USER); } + + static getLabel(partService: IPartService): string { + return partService.getSideBarPosition() === Position.LEFT ? nls.localize('moveSidebarRight', "Move Side Bar Right") : nls.localize('moveSidebarLeft', "Move Side Bar Left"); + } } const registry = Registry.as(Extensions.WorkbenchActions); diff --git a/src/vs/workbench/browser/parts/panel/media/panel-bottom-inverse.svg b/src/vs/workbench/browser/parts/panel/media/panel-bottom-inverse.svg deleted file mode 100755 index 5f4b68ba5a4e82dec01c9dcb17b0c05b27861a0c..0000000000000000000000000000000000000000 --- a/src/vs/workbench/browser/parts/panel/media/panel-bottom-inverse.svg +++ /dev/null @@ -1 +0,0 @@ -DockBottom_16x \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/panel/media/panel-bottom.svg b/src/vs/workbench/browser/parts/panel/media/panel-bottom.svg deleted file mode 100755 index daf50d9d44e8913a3761e85f98011de885607f60..0000000000000000000000000000000000000000 --- a/src/vs/workbench/browser/parts/panel/media/panel-bottom.svg +++ /dev/null @@ -1 +0,0 @@ -DockBottom_16x \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/panel/media/panel-right-inverse.svg b/src/vs/workbench/browser/parts/panel/media/panel-right-inverse.svg deleted file mode 100755 index 3a7a7d0f7a0ec68024acf74d2b4bcf5f7a35c858..0000000000000000000000000000000000000000 --- a/src/vs/workbench/browser/parts/panel/media/panel-right-inverse.svg +++ /dev/null @@ -1 +0,0 @@ -DockRight_16x \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/panel/media/panel-right.svg b/src/vs/workbench/browser/parts/panel/media/panel-right.svg deleted file mode 100755 index 92533f42de9dad0e08a3f563b005c784b692ba25..0000000000000000000000000000000000000000 --- a/src/vs/workbench/browser/parts/panel/media/panel-right.svg +++ /dev/null @@ -1 +0,0 @@ -DockRight_16x \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/panel/media/panelpart.css b/src/vs/workbench/browser/parts/panel/media/panelpart.css index cfd1137cf352bf66f41d918d880f1259157c3b52..18cc419df90d24c80b7607ff046c9c8533255ef6 100644 --- a/src/vs/workbench/browser/parts/panel/media/panelpart.css +++ b/src/vs/workbench/browser/parts/panel/media/panelpart.css @@ -147,24 +147,6 @@ background-image: url('right-inverse.svg'); } -.monaco-workbench .move-panel-to-right { - background: url('panel-right.svg') center center no-repeat; -} - -.vs-dark .monaco-workbench .move-panel-to-right, -.hc-black .monaco-workbench .move-panel-to-right { - background: url('panel-right-inverse.svg') center center no-repeat; -} - -.monaco-workbench .move-panel-to-bottom { - background: url('panel-bottom.svg') center center no-repeat; -} - -.vs-dark .monaco-workbench .move-panel-to-bottom, -.hc-black .monaco-workbench .move-panel-to-bottom { - background: url('panel-bottom-inverse.svg') center center no-repeat; -} - .vs-dark .monaco-workbench .hide-panel-action, .hc-black .monaco-workbench .hide-panel-action { background: url('close-inverse.svg') center center no-repeat; diff --git a/src/vs/workbench/browser/parts/panel/panelActions.ts b/src/vs/workbench/browser/parts/panel/panelActions.ts index 54d4f61d0407acbc4a8f4db8c3137c1255c96970..6fd03a791647d4749d6d76a2228c89837712277e 100644 --- a/src/vs/workbench/browser/parts/panel/panelActions.ts +++ b/src/vs/workbench/browser/parts/panel/panelActions.ts @@ -88,8 +88,8 @@ export class TogglePanelPositionAction extends Action { static readonly ID = 'workbench.action.togglePanelPosition'; static readonly LABEL = nls.localize('toggledPanelPosition', "Toggle Panel Position"); - private static readonly MOVE_TO_RIGHT_LABEL = nls.localize('moveToRight', "Move to Right"); - private static readonly MOVE_TO_BOTTOM_LABEL = nls.localize('moveToBottom', "Move to Bottom"); + private static readonly MOVE_TO_RIGHT_LABEL = nls.localize('moveToRight', "Move Panel Right"); + private static readonly MOVE_TO_BOTTOM_LABEL = nls.localize('moveToBottom', "Move Panel to Bottom"); private toDispose: IDisposable[]; @@ -97,7 +97,6 @@ export class TogglePanelPositionAction extends Action { id: string, label: string, @IPartService private partService: IPartService, - ) { super(id, label, partService.getPanelPosition() === Position.RIGHT ? 'move-panel-to-bottom' : 'move-panel-to-right'); this.toDispose = []; @@ -186,3 +185,12 @@ MenuRegistry.appendMenuItem(MenuId.MenubarAppearanceMenu, { }, order: 5 }); + +MenuRegistry.appendMenuItem(MenuId.MenubarAppearanceMenu, { + group: '2_workbench_layout', + command: { + id: TogglePanelPositionAction.ID, + title: TogglePanelPositionAction.LABEL + }, + order: 3 +}); diff --git a/src/vs/workbench/browser/parts/panel/panelPart.ts b/src/vs/workbench/browser/parts/panel/panelPart.ts index 7164d8cc8830e6a964bce322d15c4498fd3c6849..001d8f543dca29cfa8f463d31d3b276e6eb4d4eb 100644 --- a/src/vs/workbench/browser/parts/panel/panelPart.ts +++ b/src/vs/workbench/browser/parts/panel/panelPart.ts @@ -89,7 +89,10 @@ export class PanelPart extends CompositePart implements IPanelService { getActivityAction: (compositeId: string) => this.getCompositeActions(compositeId).activityAction, getCompositePinnedAction: (compositeId: string) => this.getCompositeActions(compositeId).pinnedAction, getOnCompositeClickAction: (compositeId: string) => this.instantiationService.createInstance(PanelActivityAction, this.getPanel(compositeId)), - getContextMenuActions: () => [this.instantiationService.createInstance(TogglePanelAction, TogglePanelAction.ID, localize('hidePanel', "Hide Panel"))], + getContextMenuActions: () => [ + this.instantiationService.createInstance(TogglePanelPositionAction, TogglePanelPositionAction.ID, TogglePanelPositionAction.LABEL), + this.instantiationService.createInstance(TogglePanelAction, TogglePanelAction.ID, localize('hidePanel', "Hide Panel")) + ], getDefaultCompositeId: () => Registry.as(PanelExtensions.Panels).getDefaultPanelId(), hidePart: () => this.partService.setPanelHidden(true), compositeSize: 0, @@ -210,7 +213,6 @@ export class PanelPart extends CompositePart implements IPanelService { protected getActions(): IAction[] { return [ this.instantiationService.createInstance(ToggleMaximizedPanelAction, ToggleMaximizedPanelAction.ID, ToggleMaximizedPanelAction.LABEL), - this.instantiationService.createInstance(TogglePanelPositionAction, TogglePanelPositionAction.ID, TogglePanelPositionAction.LABEL), this.instantiationService.createInstance(ClosePanelAction, ClosePanelAction.ID, ClosePanelAction.LABEL) ]; } diff --git a/src/vs/workbench/browser/parts/views/panelViewlet.ts b/src/vs/workbench/browser/parts/views/panelViewlet.ts index b84f0fc9f0fb591f27b43b7c2eb3db4c549d0379..e442787849e5684bec0d48041dd683fb6ebe390d 100644 --- a/src/vs/workbench/browser/parts/views/panelViewlet.ts +++ b/src/vs/workbench/browser/parts/views/panelViewlet.ts @@ -199,12 +199,13 @@ export class PanelViewlet extends Viewlet { constructor( id: string, private options: IViewsViewletOptions, + @IConfigurationService configurationService: IConfigurationService, @IPartService partService: IPartService, @IContextMenuService protected contextMenuService: IContextMenuService, @ITelemetryService telemetryService: ITelemetryService, @IThemeService themeService: IThemeService ) { - super(id, partService, telemetryService, themeService); + super(id, configurationService, partService, telemetryService, themeService); } create(parent: HTMLElement): TPromise { diff --git a/src/vs/workbench/browser/parts/views/viewsViewlet.ts b/src/vs/workbench/browser/parts/views/viewsViewlet.ts index b2544d75ffe590ac057a80898cc5164fce594476..062fd046de55b979375229e78c8a0fc53bb3fb8f 100644 --- a/src/vs/workbench/browser/parts/views/viewsViewlet.ts +++ b/src/vs/workbench/browser/parts/views/viewsViewlet.ts @@ -123,6 +123,7 @@ export abstract class ViewContainerViewlet extends PanelViewlet implements IView id: string, viewletStateStorageId: string, showHeaderInTitleWhenSingleView: boolean, + @IConfigurationService configurationService: IConfigurationService, @IPartService partService: IPartService, @ITelemetryService telemetryService: ITelemetryService, @IStorageService protected storageService: IStorageService, @@ -132,7 +133,7 @@ export abstract class ViewContainerViewlet extends PanelViewlet implements IView @IExtensionService protected extensionService: IExtensionService, @IWorkspaceContextService protected contextService: IWorkspaceContextService ) { - super(id, { showHeaderInTitleWhenSingleView, dnd: new DefaultPanelDndController() }, partService, contextMenuService, telemetryService, themeService); + super(id, { showHeaderInTitleWhenSingleView, dnd: new DefaultPanelDndController() }, configurationService, partService, contextMenuService, telemetryService, themeService); const container = Registry.as(ViewContainerExtensions.ViewContainersRegistry).get(id); this.viewsModel = this._register(this.instantiationService.createInstance(PersistentContributableViewsModel, container, viewletStateStorageId)); diff --git a/src/vs/workbench/browser/viewlet.ts b/src/vs/workbench/browser/viewlet.ts index 2da09e2e5782803e889361db66483f40309f829e..7412bfc1e67f25d0f86a32fd3b4f86d28e6430aa 100644 --- a/src/vs/workbench/browser/viewlet.ts +++ b/src/vs/workbench/browser/viewlet.ts @@ -19,10 +19,13 @@ import { IPartService, Parts } from 'vs/workbench/services/part/common/partServi import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IEditorGroupsService } from 'vs/workbench/services/group/common/editorGroupsService'; import { URI } from 'vs/base/common/uri'; +import { ToggleSidebarPositionAction } from 'vs/workbench/browser/actions/toggleSidebarPosition'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; export abstract class Viewlet extends Composite implements IViewlet { constructor(id: string, + protected configurationService: IConfigurationService, private partService: IPartService, telemetryService: ITelemetryService, themeService: IThemeService @@ -35,12 +38,14 @@ export abstract class Viewlet extends Composite implements IViewlet { } getContextMenuActions(): IAction[] { - return [{ - id: ToggleSidebarVisibilityAction.ID, - label: nls.localize('compositePart.hideSideBarLabel', "Hide Side Bar"), - enabled: true, - run: () => this.partService.setSideBarHidden(true) - }]; + const toggleSidebarPositionAction = new ToggleSidebarPositionAction(ToggleSidebarPositionAction.ID, ToggleSidebarPositionAction.getLabel(this.partService), this.partService, this.configurationService); + return [toggleSidebarPositionAction, + { + id: ToggleSidebarVisibilityAction.ID, + label: nls.localize('compositePart.hideSideBarLabel', "Hide Side Bar"), + enabled: true, + run: () => this.partService.setSideBarHidden(true) + }]; } } diff --git a/src/vs/workbench/parts/debug/browser/debugViewlet.ts b/src/vs/workbench/parts/debug/browser/debugViewlet.ts index b265d9c1aa0344897484332ee6192f0805719161..320f1905966ab8cbb2dff42bc5c6d8e6409c5dd2 100644 --- a/src/vs/workbench/parts/debug/browser/debugViewlet.ts +++ b/src/vs/workbench/parts/debug/browser/debugViewlet.ts @@ -48,11 +48,11 @@ export class DebugViewlet extends ViewContainerViewlet { @IThemeService themeService: IThemeService, @IContextMenuService contextMenuService: IContextMenuService, @IExtensionService extensionService: IExtensionService, - @IConfigurationService private configurationService: IConfigurationService, + @IConfigurationService configurationService: IConfigurationService, @IKeybindingService private keybindingService: IKeybindingService, @IContextViewService private contextViewService: IContextViewService, ) { - super(VIEWLET_ID, `${VIEWLET_ID}.state`, false, partService, telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService); + super(VIEWLET_ID, `${VIEWLET_ID}.state`, false, configurationService, partService, telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService); this.progressRunner = null; @@ -184,4 +184,4 @@ export class DebugViewlet extends ViewContainerViewlet { this.breakpointView.maximumBodySize = allOtherCollapsed ? Number.POSITIVE_INFINITY : this.breakpointView.minimumBodySize; } } -} \ No newline at end of file +} diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts index 81f1cbff496facdc1b91704b34d95a6eaa02dfa1..15236c60b7e4d3f2a5f5f00ee563dd99fe0631fd 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts @@ -291,7 +291,7 @@ export class ExtensionsViewlet extends ViewContainerViewlet implements IExtensio @INotificationService private notificationService: INotificationService, @IViewletService private viewletService: IViewletService, @IThemeService themeService: IThemeService, - @IConfigurationService private configurationService: IConfigurationService, + @IConfigurationService configurationService: IConfigurationService, @IStorageService storageService: IStorageService, @IWorkspaceContextService contextService: IWorkspaceContextService, @IContextKeyService contextKeyService: IContextKeyService, @@ -299,7 +299,7 @@ export class ExtensionsViewlet extends ViewContainerViewlet implements IExtensio @IExtensionService extensionService: IExtensionService, @IExtensionManagementServerService private extensionManagementServerService: IExtensionManagementServerService ) { - super(VIEWLET_ID, `${VIEWLET_ID}.state`, true, partService, telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService); + super(VIEWLET_ID, `${VIEWLET_ID}.state`, true, configurationService, partService, telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService); this.searchDelayer = new ThrottledDelayer(500); this.nonEmptyWorkspaceContextKey = NonEmptyWorkspaceContext.bindTo(contextKeyService); @@ -650,4 +650,4 @@ export class MaliciousExtensionChecker implements IWorkbenchContribution { dispose(): void { this.disposables = dispose(this.disposables); } -} \ No newline at end of file +} diff --git a/src/vs/workbench/parts/files/electron-browser/explorerViewlet.ts b/src/vs/workbench/parts/files/electron-browser/explorerViewlet.ts index 37eabbdb03a1184dde8f36e4042adc0bceb76471..75154039abfe57638582bcfb574f148ccce776b4 100644 --- a/src/vs/workbench/parts/files/electron-browser/explorerViewlet.ts +++ b/src/vs/workbench/parts/files/electron-browser/explorerViewlet.ts @@ -163,14 +163,14 @@ export class ExplorerViewlet extends ViewContainerViewlet implements IExplorerVi @IStorageService protected storageService: IStorageService, @IEditorService private editorService: IEditorService, @IEditorGroupsService private editorGroupService: IEditorGroupsService, - @IConfigurationService private configurationService: IConfigurationService, + @IConfigurationService configurationService: IConfigurationService, @IInstantiationService protected instantiationService: IInstantiationService, @IContextKeyService contextKeyService: IContextKeyService, @IThemeService themeService: IThemeService, @IContextMenuService contextMenuService: IContextMenuService, @IExtensionService extensionService: IExtensionService ) { - super(VIEWLET_ID, ExplorerViewlet.EXPLORER_VIEWS_STATE, true, partService, telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService); + super(VIEWLET_ID, ExplorerViewlet.EXPLORER_VIEWS_STATE, true, configurationService, partService, telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService); this.viewletState = new FileViewletState(); this.viewletVisibleContextKey = ExplorerViewletVisibleContext.bindTo(contextKeyService); diff --git a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts index e3c4f851cc01be24e095c5ea9bcb10f39f481e90..57396c57fcb9ec00aea4294fb81282183a095bfc 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts @@ -1062,9 +1062,9 @@ export class SCMViewlet extends PanelViewlet implements IViewModel, IViewsViewle @IWorkspaceContextService contextService: IWorkspaceContextService, @IStorageService storageService: IStorageService, @IExtensionService extensionService: IExtensionService, - @IConfigurationService private configurationService: IConfigurationService, + @IConfigurationService configurationService: IConfigurationService, ) { - super(VIEWLET_ID, { showHeaderInTitleWhenSingleView: true, dnd: new SCMPanelDndController() }, partService, contextMenuService, telemetryService, themeService); + super(VIEWLET_ID, { showHeaderInTitleWhenSingleView: true, dnd: new SCMPanelDndController() }, configurationService, partService, contextMenuService, telemetryService, themeService); this.menus = instantiationService.createInstance(SCMMenus, undefined); this.menus.onDidChangeTitle(this.updateTitleArea, this, this.disposables); diff --git a/src/vs/workbench/parts/search/browser/searchView.ts b/src/vs/workbench/parts/search/browser/searchView.ts index e3a25baf4cb2c7774a0edea35a317cd8ba4b6478..669e382279d1c3c9eee300b7707c582fa698cc88 100644 --- a/src/vs/workbench/parts/search/browser/searchView.ts +++ b/src/vs/workbench/parts/search/browser/searchView.ts @@ -126,7 +126,7 @@ export class SearchView extends Viewlet implements IViewlet, IPanel { @IStorageService private storageService: IStorageService, @IContextViewService private contextViewService: IContextViewService, @IInstantiationService private instantiationService: IInstantiationService, - @IConfigurationService private configurationService: IConfigurationService, + @IConfigurationService configurationService: IConfigurationService, @IWorkspaceContextService private contextService: IWorkspaceContextService, @ISearchWorkbenchService private searchWorkbenchService: ISearchWorkbenchService, @IContextKeyService private contextKeyService: IContextKeyService, @@ -137,7 +137,7 @@ export class SearchView extends Viewlet implements IViewlet, IPanel { @ISearchHistoryService private searchHistoryService: ISearchHistoryService, @IEditorGroupsService private editorGroupsService: IEditorGroupsService ) { - super(VIEW_ID, partService, telemetryService, themeService); + super(VIEW_ID, configurationService, partService, telemetryService, themeService); this.viewletVisible = Constants.SearchViewVisibleKey.bindTo(contextKeyService); this.viewletFocused = Constants.SearchViewFocusedKey.bindTo(contextKeyService); @@ -1578,4 +1578,4 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { if (outlineSelectionColor) { collector.addRule(`.monaco-workbench .search-view .monaco-tree.focused .monaco-tree-row.focused.selected:not(.highlighted) .action-label:focus { outline-color: ${outlineSelectionColor} }`); } -}); \ No newline at end of file +}); diff --git a/src/vs/workbench/test/browser/viewlet.test.ts b/src/vs/workbench/test/browser/viewlet.test.ts index 9536aeb58bad1951ccc61b31aef3e77ad33a185c..3fcf80e4164b5c2d18bbde4ef8c4977f4ab59f7f 100644 --- a/src/vs/workbench/test/browser/viewlet.test.ts +++ b/src/vs/workbench/test/browser/viewlet.test.ts @@ -15,7 +15,7 @@ suite('Viewlets', () => { class TestViewlet extends Viewlet { constructor() { - super('id', null, null, null); + super('id', null, null, null, null); } public layout(dimension: any): void { @@ -53,4 +53,4 @@ suite('Viewlets', () => { assert(d === Platform.Registry.as(Extensions.Viewlets).getViewlet('reg-test-id')); assert.equal(oldCount + 1, Platform.Registry.as(Extensions.Viewlets).getViewlets().length); }); -}); \ No newline at end of file +});