Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
043ff9f7
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,发现更多精彩内容 >>
提交
043ff9f7
编写于
8月 25, 2016
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
first wiring of update-call, #1396
上级
77e2cf8c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
30 addition
and
13 deletion
+30
-13
src/vs/workbench/api/node/extHost.api.impl.ts
src/vs/workbench/api/node/extHost.api.impl.ts
+1
-1
src/vs/workbench/api/node/extHost.contribution.ts
src/vs/workbench/api/node/extHost.contribution.ts
+1
-0
src/vs/workbench/api/node/extHost.protocol.ts
src/vs/workbench/api/node/extHost.protocol.ts
+7
-0
src/vs/workbench/api/node/extHostConfiguration.ts
src/vs/workbench/api/node/extHostConfiguration.ts
+6
-3
src/vs/workbench/api/node/mainThreadConfiguration.ts
src/vs/workbench/api/node/mainThreadConfiguration.ts
+15
-9
未找到文件。
src/vs/workbench/api/node/extHost.api.impl.ts
浏览文件 @
043ff9f7
...
@@ -102,7 +102,7 @@ export class ExtHostAPIImplementation {
...
@@ -102,7 +102,7 @@ export class ExtHostAPIImplementation {
const
extHostDocuments
=
col
.
define
(
ExtHostContext
.
ExtHostDocuments
).
set
<
ExtHostDocuments
>
(
new
ExtHostDocuments
(
threadService
));
const
extHostDocuments
=
col
.
define
(
ExtHostContext
.
ExtHostDocuments
).
set
<
ExtHostDocuments
>
(
new
ExtHostDocuments
(
threadService
));
const
extHostEditors
=
col
.
define
(
ExtHostContext
.
ExtHostEditors
).
set
<
ExtHostEditors
>
(
new
ExtHostEditors
(
threadService
,
extHostDocuments
));
const
extHostEditors
=
col
.
define
(
ExtHostContext
.
ExtHostEditors
).
set
<
ExtHostEditors
>
(
new
ExtHostEditors
(
threadService
,
extHostDocuments
));
const
extHostCommands
=
col
.
define
(
ExtHostContext
.
ExtHostCommands
).
set
<
ExtHostCommands
>
(
new
ExtHostCommands
(
threadService
,
extHostEditors
));
const
extHostCommands
=
col
.
define
(
ExtHostContext
.
ExtHostCommands
).
set
<
ExtHostCommands
>
(
new
ExtHostCommands
(
threadService
,
extHostEditors
));
const
extHostConfiguration
=
col
.
define
(
ExtHostContext
.
ExtHostConfiguration
).
set
<
ExtHostConfiguration
>
(
new
ExtHostConfiguration
());
const
extHostConfiguration
=
col
.
define
(
ExtHostContext
.
ExtHostConfiguration
).
set
<
ExtHostConfiguration
>
(
new
ExtHostConfiguration
(
threadService
));
const
extHostDiagnostics
=
col
.
define
(
ExtHostContext
.
ExtHostDiagnostics
).
set
<
ExtHostDiagnostics
>
(
new
ExtHostDiagnostics
(
threadService
));
const
extHostDiagnostics
=
col
.
define
(
ExtHostContext
.
ExtHostDiagnostics
).
set
<
ExtHostDiagnostics
>
(
new
ExtHostDiagnostics
(
threadService
));
const
languageFeatures
=
col
.
define
(
ExtHostContext
.
ExtHostLanguageFeatures
).
set
<
ExtHostLanguageFeatures
>
(
new
ExtHostLanguageFeatures
(
threadService
,
extHostDocuments
,
extHostCommands
,
extHostDiagnostics
));
const
languageFeatures
=
col
.
define
(
ExtHostContext
.
ExtHostLanguageFeatures
).
set
<
ExtHostLanguageFeatures
>
(
new
ExtHostLanguageFeatures
(
threadService
,
extHostDocuments
,
extHostCommands
,
extHostDiagnostics
));
const
extHostFileSystemEvent
=
col
.
define
(
ExtHostContext
.
ExtHostFileSystemEventService
).
set
<
ExtHostFileSystemEventService
>
(
new
ExtHostFileSystemEventService
());
const
extHostFileSystemEvent
=
col
.
define
(
ExtHostContext
.
ExtHostFileSystemEventService
).
set
<
ExtHostFileSystemEventService
>
(
new
ExtHostFileSystemEventService
());
...
...
src/vs/workbench/api/node/extHost.contribution.ts
浏览文件 @
043ff9f7
...
@@ -61,6 +61,7 @@ export class ExtHostContribution implements IWorkbenchContribution {
...
@@ -61,6 +61,7 @@ export class ExtHostContribution implements IWorkbenchContribution {
// Addressable instances
// Addressable instances
const
col
=
new
InstanceCollection
();
const
col
=
new
InstanceCollection
();
col
.
define
(
MainContext
.
MainThreadCommands
).
set
(
create
(
MainThreadCommands
));
col
.
define
(
MainContext
.
MainThreadCommands
).
set
(
create
(
MainThreadCommands
));
col
.
define
(
MainContext
.
MainThreadConfiguration
).
set
(
create
(
MainThreadConfiguration
));
col
.
define
(
MainContext
.
MainThreadDiagnostics
).
set
(
create
(
MainThreadDiagnostics
));
col
.
define
(
MainContext
.
MainThreadDiagnostics
).
set
(
create
(
MainThreadDiagnostics
));
col
.
define
(
MainContext
.
MainThreadDocuments
).
set
(
create
(
MainThreadDocuments
));
col
.
define
(
MainContext
.
MainThreadDocuments
).
set
(
create
(
MainThreadDocuments
));
col
.
define
(
MainContext
.
MainThreadEditors
).
set
(
create
(
MainThreadEditors
));
col
.
define
(
MainContext
.
MainThreadEditors
).
set
(
create
(
MainThreadEditors
));
...
...
src/vs/workbench/api/node/extHost.protocol.ts
浏览文件 @
043ff9f7
...
@@ -27,6 +27,8 @@ import * as editorCommon from 'vs/editor/common/editorCommon';
...
@@ -27,6 +27,8 @@ import * as editorCommon from 'vs/editor/common/editorCommon';
import
*
as
modes
from
'
vs/editor/common/modes
'
;
import
*
as
modes
from
'
vs/editor/common/modes
'
;
import
{
IResourceEdit
}
from
'
vs/editor/common/services/bulkEdit
'
;
import
{
IResourceEdit
}
from
'
vs/editor/common/services/bulkEdit
'
;
import
{
ConfigurationTarget
,
ConfigurationEditingResult
}
from
'
vs/workbench/services/configuration/common/configurationEditing
'
;
import
{
IPickOpenEntry
,
IPickOptions
}
from
'
vs/workbench/services/quickopen/common/quickOpenService
'
;
import
{
IPickOpenEntry
,
IPickOptions
}
from
'
vs/workbench/services/quickopen/common/quickOpenService
'
;
import
{
IWorkspaceSymbol
}
from
'
vs/workbench/parts/search/common/search
'
;
import
{
IWorkspaceSymbol
}
from
'
vs/workbench/parts/search/common/search
'
;
import
{
TextEditorRevealType
,
ITextEditorConfigurationUpdate
,
IResolvedTextEditorConfiguration
,
ISelectionChangeEvent
}
from
'
./mainThreadEditorsTracker
'
;
import
{
TextEditorRevealType
,
ITextEditorConfigurationUpdate
,
IResolvedTextEditorConfiguration
,
ISelectionChangeEvent
}
from
'
./mainThreadEditorsTracker
'
;
...
@@ -81,6 +83,10 @@ export abstract class MainThreadCommandsShape {
...
@@ -81,6 +83,10 @@ export abstract class MainThreadCommandsShape {
$getCommands
():
Thenable
<
string
[]
>
{
throw
ni
();
}
$getCommands
():
Thenable
<
string
[]
>
{
throw
ni
();
}
}
}
export
abstract
class
MainThreadConfigurationShape
{
$updateConfigurationOption
(
target
:
ConfigurationTarget
,
key
:
string
,
value
:
any
):
TPromise
<
ConfigurationEditingResult
>
{
throw
ni
();
}
}
export
abstract
class
MainThreadDiagnosticsShape
{
export
abstract
class
MainThreadDiagnosticsShape
{
$changeMany
(
owner
:
string
,
entries
:
[
URI
,
IMarkerData
[]][]):
TPromise
<
any
>
{
throw
ni
();
}
$changeMany
(
owner
:
string
,
entries
:
[
URI
,
IMarkerData
[]][]):
TPromise
<
any
>
{
throw
ni
();
}
$clear
(
owner
:
string
):
TPromise
<
any
>
{
throw
ni
();
}
$clear
(
owner
:
string
):
TPromise
<
any
>
{
throw
ni
();
}
...
@@ -290,6 +296,7 @@ export abstract class ExtHostQuickOpenShape {
...
@@ -290,6 +296,7 @@ export abstract class ExtHostQuickOpenShape {
export
const
MainContext
=
{
export
const
MainContext
=
{
MainThreadCommands
:
createMainId
<
MainThreadCommandsShape
>
(
'
MainThreadCommands
'
,
MainThreadCommandsShape
),
MainThreadCommands
:
createMainId
<
MainThreadCommandsShape
>
(
'
MainThreadCommands
'
,
MainThreadCommandsShape
),
MainThreadConfiguration
:
createMainId
<
MainThreadConfigurationShape
>
(
'
MainThreadConfiguration
'
,
MainThreadConfigurationShape
),
MainThreadDiagnostics
:
createMainId
<
MainThreadDiagnosticsShape
>
(
'
MainThreadDiagnostics
'
,
MainThreadDiagnosticsShape
),
MainThreadDiagnostics
:
createMainId
<
MainThreadDiagnosticsShape
>
(
'
MainThreadDiagnostics
'
,
MainThreadDiagnosticsShape
),
MainThreadDocuments
:
createMainId
<
MainThreadDocumentsShape
>
(
'
MainThreadDocuments
'
,
MainThreadDocumentsShape
),
MainThreadDocuments
:
createMainId
<
MainThreadDocumentsShape
>
(
'
MainThreadDocuments
'
,
MainThreadDocumentsShape
),
MainThreadEditors
:
createMainId
<
MainThreadEditorsShape
>
(
'
MainThreadEditors
'
,
MainThreadEditorsShape
),
MainThreadEditors
:
createMainId
<
MainThreadEditorsShape
>
(
'
MainThreadEditors
'
,
MainThreadEditorsShape
),
...
...
src/vs/workbench/api/node/extHostConfiguration.ts
浏览文件 @
043ff9f7
...
@@ -8,16 +8,19 @@ import {clone} from 'vs/base/common/objects';
...
@@ -8,16 +8,19 @@ import {clone} from 'vs/base/common/objects';
import
{
illegalState
}
from
'
vs/base/common/errors
'
;
import
{
illegalState
}
from
'
vs/base/common/errors
'
;
import
Event
,
{
Emitter
}
from
'
vs/base/common/event
'
;
import
Event
,
{
Emitter
}
from
'
vs/base/common/event
'
;
import
{
WorkspaceConfiguration
}
from
'
vscode
'
;
import
{
WorkspaceConfiguration
}
from
'
vscode
'
;
import
{
ExtHostConfigurationShape
}
from
'
./extHost.protocol
'
;
import
{
ExtHostConfigurationShape
,
MainContext
,
MainThreadConfigurationShape
}
from
'
./extHost.protocol
'
;
import
{
IThreadService
}
from
'
vs/workbench/services/thread/common/threadService
'
;
export
class
ExtHostConfiguration
extends
ExtHostConfigurationShape
{
export
class
ExtHostConfiguration
extends
ExtHostConfigurationShape
{
private
_
config
:
any
;
private
_
proxy
:
MainThreadConfigurationShape
;
private
_hasConfig
:
boolean
;
private
_hasConfig
:
boolean
;
private
_config
:
any
;
private
_onDidChangeConfiguration
:
Emitter
<
void
>
;
private
_onDidChangeConfiguration
:
Emitter
<
void
>
;
constructor
()
{
constructor
(
threadService
:
IThreadService
)
{
super
();
super
();
this
.
_proxy
=
threadService
.
get
(
MainContext
.
MainThreadConfiguration
);
this
.
_onDidChangeConfiguration
=
new
Emitter
<
void
>
();
this
.
_onDidChangeConfiguration
=
new
Emitter
<
void
>
();
}
}
...
...
src/vs/workbench/api/node/mainThreadConfiguration.ts
浏览文件 @
043ff9f7
...
@@ -4,29 +4,35 @@
...
@@ -4,29 +4,35 @@
*--------------------------------------------------------------------------------------------*/
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
'
use strict
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
IThreadService
}
from
'
vs/workbench/services/thread/common/threadService
'
;
import
{
IThreadService
}
from
'
vs/workbench/services/thread/common/threadService
'
;
import
{
IWorkbenchConfigurationService
}
from
'
vs/workbench/services/configuration/common/configuration
'
;
import
{
IWorkbenchConfigurationService
}
from
'
vs/workbench/services/configuration/common/configuration
'
;
import
{
ExtHostContext
,
ExtHostConfigurationShape
}
from
'
./extHost.protocol
'
;
import
{
IConfigurationEditingService
,
ConfigurationTarget
,
ConfigurationEditingResult
}
from
'
vs/workbench/services/configuration/common/configurationEditing
'
;
import
{
MainThreadConfigurationShape
,
ExtHostContext
}
from
'
./extHost.protocol
'
;
export
class
MainThreadConfiguration
{
export
class
MainThreadConfiguration
extends
MainThreadConfigurationShape
{
private
_configuration
Service
:
IWorkbenchConfiguration
Service
;
private
_configuration
EditingService
:
IConfigurationEditing
Service
;
private
_toDispose
:
IDisposable
;
private
_toDispose
:
IDisposable
;
private
_proxy
:
ExtHostConfigurationShape
;
constructor
(
constructor
(
@
IConfigurationEditingService
configurationEditingService
:
IConfigurationEditingService
,
@
IWorkbenchConfigurationService
configurationService
:
IWorkbenchConfigurationService
,
@
IWorkbenchConfigurationService
configurationService
:
IWorkbenchConfigurationService
,
@
IThreadService
threadService
:
IThreadService
@
IThreadService
threadService
:
IThreadService
)
{
)
{
this
.
_configurationService
=
configurationService
;
super
()
;
this
.
_
proxy
=
threadService
.
get
(
ExtHostContext
.
ExtHostConfiguration
)
;
this
.
_
configurationEditingService
=
configurationEditingService
;
const
proxy
=
threadService
.
get
(
ExtHostContext
.
ExtHostConfiguration
);
this
.
_toDispose
=
this
.
_configurationService
.
onDidUpdateConfiguration
(
event
=>
this
.
_
proxy
.
$acceptConfigurationChanged
(
event
.
config
));
this
.
_toDispose
=
configurationService
.
onDidUpdateConfiguration
(
event
=>
proxy
.
$acceptConfigurationChanged
(
event
.
config
));
this
.
_proxy
.
$acceptConfigurationChanged
(
this
.
_
configurationService
.
getConfiguration
());
proxy
.
$acceptConfigurationChanged
(
configurationService
.
getConfiguration
());
}
}
public
dispose
():
void
{
public
dispose
():
void
{
this
.
_toDispose
=
dispose
(
this
.
_toDispose
);
this
.
_toDispose
=
dispose
(
this
.
_toDispose
);
}
}
$updateConfigurationOption
(
target
:
ConfigurationTarget
,
key
:
string
,
value
:
any
):
TPromise
<
ConfigurationEditingResult
>
{
return
this
.
_configurationEditingService
.
writeConfiguration
(
target
,
[{
key
,
value
}]);
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录