Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
b4fdeadb
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,发现更多精彩内容 >>
提交
b4fdeadb
编写于
10月 18, 2017
作者:
S
Sandeep Somavarapu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Adopt new configuration change event in markers and preferences areas
上级
637a2e3b
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
16 addition
and
15 deletion
+16
-15
src/vs/workbench/parts/markers/browser/markersPanel.ts
src/vs/workbench/parts/markers/browser/markersPanel.ts
+3
-12
src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts
...rkbench/parts/preferences/browser/preferencesRenderers.ts
+8
-2
src/vs/workbench/parts/preferences/common/preferencesContribution.ts
...bench/parts/preferences/common/preferencesContribution.ts
+5
-1
未找到文件。
src/vs/workbench/parts/markers/browser/markersPanel.ts
浏览文件 @
b4fdeadb
...
...
@@ -19,7 +19,7 @@ import { IEditorGroupService } from 'vs/workbench/services/group/common/groupSer
import
{
Panel
}
from
'
vs/workbench/browser/panel
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
Constants
from
'
vs/workbench/parts/markers/common/constants
'
;
import
{
IProblemsConfiguration
,
MarkersModel
,
Marker
,
Resource
,
FilterOptions
}
from
'
vs/workbench/parts/markers/common/markersModel
'
;
import
{
MarkersModel
,
Marker
,
Resource
,
FilterOptions
}
from
'
vs/workbench/parts/markers/common/markersModel
'
;
import
{
Controller
}
from
'
vs/workbench/parts/markers/browser/markersTreeController
'
;
import
Tree
=
require
(
'
vs/base/parts/tree/browser/tree
'
);
import
TreeImpl
=
require
(
'
vs/base/parts/tree/browser/treeImpl
'
);
...
...
@@ -47,7 +47,6 @@ export class MarkersPanel extends Panel {
private
lastSelectedRelativeTop
:
number
=
0
;
private
currentActiveResource
:
URI
=
null
;
private
hasToAutoReveal
:
boolean
;
private
tree
:
Tree
.
ITree
;
private
autoExpanded
:
Set
<
string
>
;
...
...
@@ -90,9 +89,6 @@ export class MarkersPanel extends Panel {
dom
.
addClass
(
parent
.
getHTMLElement
(),
'
markers-panel
'
);
const
conf
=
this
.
configurationService
.
getConfiguration
<
IProblemsConfiguration
>
();
this
.
onConfigurationsUpdated
(
conf
);
let
container
=
dom
.
append
(
parent
.
getHTMLElement
(),
dom
.
$
(
'
.markers-panel-container
'
));
this
.
createMessageBox
(
container
);
...
...
@@ -253,7 +249,6 @@ export class MarkersPanel extends Panel {
}
private
createListeners
():
void
{
this
.
toUnbind
.
push
(
this
.
configurationService
.
onDidChangeConfiguration
(
e
=>
this
.
onConfigurationsUpdated
(
this
.
configurationService
.
getConfiguration
<
IProblemsConfiguration
>
())));
this
.
toUnbind
.
push
(
this
.
markerService
.
onMarkerChanged
(
this
.
onMarkerChanged
,
this
));
this
.
toUnbind
.
push
(
this
.
editorGroupService
.
onEditorsChanged
(
this
.
onEditorsChanged
,
this
));
this
.
toUnbind
.
push
(
this
.
tree
.
addListener
(
'
selection
'
,
()
=>
this
.
onSelected
()));
...
...
@@ -289,10 +284,6 @@ export class MarkersPanel extends Panel {
this
.
autoReveal
();
}
private
onConfigurationsUpdated
(
conf
:
IProblemsConfiguration
):
void
{
this
.
hasToAutoReveal
=
conf
&&
conf
.
problems
&&
conf
.
problems
.
autoReveal
;
}
private
onSelected
():
void
{
let
selection
=
this
.
tree
.
getSelection
();
if
(
selection
&&
selection
.
length
>
0
)
{
...
...
@@ -338,8 +329,8 @@ export class MarkersPanel extends Panel {
}
private
autoReveal
(
focus
:
boolean
=
false
):
void
{
let
conf
=
this
.
configurationService
.
getConfiguration
<
IProblemsConfiguration
>
(
);
if
(
conf
&&
conf
.
problems
&&
conf
.
problems
.
autoReveal
)
{
let
autoReveal
=
this
.
configurationService
.
getValue
<
boolean
>
(
'
problems.autoReveal
'
);
if
(
typeof
autoReveal
===
'
boolean
'
&&
autoReveal
)
{
this
.
revealMarkersForCurrentActiveEditor
(
focus
);
}
}
...
...
src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts
浏览文件 @
b4fdeadb
...
...
@@ -31,7 +31,7 @@ import { ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorE
import
{
ModelDecorationOptions
}
from
'
vs/editor/common/model/textModelWithDecorations
'
;
import
{
IWorkspaceContextService
,
WorkbenchState
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
MarkdownString
}
from
'
vs/base/common/htmlContent
'
;
import
{
overrideIdentifierFromKey
,
IConfigurationService
,
ConfigurationTarget
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
overrideIdentifierFromKey
,
IConfigurationService
,
ConfigurationTarget
,
IConfigurationChangeEvent
}
from
'
vs/platform/configuration/common/configuration
'
;
export
interface
IPreferencesRenderer
<
T
>
extends
IDisposable
{
preferencesModel
:
IPreferencesEditorModel
<
T
>
;
...
...
@@ -950,7 +950,7 @@ class UnsupportedWorkspaceSettingsRenderer extends Disposable {
@
IMarkerService
private
markerService
:
IMarkerService
)
{
super
();
this
.
_register
(
this
.
configurationService
.
onDidChangeConfiguration
(
()
=>
this
.
render
(
)));
this
.
_register
(
this
.
configurationService
.
onDidChangeConfiguration
(
e
=>
this
.
onDidConfigurationChange
(
e
)));
}
private
getMarkerMessage
(
settingKey
:
string
):
string
{
...
...
@@ -987,6 +987,12 @@ class UnsupportedWorkspaceSettingsRenderer extends Disposable {
}
}
private
onDidConfigurationChange
(
event
:
IConfigurationChangeEvent
):
void
{
if
(
event
.
source
===
ConfigurationTarget
.
DEFAULT
||
event
.
source
===
ConfigurationTarget
.
WORKSPACE
||
event
.
source
===
ConfigurationTarget
.
WORKSPACE_FOLDER
)
{
this
.
render
();
}
}
public
dispose
():
void
{
this
.
markerService
.
remove
(
'
preferencesEditor
'
,
[
this
.
workspaceSettingsEditorModel
.
uri
]);
super
.
dispose
();
...
...
src/vs/workbench/parts/preferences/common/preferencesContribution.ts
浏览文件 @
b4fdeadb
...
...
@@ -38,7 +38,11 @@ export class PreferencesContribution implements IWorkbenchContribution {
@
IWorkspaceContextService
private
workspaceService
:
IWorkspaceContextService
,
@
IConfigurationService
private
configurationService
:
IConfigurationService
)
{
this
.
settingsListener
=
this
.
configurationService
.
onDidChangeConfiguration
(()
=>
this
.
handleSettingsEditorOverride
());
this
.
settingsListener
=
this
.
configurationService
.
onDidChangeConfiguration
(
e
=>
{
if
(
e
.
affectsConfiguration
(
DEFAULT_SETTINGS_EDITOR_SETTING
))
{
this
.
handleSettingsEditorOverride
();
}
});
this
.
handleSettingsEditorOverride
();
this
.
start
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录