Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
82d9fb51
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,发现更多精彩内容 >>
提交
82d9fb51
编写于
9月 05, 2016
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debt - get rid of identifiers.ts
上级
96f78171
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
31 addition
and
26 deletion
+31
-26
src/vs/test/utils/servicesTestUtils.ts
src/vs/test/utils/servicesTestUtils.ts
+1
-0
src/vs/workbench/browser/parts/quickopen/quickOpenController.ts
.../workbench/browser/parts/quickopen/quickOpenController.ts
+5
-4
src/vs/workbench/common/constants.ts
src/vs/workbench/common/constants.ts
+0
-16
src/vs/workbench/electron-browser/window.ts
src/vs/workbench/electron-browser/window.ts
+4
-3
src/vs/workbench/electron-browser/workbench.ts
src/vs/workbench/electron-browser/workbench.ts
+13
-1
src/vs/workbench/parts/debug/browser/debugActionsWidget.ts
src/vs/workbench/parts/debug/browser/debugActionsWidget.ts
+3
-2
src/vs/workbench/services/part/common/partService.ts
src/vs/workbench/services/part/common/partService.ts
+5
-0
未找到文件。
src/vs/test/utils/servicesTestUtils.ts
浏览文件 @
82d9fb51
...
...
@@ -197,6 +197,7 @@ export class TestPartService implements PartService.IPartService {
public
setSideBarPosition
(
position
):
void
{
}
public
addClass
(
clazz
:
string
):
void
{
}
public
removeClass
(
clazz
:
string
):
void
{
}
public
getWorkbenchElementId
():
string
{
return
''
;
}
}
export
class
TestEventService
extends
EventEmitter
.
EventEmitter
implements
IEventService
{
...
...
src/vs/workbench/browser/parts/quickopen/quickOpenController.ts
浏览文件 @
82d9fb51
...
...
@@ -27,7 +27,7 @@ import {Registry} from 'vs/platform/platform';
import
{
EditorInput
,
getUntitledOrFileResource
,
IWorkbenchEditorConfiguration
}
from
'
vs/workbench/common/editor
'
;
import
{
WorkbenchComponent
}
from
'
vs/workbench/common/component
'
;
import
Event
,
{
Emitter
}
from
'
vs/base/common/event
'
;
import
{
I
dentifiers
}
from
'
vs/workbench/common/constants
'
;
import
{
I
PartService
}
from
'
vs/workbench/services/part/common/partService
'
;
import
{
KeyMod
}
from
'
vs/base/common/keyCodes
'
;
import
{
QuickOpenHandler
,
QuickOpenHandlerDescriptor
,
IQuickOpenRegistry
,
Extensions
,
EditorQuickOpenEntry
}
from
'
vs/workbench/browser/quickopen
'
;
import
errors
=
require
(
'
vs/base/common/errors
'
);
...
...
@@ -104,7 +104,8 @@ export class QuickOpenController extends WorkbenchComponent implements IQuickOpe
@
IContextKeyService
contextKeyService
:
IContextKeyService
,
@
IConfigurationService
private
configurationService
:
IConfigurationService
,
@
IHistoryService
private
historyService
:
IHistoryService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
@
IPartService
private
partService
:
IPartService
)
{
super
(
QuickOpenController
.
ID
);
...
...
@@ -261,7 +262,7 @@ export class QuickOpenController extends WorkbenchComponent implements IQuickOpe
// Create upon first open
if
(
!
this
.
pickOpenWidget
)
{
this
.
pickOpenWidget
=
new
QuickOpenWidget
(
withElementById
(
Identifiers
.
WORKBENCH_CONTAINER
).
getHTMLElement
(),
withElementById
(
this
.
partService
.
getWorkbenchElementId
()
).
getHTMLElement
(),
{
onOk
:
()
=>
{
/* ignore, handle later */
},
onCancel
:
()
=>
{
/* ignore, handle later */
},
...
...
@@ -499,7 +500,7 @@ export class QuickOpenController extends WorkbenchComponent implements IQuickOpe
// Create upon first open
if
(
!
this
.
quickOpenWidget
)
{
this
.
quickOpenWidget
=
new
QuickOpenWidget
(
withElementById
(
Identifiers
.
WORKBENCH_CONTAINER
).
getHTMLElement
(),
withElementById
(
this
.
partService
.
getWorkbenchElementId
()
).
getHTMLElement
(),
{
onOk
:
()
=>
{
/* ignore */
},
onCancel
:
()
=>
{
/* ignore */
},
...
...
src/vs/workbench/common/constants.ts
已删除
100644 → 0
浏览文件 @
96f78171
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
// Container Identifiers
export
const
Identifiers
=
{
WORKBENCH_CONTAINER
:
'
workbench.main.container
'
,
ACTIVITYBAR_PART
:
'
workbench.parts.activitybar
'
,
SIDEBAR_PART
:
'
workbench.parts.sidebar
'
,
PANEL_PART
:
'
workbench.parts.panel
'
,
EDITOR_PART
:
'
workbench.parts.editor
'
,
STATUSBAR_PART
:
'
workbench.parts.statusbar
'
};
\ No newline at end of file
src/vs/workbench/electron-browser/window.ts
浏览文件 @
82d9fb51
...
...
@@ -10,7 +10,7 @@ import URI from 'vs/base/common/uri';
import
DOM
=
require
(
'
vs/base/browser/dom
'
);
import
DND
=
require
(
'
vs/base/browser/dnd
'
);
import
{
Builder
,
$
}
from
'
vs/base/browser/builder
'
;
import
{
I
dentifiers
}
from
'
vs/workbench/common/constants
'
;
import
{
I
PartService
}
from
'
vs/workbench/services/part/common/partService
'
;
import
{
asFileEditorInput
}
from
'
vs/workbench/common/editor
'
;
import
{
IViewletService
}
from
'
vs/workbench/services/viewlet/common/viewletService
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
...
...
@@ -42,7 +42,8 @@ export class ElectronWindow {
@
IStorageService
private
storageService
:
IStorageService
,
@
IWorkbenchEditorService
private
editorService
:
IWorkbenchEditorService
,
@
IEditorGroupService
private
editorGroupService
:
IEditorGroupService
,
@
IViewletService
private
viewletService
:
IViewletService
@
IViewletService
private
viewletService
:
IViewletService
,
@
IPartService
private
partService
:
IPartService
)
{
this
.
win
=
win
;
this
.
windowId
=
win
.
id
;
...
...
@@ -89,7 +90,7 @@ export class ElectronWindow {
return
kind
===
DraggedFileType
.
FOLDER
||
kind
===
DraggedFileType
.
EXTENSION
;
}))
{
dropOverlay
=
$
(
window
.
document
.
getElementById
(
Identifiers
.
WORKBENCH_CONTAINER
))
dropOverlay
=
$
(
window
.
document
.
getElementById
(
this
.
partService
.
getWorkbenchElementId
()
))
.
div
({
id
:
'
monaco-workbench-drop-overlay
'
})
.
on
(
DOM
.
EventType
.
DROP
,
(
e
:
DragEvent
)
=>
{
DOM
.
EventHelper
.
stop
(
e
,
true
);
...
...
src/vs/workbench/electron-browser/workbench.ts
浏览文件 @
82d9fb51
...
...
@@ -17,7 +17,6 @@ import assert = require('vs/base/common/assert');
import
timer
=
require
(
'
vs/base/common/timer
'
);
import
errors
=
require
(
'
vs/base/common/errors
'
);
import
{
Registry
}
from
'
vs/platform/platform
'
;
import
{
Identifiers
}
from
'
vs/workbench/common/constants
'
;
import
{
isWindows
,
isLinux
}
from
'
vs/base/common/platform
'
;
import
{
IOptions
}
from
'
vs/workbench/common/options
'
;
import
{
IWorkbenchContributionsRegistry
,
Extensions
as
WorkbenchExtensions
}
from
'
vs/workbench/common/contributions
'
;
...
...
@@ -86,6 +85,15 @@ export interface IWorkbenchCallbacks {
onWorkbenchStarted
?:
(
customKeybindingsCount
:
number
)
=>
void
;
}
const
Identifiers
=
{
WORKBENCH_CONTAINER
:
'
workbench.main.container
'
,
ACTIVITYBAR_PART
:
'
workbench.parts.activitybar
'
,
SIDEBAR_PART
:
'
workbench.parts.sidebar
'
,
PANEL_PART
:
'
workbench.parts.panel
'
,
EDITOR_PART
:
'
workbench.parts.editor
'
,
STATUSBAR_PART
:
'
workbench.parts.statusbar
'
};
/**
* The workbench creates and lays out all parts that make up the workbench.
*/
...
...
@@ -811,4 +819,8 @@ export class Workbench implements IPartService {
this
.
workbench
.
removeClass
(
clazz
);
}
}
public
getWorkbenchElementId
():
string
{
return
Identifiers
.
WORKBENCH_CONTAINER
;
}
}
\ No newline at end of file
src/vs/workbench/parts/debug/browser/debugActionsWidget.ts
浏览文件 @
82d9fb51
...
...
@@ -12,7 +12,7 @@ import {StandardMouseEvent} from 'vs/base/browser/mouseEvent';
import
actions
=
require
(
'
vs/base/common/actions
'
);
import
events
=
require
(
'
vs/base/common/events
'
);
import
actionbar
=
require
(
'
vs/base/browser/ui/actionbar/actionbar
'
);
import
constants
=
require
(
'
vs/workbench/common/constants
'
)
;
import
{
IPartService
}
from
'
vs/workbench/services/part/common/partService
'
;
import
wbext
=
require
(
'
vs/workbench/common/contributions
'
);
import
debug
=
require
(
'
vs/workbench/parts/debug/common/debug
'
);
import
{
PauseAction
,
ContinueAction
,
StepBackAction
,
StopAction
,
DisconnectAction
,
StepOverAction
,
StepIntoAction
,
StepOutAction
,
RestartAction
}
from
'
vs/workbench/parts/debug/browser/debugActions
'
;
...
...
@@ -47,6 +47,7 @@ export class DebugActionsWidget implements wbext.IWorkbenchContribution {
@
ITelemetryService
private
telemetryService
:
ITelemetryService
,
@
IDebugService
private
debugService
:
IDebugService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
@
IPartService
private
partService
:
IPartService
,
@
IStorageService
private
storageService
:
IStorageService
)
{
this
.
$el
=
$
().
div
().
addClass
(
'
debug-actions-widget
'
);
...
...
@@ -146,7 +147,7 @@ export class DebugActionsWidget implements wbext.IWorkbenchContribution {
}
if
(
!
this
.
isBuilt
)
{
this
.
isBuilt
=
true
;
this
.
$el
.
build
(
builder
.
withElementById
(
constants
.
Identifiers
.
WORKBENCH_CONTAINER
).
getHTMLElement
());
this
.
$el
.
build
(
builder
.
withElementById
(
this
.
partService
.
getWorkbenchElementId
()
).
getHTMLElement
());
}
this
.
isVisible
=
true
;
...
...
src/vs/workbench/services/part/common/partService.ts
浏览文件 @
82d9fb51
...
...
@@ -100,4 +100,9 @@ export interface IPartService {
* Removes a class from the workbench part.
*/
removeClass
(
clazz
:
string
):
void
;
/**
* Returns the identifier of the element that contains the workbench.
*/
getWorkbenchElementId
():
string
;
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录