Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
ef92f85c
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ef92f85c
编写于
5月 20, 2018
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
grid - remove old group/editor services
上级
abe0207f
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
3 addition
and
744 deletion
+3
-744
src/vs/workbench/browser/parts/editor/editorPart.ts
src/vs/workbench/browser/parts/editor/editorPart.ts
+1
-2
src/vs/workbench/electron-browser/workbench.ts
src/vs/workbench/electron-browser/workbench.ts
+2
-9
src/vs/workbench/services/editor/common/editorService.ts
src/vs/workbench/services/editor/common/editorService.ts
+0
-590
src/vs/workbench/services/group/common/groupService.ts
src/vs/workbench/services/group/common/groupService.ts
+0
-141
src/vs/workbench/test/workbenchTestServices.ts
src/vs/workbench/test/workbenchTestServices.ts
+0
-2
未找到文件。
src/vs/workbench/browser/parts/editor/editorPart.ts
浏览文件 @
ef92f85c
...
@@ -28,7 +28,6 @@ import { Scope } from 'vs/workbench/common/memento';
...
@@ -28,7 +28,6 @@ import { Scope } from 'vs/workbench/common/memento';
import
{
ISerializedEditorGroup
,
isSerializedEditorGroup
}
from
'
vs/workbench/common/editor/editorGroup
'
;
import
{
ISerializedEditorGroup
,
isSerializedEditorGroup
}
from
'
vs/workbench/common/editor/editorGroup
'
;
import
{
TValueCallback
,
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
TValueCallback
,
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
always
}
from
'
vs/base/common/async
'
;
import
{
always
}
from
'
vs/base/common/async
'
;
import
{
GroupOrientation
as
LegacyGroupOrientation
}
from
'
vs/workbench/services/group/common/groupService
'
;
import
{
INotificationService
,
Severity
}
from
'
vs/platform/notification/common/notification
'
;
import
{
INotificationService
,
Severity
}
from
'
vs/platform/notification/common/notification
'
;
import
{
IWindowService
}
from
'
vs/platform/windows/common/windows
'
;
import
{
IWindowService
}
from
'
vs/platform/windows/common/windows
'
;
import
{
ILifecycleService
,
LifecyclePhase
}
from
'
vs/platform/lifecycle/common/lifecycle
'
;
import
{
ILifecycleService
,
LifecyclePhase
}
from
'
vs/platform/lifecycle/common/lifecycle
'
;
...
@@ -737,7 +736,7 @@ export class EditorPart extends Part implements INextEditorGroupsService, IEdito
...
@@ -737,7 +736,7 @@ export class EditorPart extends Part implements INextEditorGroupsService, IEdito
interface
ILegacyEditorPartUIState
{
interface
ILegacyEditorPartUIState
{
ratio
:
number
[];
ratio
:
number
[];
groupOrientation
:
LegacyGroupOrientation
;
groupOrientation
:
'
vertical
'
|
'
horizontal
'
;
}
}
interface
ISerializedLegacyEditorStacksModel
{
interface
ISerializedLegacyEditorStacksModel
{
...
...
src/vs/workbench/electron-browser/workbench.ts
浏览文件 @
ef92f85c
...
@@ -60,11 +60,9 @@ import { IConfigurationResolverService } from 'vs/workbench/services/configurati
...
@@ -60,11 +60,9 @@ import { IConfigurationResolverService } from 'vs/workbench/services/configurati
import
{
ConfigurationResolverService
}
from
'
vs/workbench/services/configurationResolver/electron-browser/configurationResolverService
'
;
import
{
ConfigurationResolverService
}
from
'
vs/workbench/services/configurationResolver/electron-browser/configurationResolverService
'
;
import
{
IPanelService
}
from
'
vs/workbench/services/panel/common/panelService
'
;
import
{
IPanelService
}
from
'
vs/workbench/services/panel/common/panelService
'
;
import
{
ITitleService
}
from
'
vs/workbench/services/title/common/titleService
'
;
import
{
ITitleService
}
from
'
vs/workbench/services/title/common/titleService
'
;
import
{
IWorkbenchEditorService
,
WorkbenchEditorService
,
NoOpEditorPart
,
IResourceInputType
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IQuickOpenService
}
from
'
vs/platform/quickOpen/common/quickOpen
'
;
import
{
IQuickOpenService
}
from
'
vs/platform/quickOpen/common/quickOpen
'
;
import
{
IClipboardService
}
from
'
vs/platform/clipboard/common/clipboardService
'
;
import
{
IClipboardService
}
from
'
vs/platform/clipboard/common/clipboardService
'
;
import
{
ClipboardService
}
from
'
vs/platform/clipboard/electron-browser/clipboardService
'
;
import
{
ClipboardService
}
from
'
vs/platform/clipboard/electron-browser/clipboardService
'
;
import
{
IEditorGroupService
}
from
'
vs/workbench/services/group/common/groupService
'
;
import
{
IHistoryService
}
from
'
vs/workbench/services/history/common/history
'
;
import
{
IHistoryService
}
from
'
vs/workbench/services/history/common/history
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
SyncDescriptor
}
from
'
vs/platform/instantiation/common/descriptors
'
;
import
{
SyncDescriptor
}
from
'
vs/platform/instantiation/common/descriptors
'
;
...
@@ -109,7 +107,7 @@ import { IPCClient } from 'vs/base/parts/ipc/common/ipc';
...
@@ -109,7 +107,7 @@ import { IPCClient } from 'vs/base/parts/ipc/common/ipc';
import
{
registerWindowDriver
}
from
'
vs/platform/driver/electron-browser/driver
'
;
import
{
registerWindowDriver
}
from
'
vs/platform/driver/electron-browser/driver
'
;
import
{
IPreferencesService
}
from
'
vs/workbench/services/preferences/common/preferences
'
;
import
{
IPreferencesService
}
from
'
vs/workbench/services/preferences/common/preferences
'
;
import
{
PreferencesService
}
from
'
vs/workbench/services/preferences/browser/preferencesService
'
;
import
{
PreferencesService
}
from
'
vs/workbench/services/preferences/browser/preferencesService
'
;
import
{
INextEditorService
}
from
'
vs/workbench/services/editor/common/nextEditorService
'
;
import
{
INextEditorService
,
IResourceEditor
}
from
'
vs/workbench/services/editor/common/nextEditorService
'
;
import
{
INextEditorGroupsService
,
GroupDirection
}
from
'
vs/workbench/services/group/common/nextEditorGroupsService
'
;
import
{
INextEditorGroupsService
,
GroupDirection
}
from
'
vs/workbench/services/group/common/nextEditorGroupsService
'
;
import
{
NextEditorService
}
from
'
vs/workbench/services/editor/browser/nextEditorService
'
;
import
{
NextEditorService
}
from
'
vs/workbench/services/editor/browser/nextEditorService
'
;
import
{
IExtensionUrlHandler
,
ExtensionUrlHandler
}
from
'
vs/platform/url/electron-browser/inactiveExtensionUrlHandler
'
;
import
{
IExtensionUrlHandler
,
ExtensionUrlHandler
}
from
'
vs/platform/url/electron-browser/inactiveExtensionUrlHandler
'
;
...
@@ -387,11 +385,6 @@ export class Workbench extends Disposable implements IPartService {
...
@@ -387,11 +385,6 @@ export class Workbench extends Disposable implements IPartService {
this
.
editorService
=
this
.
instantiationService
.
createInstance
(
NextEditorService
);
this
.
editorService
=
this
.
instantiationService
.
createInstance
(
NextEditorService
);
serviceCollection
.
set
(
INextEditorService
,
this
.
editorService
);
serviceCollection
.
set
(
INextEditorService
,
this
.
editorService
);
// TODO@grid Remove Legacy Editor Services
const
noOpEditorPart
=
new
NoOpEditorPart
(
this
.
instantiationService
);
serviceCollection
.
set
(
IWorkbenchEditorService
,
this
.
instantiationService
.
createInstance
(
WorkbenchEditorService
,
noOpEditorPart
));
serviceCollection
.
set
(
IEditorGroupService
,
noOpEditorPart
);
// Title bar
// Title bar
this
.
titlebarPart
=
this
.
instantiationService
.
createInstance
(
TitlebarPart
,
Identifiers
.
TITLEBAR_PART
);
this
.
titlebarPart
=
this
.
instantiationService
.
createInstance
(
TitlebarPart
,
Identifiers
.
TITLEBAR_PART
);
this
.
_register
(
toDisposable
(()
=>
this
.
titlebarPart
.
shutdown
()));
this
.
_register
(
toDisposable
(()
=>
this
.
titlebarPart
.
shutdown
()));
...
@@ -714,7 +707,7 @@ export class Workbench extends Disposable implements IPartService {
...
@@ -714,7 +707,7 @@ export class Workbench extends Disposable implements IPartService {
return
restore
;
return
restore
;
}
}
private
resolveEditorsToOpen
():
TPromise
<
IResource
InputType
[]
>
{
private
resolveEditorsToOpen
():
TPromise
<
IResource
Editor
[]
>
{
const
config
=
this
.
workbenchParams
.
configuration
;
const
config
=
this
.
workbenchParams
.
configuration
;
// Files to open, diff or create
// Files to open, diff or create
...
...
src/vs/workbench/services/editor/common/editorService.ts
已删除
100644 → 0
浏览文件 @
abe0207f
此差异已折叠。
点击以展开。
src/vs/workbench/services/group/common/groupService.ts
已删除
100644 → 0
浏览文件 @
abe0207f
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
{
createDecorator
,
ServiceIdentifier
,
ServicesAccessor
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
Position
}
from
'
vs/platform/editor/common/editor
'
;
import
{
IEditorOpeningEvent
,
IEditorInput
}
from
'
vs/workbench/common/editor
'
;
import
{
Event
}
from
'
vs/base/common/event
'
;
export
enum
GroupArrangement
{
MINIMIZE_OTHERS
,
EVEN
}
export
type
GroupOrientation
=
'
vertical
'
|
'
horizontal
'
;
export
const
IEditorGroupService
=
createDecorator
<
IEditorGroupService
>
(
'
editorGroupService
'
);
export
interface
IEditorTabOptions
{
showTabs
?:
boolean
;
tabCloseButton
?:
'
left
'
|
'
right
'
|
'
off
'
;
tabSizing
?:
'
fit
'
|
'
shrink
'
;
showIcons
?:
boolean
;
previewEditors
?:
boolean
;
labelFormat
?:
'
default
'
|
'
short
'
|
'
medium
'
|
'
long
'
;
iconTheme
?:
string
;
}
export
interface
IMoveOptions
{
index
?:
number
;
inactive
?:
boolean
;
preserveFocus
?:
boolean
;
}
/**
* The editor service allows to open editors and work on the active
* editor input and models.
*/
export
interface
IEditorGroupService
{
_serviceBrand
:
ServiceIdentifier
<
any
>
;
/**
* Emitted when editors or inputs change. Examples: opening, closing of editors. Active editor change.
*/
onEditorsChanged
:
Event
<
void
>
;
/**
* Emitted when an editor is opening. Allows to prevent/replace the opening via the event method.
*/
onEditorOpening
:
Event
<
IEditorOpeningEvent
>
;
/**
* Emitted when opening an editor fails.
*/
onEditorOpenFail
:
Event
<
IEditorInput
>
;
/**
* Emitted when an entire editor group is moved to another position.
*/
onEditorGroupMoved
:
Event
<
void
>
;
/**
* Emitted when the editor group orientation was changed.
*/
onGroupOrientationChanged
:
Event
<
void
>
;
/**
* Emitted when tab options changed.
*/
onTabOptionsChanged
:
Event
<
IEditorTabOptions
>
;
/**
* Keyboard focus the editor group at the provided position.
*/
focusGroup
(
group
:
any
):
void
;
focusGroup
(
position
:
Position
):
void
;
/**
* Activate the editor group at the provided position without moving focus.
*/
activateGroup
(
group
:
any
):
void
;
activateGroup
(
position
:
Position
):
void
;
/**
* Allows to move the editor group from one position to another.
*/
moveGroup
(
from
:
any
,
to
:
any
):
void
;
moveGroup
(
from
:
Position
,
to
:
Position
):
void
;
/**
* Allows to arrange editor groups according to the GroupArrangement enumeration.
*/
arrangeGroups
(
arrangement
:
GroupArrangement
):
void
;
/**
* Changes the editor group layout between vertical and horizontal orientation. Only applies
* if more than one editor is opened.
*/
setGroupOrientation
(
orientation
:
GroupOrientation
):
void
;
/**
* Returns the current editor group layout.
*/
getGroupOrientation
():
GroupOrientation
;
/**
* Resize visible editor groups
*/
resizeGroup
(
position
:
Position
,
groupSizeChange
:
number
):
void
;
/**
* Adds the pinned state to an editor, removing it from being a preview editor.
*/
pinEditor
(
group
:
any
,
input
:
IEditorInput
):
void
;
pinEditor
(
position
:
Position
,
input
:
IEditorInput
):
void
;
/**
* Moves an editor from one group to another. The index in the group is optional.
* The inactive option is applied when moving across groups.
*/
moveEditor
(
input
:
IEditorInput
,
from
:
any
,
to
:
any
,
moveOptions
?:
IMoveOptions
):
void
;
moveEditor
(
input
:
IEditorInput
,
from
:
Position
,
to
:
Position
,
moveOptions
?:
IMoveOptions
):
void
;
/**
* Provides access to the editor stacks model
*/
getStacksModel
():
any
;
/**
* Returns tab options.
*/
getTabOptions
():
IEditorTabOptions
;
/**
* Invoke a function in the context of the active editor.
*/
invokeWithinEditorContext
<
T
>
(
fn
:
(
accessor
:
ServicesAccessor
)
=>
T
):
T
;
}
\ No newline at end of file
src/vs/workbench/test/workbenchTestServices.ts
浏览文件 @
ef92f85c
...
@@ -37,7 +37,6 @@ import { IRawTextContent, ITextFileService } from 'vs/workbench/services/textfil
...
@@ -37,7 +37,6 @@ import { IRawTextContent, ITextFileService } from 'vs/workbench/services/textfil
import
{
parseArgs
}
from
'
vs/platform/environment/node/argv
'
;
import
{
parseArgs
}
from
'
vs/platform/environment/node/argv
'
;
import
{
EnvironmentService
}
from
'
vs/platform/environment/node/environmentService
'
;
import
{
EnvironmentService
}
from
'
vs/platform/environment/node/environmentService
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IHistoryService
}
from
'
vs/workbench/services/history/common/history
'
;
import
{
IHistoryService
}
from
'
vs/workbench/services/history/common/history
'
;
import
{
IInstantiationService
,
ServicesAccessor
,
ServiceIdentifier
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IInstantiationService
,
ServicesAccessor
,
ServiceIdentifier
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
TestConfigurationService
}
from
'
vs/platform/configuration/test/common/testConfigurationService
'
;
import
{
TestConfigurationService
}
from
'
vs/platform/configuration/test/common/testConfigurationService
'
;
...
@@ -181,7 +180,6 @@ export class TestTextFileService extends TextFileService {
...
@@ -181,7 +180,6 @@ export class TestTextFileService extends TextFileService {
@
ILifecycleService
lifecycleService
:
ILifecycleService
,
@
ILifecycleService
lifecycleService
:
ILifecycleService
,
@
IWorkspaceContextService
contextService
:
IWorkspaceContextService
,
@
IWorkspaceContextService
contextService
:
IWorkspaceContextService
,
@
IConfigurationService
configurationService
:
IConfigurationService
,
@
IConfigurationService
configurationService
:
IConfigurationService
,
@
IWorkbenchEditorService
editorService
:
IWorkbenchEditorService
,
@
IFileService
fileService
:
IFileService
,
@
IFileService
fileService
:
IFileService
,
@
IUntitledEditorService
untitledEditorService
:
IUntitledEditorService
,
@
IUntitledEditorService
untitledEditorService
:
IUntitledEditorService
,
@
IInstantiationService
instantiationService
:
IInstantiationService
,
@
IInstantiationService
instantiationService
:
IInstantiationService
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录