Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
72517545
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,体验更适合开发者的 AI 搜索 >>
提交
72517545
编写于
4月 19, 2016
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
don't use setter injection (part of #5504)
上级
0718b12c
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
21 addition
and
44 deletion
+21
-44
src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
...vs/workbench/browser/parts/activitybar/activitybarPart.ts
+2
-6
src/vs/workbench/browser/parts/compositePart.ts
src/vs/workbench/browser/parts/compositePart.ts
+1
-6
src/vs/workbench/browser/parts/editor/editorPart.ts
src/vs/workbench/browser/parts/editor/editorPart.ts
+2
-6
src/vs/workbench/browser/parts/panel/panelPart.ts
src/vs/workbench/browser/parts/panel/panelPart.ts
+4
-1
src/vs/workbench/browser/parts/quickopen/quickOpenController.ts
.../workbench/browser/parts/quickopen/quickOpenController.ts
+2
-6
src/vs/workbench/browser/parts/sidebar/sidebarPart.ts
src/vs/workbench/browser/parts/sidebar/sidebarPart.ts
+4
-1
src/vs/workbench/browser/parts/statusbar/statusbarPart.ts
src/vs/workbench/browser/parts/statusbar/statusbarPart.ts
+2
-7
src/vs/workbench/browser/workbench.ts
src/vs/workbench/browser/workbench.ts
+1
-7
src/vs/workbench/common/contributions.ts
src/vs/workbench/common/contributions.ts
+1
-3
src/vs/workbench/test/browser/parts/quickOpen/quickopen.test.ts
.../workbench/test/browser/parts/quickOpen/quickopen.test.ts
+2
-1
未找到文件。
src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
浏览文件 @
72517545
...
...
@@ -34,7 +34,6 @@ export class ActivitybarPart extends Part implements IActivityService {
private
globalToolBar
:
ToolBar
;
private
activityActionItems
:
{
[
actionId
:
string
]:
IActionItem
;
};
private
viewletIdToActions
:
{
[
viewletId
:
string
]:
ActivityAction
;
};
private
instantiationService
:
IInstantiationService
;
constructor
(
id
:
string
,
...
...
@@ -43,7 +42,8 @@ export class ActivitybarPart extends Part implements IActivityService {
@
ITelemetryService
private
telemetryService
:
ITelemetryService
,
@
IEventService
private
eventService
:
IEventService
,
@
IContextMenuService
private
contextMenuService
:
IContextMenuService
,
@
IKeybindingService
private
keybindingService
:
IKeybindingService
@
IKeybindingService
private
keybindingService
:
IKeybindingService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
)
{
super
(
id
);
...
...
@@ -53,10 +53,6 @@ export class ActivitybarPart extends Part implements IActivityService {
this
.
registerListeners
();
}
public
setInstantiationService
(
service
:
IInstantiationService
):
void
{
this
.
instantiationService
=
service
;
}
private
registerListeners
():
void
{
// Activate viewlet action on opening of a viewlet
...
...
src/vs/workbench/browser/parts/compositePart.ts
浏览文件 @
72517545
...
...
@@ -38,8 +38,6 @@ import {ITelemetryService} from 'vs/platform/telemetry/common/telemetry';
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybindingService
'
;
export
abstract
class
CompositePart
<
T
extends
Composite
>
extends
Part
{
protected
instantiationService
:
IInstantiationService
;
private
activeCompositeListeners
:
{
():
void
;
}[];
private
instantiatedCompositeListeners
:
{
():
void
;
}[];
private
mapCompositeToCompositeContainer
:
{
[
compositeId
:
string
]:
Builder
;
};
...
...
@@ -64,6 +62,7 @@ export abstract class CompositePart<T extends Composite> extends Part {
private
contextMenuService
:
IContextMenuService
,
protected
partService
:
IPartService
,
private
keybindingService
:
IKeybindingService
,
protected
instantiationService
:
IInstantiationService
,
private
registry
:
CompositeRegistry
<
T
>
,
private
activeCompositeSettingsKey
:
string
,
private
nameForTelemetry
:
string
,
...
...
@@ -83,10 +82,6 @@ export abstract class CompositePart<T extends Composite> extends Part {
this
.
compositeLoaderPromises
=
{};
}
public
setInstantiationService
(
service
:
IInstantiationService
):
void
{
this
.
instantiationService
=
service
;
}
protected
openComposite
(
id
:
string
,
focus
?:
boolean
):
TPromise
<
Composite
>
{
// Check if composite already visible and just focus in that case
if
(
this
.
activeComposite
&&
this
.
activeComposite
.
getId
()
===
id
)
{
...
...
src/vs/workbench/browser/parts/editor/editorPart.ts
浏览文件 @
72517545
...
...
@@ -64,7 +64,6 @@ interface IEditorState {
* editor for the given input to show the contents. The editor part supports up to 3 side-by-side editors.
*/
export
class
EditorPart
extends
Part
implements
IEditorPart
{
private
instantiationService
:
IInstantiationService
;
private
dimension
:
Dimension
;
private
sideBySideControl
:
SideBySideEditorControl
;
private
memento
:
any
;
...
...
@@ -90,7 +89,8 @@ export class EditorPart extends Part implements IEditorPart {
@
IEventService
private
eventService
:
IEventService
,
@
ITelemetryService
private
telemetryService
:
ITelemetryService
,
@
IStorageService
private
storageService
:
IStorageService
,
@
IPartService
private
partService
:
IPartService
@
IPartService
private
partService
:
IPartService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
)
{
super
(
id
);
...
...
@@ -120,10 +120,6 @@ export class EditorPart extends Part implements IEditorPart {
this
.
pendingEditorInputCloseTimeout
=
null
;
}
public
setInstantiationService
(
service
:
IInstantiationService
):
void
{
this
.
instantiationService
=
service
;
}
private
createPositionArray
(
multiArray
:
boolean
):
any
[]
{
let
array
:
any
[]
=
[];
...
...
src/vs/workbench/browser/parts/panel/panelPart.ts
浏览文件 @
72517545
...
...
@@ -26,6 +26,7 @@ import {IMessageService} from 'vs/platform/message/common/message';
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybindingService
'
;
import
{
IKeyboardEvent
}
from
'
vs/base/browser/keyboardEvent
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
export
class
PanelPart
extends
CompositePart
<
Panel
>
implements
IPanelService
{
...
...
@@ -42,7 +43,8 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService {
@
ITelemetryService
telemetryService
:
ITelemetryService
,
@
IContextMenuService
contextMenuService
:
IContextMenuService
,
@
IPartService
partService
:
IPartService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
@
IKeybindingService
keybindingService
:
IKeybindingService
,
@
IInstantiationService
instantiationService
:
IInstantiationService
)
{
super
(
messageService
,
...
...
@@ -52,6 +54,7 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService {
contextMenuService
,
partService
,
keybindingService
,
instantiationService
,
(
<
PanelRegistry
>
Registry
.
as
(
PanelExtensions
.
Panels
)),
PanelPart
.
activePanelSettingsKey
,
'
panel
'
,
...
...
src/vs/workbench/browser/parts/quickopen/quickOpenController.ts
浏览文件 @
72517545
...
...
@@ -69,7 +69,6 @@ export class QuickOpenController extends WorkbenchComponent implements IQuickOpe
private
_onShow
:
Emitter
<
void
>
;
private
_onHide
:
Emitter
<
void
>
;
private
instantiationService
:
IInstantiationService
;
private
quickOpenWidget
:
QuickOpenWidget
;
private
pickOpenWidget
:
QuickOpenWidget
;
private
layoutDimensions
:
Dimension
;
...
...
@@ -94,7 +93,8 @@ export class QuickOpenController extends WorkbenchComponent implements IQuickOpe
@
IMessageService
private
messageService
:
IMessageService
,
@
ITelemetryService
private
telemetryService
:
ITelemetryService
,
@
IWorkspaceContextService
private
contextService
:
IWorkspaceContextService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
@
IKeybindingService
keybindingService
:
IKeybindingService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
)
{
super
(
ID
);
...
...
@@ -117,10 +117,6 @@ export class QuickOpenController extends WorkbenchComponent implements IQuickOpe
return
this
.
_onHide
.
event
;
}
public
setInstantiationService
(
service
:
IInstantiationService
):
void
{
this
.
instantiationService
=
service
;
}
public
getEditorHistoryModel
():
EditorHistoryModel
{
return
this
.
editorHistoryModel
;
}
...
...
src/vs/workbench/browser/parts/sidebar/sidebarPart.ts
浏览文件 @
72517545
...
...
@@ -23,6 +23,7 @@ import {IMessageService} from 'vs/platform/message/common/message';
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybindingService
'
;
import
{
KeyMod
,
KeyCode
}
from
'
vs/base/common/keyCodes
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
export
class
SidebarPart
extends
CompositePart
<
Viewlet
>
implements
IViewletService
{
...
...
@@ -40,7 +41,8 @@ export class SidebarPart extends CompositePart<Viewlet> implements IViewletServi
@
ITelemetryService
telemetryService
:
ITelemetryService
,
@
IContextMenuService
contextMenuService
:
IContextMenuService
,
@
IPartService
partService
:
IPartService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
@
IKeybindingService
keybindingService
:
IKeybindingService
,
@
IInstantiationService
instantiationService
:
IInstantiationService
)
{
super
(
messageService
,
...
...
@@ -50,6 +52,7 @@ export class SidebarPart extends CompositePart<Viewlet> implements IViewletServi
contextMenuService
,
partService
,
keybindingService
,
instantiationService
,
(
<
ViewletRegistry
>
Registry
.
as
(
ViewletExtensions
.
Viewlets
)),
SidebarPart
.
activeViewletSettingsKey
,
'
sideBar
'
,
...
...
src/vs/workbench/browser/parts/statusbar/statusbarPart.ts
浏览文件 @
72517545
...
...
@@ -36,20 +36,15 @@ export class StatusbarPart extends Part implements IStatusbarService {
private
toDispose
:
IDisposable
[];
private
statusItemsContainer
:
Builder
;
private
instantiationService
:
IInstantiationService
;
constructor
(
id
:
string
id
:
string
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
)
{
super
(
id
);
this
.
toDispose
=
[];
}
public
setInstantiationService
(
service
:
IInstantiationService
):
void
{
this
.
instantiationService
=
service
;
}
public
addEntry
(
entry
:
IStatusbarEntry
,
alignment
:
StatusbarAlignment
,
priority
:
number
=
0
):
IDisposable
{
// Render entry in status bar
...
...
src/vs/workbench/browser/workbench.ts
浏览文件 @
72517545
...
...
@@ -340,7 +340,7 @@ export class Workbench implements IPartService {
serviceCollection
.
set
(
IQuickOpenService
,
this
.
quickOpen
);
// Status bar
this
.
statusbarPart
=
new
StatusbarPart
(
Identifiers
.
STATUSBAR_PART
);
this
.
statusbarPart
=
this
.
instantiationService
.
createInstance
(
StatusbarPart
,
Identifiers
.
STATUSBAR_PART
);
this
.
toDispose
.
push
(
this
.
statusbarPart
);
this
.
toShutdown
.
push
(
this
.
statusbarPart
);
serviceCollection
.
set
(
IStatusbarService
,
this
.
statusbarPart
);
...
...
@@ -361,12 +361,6 @@ export class Workbench implements IPartService {
if
(
this
.
messageService
instanceof
WorkbenchMessageService
)
{
(
<
WorkbenchMessageService
>
this
.
messageService
).
setWorkbenchServices
(
this
.
quickOpen
,
this
.
statusbarPart
);
}
this
.
quickOpen
.
setInstantiationService
(
this
.
instantiationService
);
this
.
statusbarPart
.
setInstantiationService
(
this
.
instantiationService
);
this
.
activitybarPart
.
setInstantiationService
(
this
.
instantiationService
);
this
.
sidebarPart
.
setInstantiationService
(
this
.
instantiationService
);
this
.
panelPart
.
setInstantiationService
(
this
.
instantiationService
);
this
.
editorPart
.
setInstantiationService
(
this
.
instantiationService
);
(
<
UntitledEditorService
>
this
.
untitledEditorService
).
setInstantiationService
(
this
.
instantiationService
);
this
.
editorService
.
setInstantiationService
(
this
.
instantiationService
);
...
...
src/vs/workbench/common/contributions.ts
浏览文件 @
72517545
...
...
@@ -5,7 +5,7 @@
'
use strict
'
;
import
{
Registry
,
BaseRegistry
}
from
'
vs/platform/platform
'
;
import
{
I
InstantiationService
,
I
ConstructorSignature0
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IConstructorSignature0
}
from
'
vs/platform/instantiation/common/instantiation
'
;
// --- Workbench Contribution Registry
...
...
@@ -38,8 +38,6 @@ export interface IWorkbenchContributionsRegistry {
* Returns all workbench contributions that are known to the platform.
*/
getWorkbenchContributions
():
IWorkbenchContribution
[];
setInstantiationService
(
service
:
IInstantiationService
):
void
;
}
class
WorkbenchContributionsRegistry
extends
BaseRegistry
<
IWorkbenchContribution
>
implements
IWorkbenchContributionsRegistry
{
...
...
src/vs/workbench/test/browser/parts/quickOpen/quickopen.test.ts
浏览文件 @
72517545
...
...
@@ -218,7 +218,8 @@ suite('Workbench QuickOpen', () => {
null
,
null
,
contextService
,
new
MockKeybindingService
()
new
MockKeybindingService
(),
null
);
controller
.
create
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录