From 7a5890ca3238850b70bf7b8485e2b8673842b527 Mon Sep 17 00:00:00 2001 From: "sj.hwang" Date: Fri, 10 Mar 2017 09:18:59 +0900 Subject: [PATCH] Change space to pass Hygiene --- src/vs/workbench/electron-browser/actions.ts | 136 +++++++++---------- 1 file changed, 68 insertions(+), 68 deletions(-) diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index b181e2ffc2e..1a143b0b7a7 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -30,10 +30,10 @@ import * as browser from 'vs/base/browser/browser'; import { IIntegrityService } from 'vs/platform/integrity/common/integrity'; import { IEntryRunContext } from 'vs/base/parts/quickopen/common/quickOpen'; import { ITimerService, IStartupMetrics } from 'vs/workbench/services/timer/common/timerService'; -import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; -import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; -import { IPartService, Parts, Position as SidebarPosition } from 'vs/workbench/services/part/common/partService'; -import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; +import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; +import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; +import { IPartService, Parts, Position as SidebarPosition } from 'vs/workbench/services/part/common/partService'; +import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import * as os from 'os'; import { webFrame } from 'electron'; @@ -924,103 +924,103 @@ export class ToggleSharedProcessAction extends Action { } } -export abstract class BaseNavigationAction extends Action { +export abstract class BaseNavigationAction extends Action { constructor( - id: string, - label: string, - @IWorkbenchEditorService protected editorService: IWorkbenchEditorService, - @IEditorGroupService protected groupService: IEditorGroupService, - @IPanelService protected panelService: IPanelService, - @IPartService protected partService: IPartService, - @IViewletService protected viewletService: IViewletService - ) { - super(id, label); - } - - public run(): TPromise { - const isEditorFocus = this.partService.hasFocus(Parts.EDITOR_PART); - const isPanelFocus = this.partService.hasFocus(Parts.PANEL_PART); - const isSidebarFocus = this.partService.hasFocus(Parts.SIDEBAR_PART); - - const isEditorGroupVertical = this.groupService.getGroupOrientation() === 'vertical'; - const isSidebarPositionLeft = this.partService.getSideBarPosition() === SidebarPosition.LEFT; - - if (isEditorFocus) { - return this.navigateOnEditorFocus(isEditorGroupVertical, isSidebarPositionLeft); + id: string, + label: string, + @IWorkbenchEditorService protected editorService: IWorkbenchEditorService, + @IEditorGroupService protected groupService: IEditorGroupService, + @IPanelService protected panelService: IPanelService, + @IPartService protected partService: IPartService, + @IViewletService protected viewletService: IViewletService + ) { + super(id, label); + } + + public run(): TPromise { + const isEditorFocus = this.partService.hasFocus(Parts.EDITOR_PART); + const isPanelFocus = this.partService.hasFocus(Parts.PANEL_PART); + const isSidebarFocus = this.partService.hasFocus(Parts.SIDEBAR_PART); + + const isEditorGroupVertical = this.groupService.getGroupOrientation() === 'vertical'; + const isSidebarPositionLeft = this.partService.getSideBarPosition() === SidebarPosition.LEFT; + + if (isEditorFocus) { + return this.navigateOnEditorFocus(isEditorGroupVertical, isSidebarPositionLeft); } - if (isPanelFocus) { - return this.navigateOnPanelFocus(isEditorGroupVertical, isSidebarPositionLeft); + if (isPanelFocus) { + return this.navigateOnPanelFocus(isEditorGroupVertical, isSidebarPositionLeft); } - if (isSidebarFocus) { - return this.navigateOnSidebarFocus(isEditorGroupVertical, isSidebarPositionLeft); + if (isSidebarFocus) { + return this.navigateOnSidebarFocus(isEditorGroupVertical, isSidebarPositionLeft); } - return TPromise.as(false); + return TPromise.as(false); } - protected navigateOnEditorFocus(isEditorGroupVertical: boolean, isSidebarPositionLeft: boolean): TPromise { - return TPromise.as(true); + protected navigateOnEditorFocus(isEditorGroupVertical: boolean, isSidebarPositionLeft: boolean): TPromise { + return TPromise.as(true); } - protected navigateOnPanelFocus(isEditorGroupVertical: boolean, isSidebarPositionLeft: boolean): TPromise { - return TPromise.as(true); + protected navigateOnPanelFocus(isEditorGroupVertical: boolean, isSidebarPositionLeft: boolean): TPromise { + return TPromise.as(true); } - protected navigateOnSidebarFocus(isEditorGroupVertical: boolean, isSidebarPositionLeft: boolean): TPromise { - return TPromise.as(true); + protected navigateOnSidebarFocus(isEditorGroupVertical: boolean, isSidebarPositionLeft: boolean): TPromise { + return TPromise.as(true); } - protected navigateToPanel(): TPromise { - if (!this.partService.isVisible(Parts.PANEL_PART)) { - return TPromise.as(false); + protected navigateToPanel(): TPromise { + if (!this.partService.isVisible(Parts.PANEL_PART)) { + return TPromise.as(false); } - const activePanelId = this.panelService.getActivePanel().getId(); - return this.panelService.openPanel(activePanelId, true); + const activePanelId = this.panelService.getActivePanel().getId(); + return this.panelService.openPanel(activePanelId, true); } - protected navigateToSidebar(): TPromise { - if (!this.partService.isVisible(Parts.SIDEBAR_PART)) { - return TPromise.as(false); + protected navigateToSidebar(): TPromise { + if (!this.partService.isVisible(Parts.SIDEBAR_PART)) { + return TPromise.as(false); } - const activeViewletId = this.viewletService.getActiveViewlet().getId(); - return this.viewletService.openViewlet(activeViewletId, true); + const activeViewletId = this.viewletService.getActiveViewlet().getId(); + return this.viewletService.openViewlet(activeViewletId, true); } - protected navigateToLastActiveEditor(): TPromise { - const model = this.groupService.getStacksModel(); - if (model.groups.length < 1) { - return null; + protected navigateToLastActiveEditor(): TPromise { + const model = this.groupService.getStacksModel(); + if (model.groups.length < 1) { + return null; } - const lastGroup = model.activeGroup; - const activeEditor = lastGroup.activeEditor; - return this.editorService.openEditor(activeEditor, null, model.positionOfGroup(lastGroup)); + const lastGroup = model.activeGroup; + const activeEditor = lastGroup.activeEditor; + return this.editorService.openEditor(activeEditor, null, model.positionOfGroup(lastGroup)); } - protected navigateToStartOfEditor(): TPromise { - const model = this.groupService.getStacksModel(); - if (model.groups.length < 1) { - return null; + protected navigateToStartOfEditor(): TPromise { + const model = this.groupService.getStacksModel(); + if (model.groups.length < 1) { + return null; } - const firstGroup = model.getGroup(0); - const firstEditor = firstGroup.getEditor(0); - return this.editorService.openEditor(firstEditor, null, model.positionOfGroup(firstGroup)); + const firstGroup = model.getGroup(0); + const firstEditor = firstGroup.getEditor(0); + return this.editorService.openEditor(firstEditor, null, model.positionOfGroup(firstGroup)); } - protected navigateToEndOfEditor(): TPromise { - const model = this.groupService.getStacksModel(); - if (model.groups.length < 1) { - return null; + protected navigateToEndOfEditor(): TPromise { + const model = this.groupService.getStacksModel(); + if (model.groups.length < 1) { + return null; } - const lastGroup = model.getGroup(model.groups[model.groups.length - 1].id); - const lastEditor = lastGroup.getEditor(lastGroup.count - 1); - return this.editorService.openEditor(lastEditor, null, model.positionOfGroup(lastGroup)); + const lastGroup = model.getGroup(model.groups[model.groups.length - 1].id); + const lastEditor = lastGroup.getEditor(lastGroup.count - 1); + return this.editorService.openEditor(lastEditor, null, model.positionOfGroup(lastGroup)); } } -- GitLab