Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
39e7e1f3
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,发现更多精彩内容 >>
提交
39e7e1f3
编写于
3月 05, 2019
作者:
M
Matt Bierner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Strict null work on markers panel
上级
bde0b864
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
12 deletion
+16
-12
src/tsconfig.strictNullChecks.json
src/tsconfig.strictNullChecks.json
+3
-0
src/vs/workbench/contrib/markers/browser/markersPanel.ts
src/vs/workbench/contrib/markers/browser/markersPanel.ts
+7
-6
src/vs/workbench/contrib/markers/browser/markersTreeViewer.ts
...vs/workbench/contrib/markers/browser/markersTreeViewer.ts
+6
-6
未找到文件。
src/tsconfig.strictNullChecks.json
浏览文件 @
39e7e1f3
...
...
@@ -271,11 +271,14 @@
"./vs/workbench/contrib/logs/common/logs.contribution.ts"
,
"./vs/workbench/contrib/logs/common/logsActions.ts"
,
"./vs/workbench/contrib/markers/browser/constants.ts"
,
"./vs/workbench/contrib/markers/browser/markers.contribution.ts"
,
"./vs/workbench/contrib/markers/browser/markers.ts"
,
"./vs/workbench/contrib/markers/browser/markersFileDecorations.ts"
,
"./vs/workbench/contrib/markers/browser/markersFilterOptions.ts"
,
"./vs/workbench/contrib/markers/browser/markersModel.ts"
,
"./vs/workbench/contrib/markers/browser/markersPanel.ts"
,
"./vs/workbench/contrib/markers/browser/markersPanelActions.ts"
,
"./vs/workbench/contrib/markers/browser/markersTreeViewer.ts"
,
"./vs/workbench/contrib/markers/browser/messages.ts"
,
"./vs/workbench/contrib/markers/test/electron-browser/markersModel.test.ts"
,
"./vs/workbench/contrib/output/browser/logViewer.ts"
,
...
...
src/vs/workbench/contrib/markers/browser/markersPanel.ts
浏览文件 @
39e7e1f3
...
...
@@ -187,7 +187,7 @@ export class MarkersPanel extends Panel implements IMarkerFilterController {
public
openFileAtElement
(
element
:
any
,
preserveFocus
:
boolean
,
sideByside
:
boolean
,
pinned
:
boolean
):
boolean
{
const
{
resource
,
selection
,
event
,
data
}
=
element
instanceof
Marker
?
{
resource
:
element
.
resource
,
selection
:
element
.
range
,
event
:
'
problems.selectDiagnostic
'
,
data
:
this
.
getTelemetryData
(
element
.
marker
)
}
:
element
instanceof
RelatedInformation
?
{
resource
:
element
.
raw
.
resource
,
selection
:
element
.
raw
,
event
:
'
problems.selectRelatedInformation
'
,
data
:
this
.
getTelemetryData
(
element
.
marker
)
}
:
{
resource
:
null
,
selection
:
null
,
event
:
null
,
data
:
null
};
if
(
resource
&&
selection
)
{
if
(
resource
&&
selection
&&
event
)
{
/* __GDPR__
"problems.selectDiagnostic" : {
"source": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" },
...
...
@@ -465,7 +465,7 @@ export class MarkersPanel extends Panel implements IMarkerFilterController {
private
onSelected
():
void
{
let
selection
=
this
.
tree
.
getSelection
();
if
(
selection
&&
selection
.
length
>
0
)
{
this
.
lastSelectedRelativeTop
=
this
.
tree
.
getRelativeTop
(
selection
[
0
]);
this
.
lastSelectedRelativeTop
=
this
.
tree
.
getRelativeTop
(
selection
[
0
])
||
0
;
}
}
...
...
@@ -612,7 +612,8 @@ export class MarkersPanel extends Panel implements IMarkerFilterController {
}
private
onContextMenu
(
e
:
ITreeContextMenuEvent
<
TreeElement
>
):
void
{
if
(
!
e
.
element
)
{
const
element
=
e
.
element
;
if
(
!
element
)
{
return
;
}
...
...
@@ -620,8 +621,8 @@ export class MarkersPanel extends Panel implements IMarkerFilterController {
e
.
browserEvent
.
stopPropagation
();
this
.
contextMenuService
.
showContextMenu
({
getAnchor
:
()
=>
e
.
anchor
,
getActions
:
()
=>
this
.
getMenuActions
(
e
.
e
lement
),
getAnchor
:
()
=>
e
.
anchor
!
,
getActions
:
()
=>
this
.
getMenuActions
(
element
),
getActionItem
:
(
action
)
=>
{
const
keybinding
=
this
.
keybindingService
.
lookupKeybinding
(
action
.
id
);
if
(
keybinding
)
{
...
...
@@ -665,7 +666,7 @@ export class MarkersPanel extends Panel implements IMarkerFilterController {
return
result
;
}
public
getFocusElement
()
:
TreeElement
{
public
getFocusElement
()
{
return
this
.
tree
.
getFocus
()[
0
];
}
...
...
src/vs/workbench/contrib/markers/browser/markersTreeViewer.ts
浏览文件 @
39e7e1f3
...
...
@@ -67,7 +67,7 @@ export class MarkersTreeAccessibilityProvider implements IAccessibilityProvider<
constructor
(@
ILabelService
private
readonly
labelService
:
ILabelService
)
{
}
public
getAriaLabel
(
element
:
TreeElement
):
string
{
public
getAriaLabel
(
element
:
TreeElement
):
string
|
null
{
if
(
element
instanceof
ResourceMarkers
)
{
const
path
=
this
.
labelService
.
getUriLabel
(
element
.
resource
,
{
relative
:
true
})
||
element
.
resource
.
fsPath
;
return
Messages
.
MARKERS_TREE_ARIA_LABEL_RESOURCE
(
element
.
markers
.
length
,
element
.
name
,
paths
.
dirname
(
path
));
...
...
@@ -262,7 +262,7 @@ class MarkerWidget extends Disposable {
this
.
_register
(
toDisposable
(()
=>
this
.
disposables
=
dispose
(
this
.
disposables
)));
}
render
(
element
:
Marker
,
filterData
:
MarkerFilterData
):
void
{
render
(
element
:
Marker
,
filterData
:
MarkerFilterData
|
undefined
):
void
{
this
.
actionBar
.
clear
();
this
.
multilineActionbar
.
clear
();
if
(
this
.
disposables
.
length
)
{
...
...
@@ -310,7 +310,7 @@ class MarkerWidget extends Disposable {
this
.
multilineActionbar
.
push
([
action
],
{
icon
:
true
,
label
:
false
});
}
private
renderMessageAndDetails
(
element
:
Marker
,
filterData
:
MarkerFilterData
)
{
private
renderMessageAndDetails
(
element
:
Marker
,
filterData
:
MarkerFilterData
|
undefined
)
{
const
{
marker
,
lines
}
=
element
;
const
viewState
=
this
.
markersViewModel
.
getViewModel
(
element
);
const
multiline
=
!
viewState
||
viewState
.
multiline
;
...
...
@@ -330,7 +330,7 @@ class MarkerWidget extends Disposable {
this
.
renderDetails
(
marker
,
filterData
,
multiline
?
lastLineElement
:
this
.
messageAndDetailsContainer
);
}
private
renderDetails
(
marker
:
IMarker
,
filterData
:
MarkerFilterData
,
parent
:
HTMLElement
):
void
{
private
renderDetails
(
marker
:
IMarker
,
filterData
:
MarkerFilterData
|
undefined
,
parent
:
HTMLElement
):
void
{
dom
.
addClass
(
parent
,
'
details-container
'
);
const
sourceMatches
=
filterData
&&
filterData
.
sourceMatches
||
[];
const
codeMatches
=
filterData
&&
filterData
.
codeMatches
||
[];
...
...
@@ -557,7 +557,7 @@ export class MarkerViewModel extends Disposable {
return
this
.
codeActionsPromise
;
}
return
this
.
getModel
(
waitForModel
)
.
then
(
model
=>
{
.
then
<
CodeAction
[]
|
null
>
(
model
=>
{
if
(
model
)
{
if
(
!
this
.
codeActionsPromise
)
{
this
.
codeActionsPromise
=
createCancelablePromise
(
cancellationToken
=>
{
...
...
@@ -629,7 +629,7 @@ export class MarkersViewModel extends Disposable {
private
bulkUpdate
:
boolean
=
false
;
private
hoveredMarker
:
Marker
;
private
hoveredMarker
:
Marker
|
null
;
private
hoverDelayer
:
Delayer
<
void
>
=
new
Delayer
<
void
>
(
300
);
constructor
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录