Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
90416b8e
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 搜索 >>
提交
90416b8e
编写于
12月 10, 2018
作者:
M
Matt Bierner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Strict null check workbench issue service
上级
ebef92f9
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
49 addition
and
41 deletion
+49
-41
src/tsconfig.strictNullChecks.json
src/tsconfig.strictNullChecks.json
+1
-0
src/vs/code/electron-browser/processExplorer/processExplorerMain.ts
...e/electron-browser/processExplorer/processExplorerMain.ts
+3
-1
src/vs/platform/issue/common/issue.ts
src/vs/platform/issue/common/issue.ts
+18
-18
src/vs/workbench/services/issue/electron-browser/workbenchIssueService.ts
.../services/issue/electron-browser/workbenchIssueService.ts
+27
-22
未找到文件。
src/tsconfig.strictNullChecks.json
浏览文件 @
90416b8e
...
...
@@ -702,6 +702,7 @@
"./vs/workbench/services/hash/common/hashService.ts"
,
"./vs/workbench/services/hash/node/hashService.ts"
,
"./vs/workbench/services/issue/common/issue.ts"
,
"./vs/workbench/services/issue/electron-browser/workbenchIssueService.ts"
,
"./vs/workbench/services/jsonschemas/common/jsonValidationExtensionPoint.ts"
,
"./vs/workbench/services/keybinding/common/keybindingIO.ts"
,
"./vs/workbench/services/keybinding/common/keyboardMapper.ts"
,
...
...
src/vs/code/electron-browser/processExplorer/processExplorerMain.ts
浏览文件 @
90416b8e
...
...
@@ -171,7 +171,9 @@ function applyStyles(styles: ProcessExplorerStyles): void {
if
(
document
.
head
)
{
document
.
head
.
appendChild
(
styleTag
);
}
document
.
body
.
style
.
color
=
styles
.
color
;
if
(
styles
.
color
)
{
document
.
body
.
style
.
color
=
styles
.
color
;
}
}
function
applyZoom
(
zoomLevel
:
number
):
void
{
...
...
src/vs/platform/issue/common/issue.ts
浏览文件 @
90416b8e
...
...
@@ -10,8 +10,8 @@ export const IIssueService = createDecorator<IIssueService>('issueService');
// Since data sent through the service is serialized to JSON, functions will be lost, so Color objects
// should not be sent as their 'toString' method will be stripped. Instead convert to strings before sending.
export
interface
WindowStyles
{
backgroundColor
:
string
;
color
:
string
;
backgroundColor
?
:
string
;
color
?
:
string
;
}
export
interface
WindowData
{
styles
:
WindowStyles
;
...
...
@@ -26,19 +26,19 @@ export const enum IssueType {
}
export
interface
IssueReporterStyles
extends
WindowStyles
{
textLinkColor
:
string
;
textLinkActiveForeground
:
string
;
inputBackground
:
string
;
inputForeground
:
string
;
inputBorder
:
string
;
inputErrorBorder
:
string
;
inputActiveBorder
:
string
;
buttonBackground
:
string
;
buttonForeground
:
string
;
buttonHoverBackground
:
string
;
sliderBackgroundColor
:
string
;
sliderHoverColor
:
string
;
sliderActiveColor
:
string
;
textLinkColor
?
:
string
;
textLinkActiveForeground
?
:
string
;
inputBackground
?
:
string
;
inputForeground
?
:
string
;
inputBorder
?
:
string
;
inputErrorBorder
?
:
string
;
inputActiveBorder
?
:
string
;
buttonBackground
?
:
string
;
buttonForeground
?
:
string
;
buttonHoverBackground
?
:
string
;
sliderBackgroundColor
?
:
string
;
sliderHoverColor
?
:
string
;
sliderActiveColor
?
:
string
;
}
export
interface
IssueReporterExtensionData
{
...
...
@@ -75,9 +75,9 @@ export interface IssueReporterFeatures {
}
export
interface
ProcessExplorerStyles
extends
WindowStyles
{
hoverBackground
:
string
;
hoverForeground
:
string
;
highlightForeground
:
string
;
hoverBackground
?
:
string
;
hoverForeground
?
:
string
;
highlightForeground
?
:
string
;
}
export
interface
ProcessExplorerData
extends
WindowData
{
...
...
src/vs/workbench/services/issue/electron-browser/workbenchIssueService.ts
浏览文件 @
90416b8e
...
...
@@ -22,8 +22,7 @@ export class WorkbenchIssueService implements IWorkbenchIssueService {
@
IExtensionManagementService
private
extensionManagementService
:
IExtensionManagementService
,
@
IExtensionEnablementService
private
extensionEnablementService
:
IExtensionEnablementService
,
@
IWindowService
private
windowService
:
IWindowService
)
{
}
)
{
}
openReporter
(
dataOverrides
:
Partial
<
IssueReporterData
>
=
{}):
Promise
<
void
>
{
return
this
.
extensionManagementService
.
getInstalled
(
LocalExtensionType
.
User
).
then
(
extensions
=>
{
...
...
@@ -63,11 +62,11 @@ export class WorkbenchIssueService implements IWorkbenchIssueService {
pid
:
this
.
windowService
.
getConfiguration
().
mainPid
,
zoomLevel
:
webFrame
.
getZoomLevel
(),
styles
:
{
backgroundColor
:
theme
.
getColor
(
editorBackground
)
&&
theme
.
getColor
(
editorBackground
).
toString
(
),
color
:
theme
.
getColor
(
editorForeground
).
toString
(
),
hoverBackground
:
theme
.
getColor
(
listHoverBackground
)
&&
theme
.
getColor
(
listHoverBackground
).
toString
(
),
hoverForeground
:
theme
.
getColor
(
listHoverForeground
)
&&
theme
.
getColor
(
listHoverForeground
).
toString
(
),
highlightForeground
:
theme
.
getColor
(
listHighlightForeground
)
&&
theme
.
getColor
(
listHighlightForeground
).
toString
()
backgroundColor
:
getColor
(
theme
,
editorBackground
),
color
:
getColor
(
theme
,
editorForeground
),
hoverBackground
:
getColor
(
theme
,
listHoverBackground
),
hoverForeground
:
getColor
(
theme
,
listHoverForeground
),
highlightForeground
:
getColor
(
theme
,
listHighlightForeground
),
}
};
return
this
.
issueService
.
openProcessExplorer
(
data
);
...
...
@@ -76,20 +75,26 @@ export class WorkbenchIssueService implements IWorkbenchIssueService {
export
function
getIssueReporterStyles
(
theme
:
ITheme
):
IssueReporterStyles
{
return
{
backgroundColor
:
theme
.
getColor
(
SIDE_BAR_BACKGROUND
)
&&
theme
.
getColor
(
SIDE_BAR_BACKGROUND
).
toString
(
),
color
:
theme
.
getColor
(
foreground
).
toString
(
),
textLinkColor
:
theme
.
getColor
(
textLinkForeground
)
&&
theme
.
getColor
(
textLinkForeground
).
toString
(
),
textLinkActiveForeground
:
theme
.
getColor
(
textLinkActiveForeground
)
&&
theme
.
getColor
(
textLinkActiveForeground
).
toString
(
),
inputBackground
:
theme
.
getColor
(
inputBackground
)
&&
theme
.
getColor
(
inputBackground
).
toString
(
),
inputForeground
:
theme
.
getColor
(
inputForeground
)
&&
theme
.
getColor
(
inputForeground
).
toString
(
),
inputBorder
:
theme
.
getColor
(
inputBorder
)
&&
theme
.
getColor
(
inputBorder
).
toString
(
),
inputActiveBorder
:
theme
.
getColor
(
inputActiveOptionBorder
)
&&
theme
.
getColor
(
inputActiveOptionBorder
).
toString
(
),
inputErrorBorder
:
theme
.
getColor
(
inputValidationErrorBorder
)
&&
theme
.
getColor
(
inputValidationErrorBorder
).
toString
(
),
buttonBackground
:
theme
.
getColor
(
buttonBackground
)
&&
theme
.
getColor
(
buttonBackground
).
toString
(
),
buttonForeground
:
theme
.
getColor
(
buttonForeground
)
&&
theme
.
getColor
(
buttonForeground
).
toString
(
),
buttonHoverBackground
:
theme
.
getColor
(
buttonHoverBackground
)
&&
theme
.
getColor
(
buttonHoverBackground
).
toString
(
),
sliderActiveColor
:
theme
.
getColor
(
scrollbarSliderActiveBackground
)
&&
theme
.
getColor
(
scrollbarSliderActiveBackground
).
toString
(
),
sliderBackgroundColor
:
theme
.
getColor
(
scrollbarSliderBackground
)
&&
theme
.
getColor
(
scrollbarSliderBackground
).
toString
(
),
sliderHoverColor
:
theme
.
getColor
(
scrollbarSliderHoverBackground
)
&&
theme
.
getColor
(
scrollbarSliderHoverBackground
).
toString
()
backgroundColor
:
getColor
(
theme
,
SIDE_BAR_BACKGROUND
),
color
:
getColor
(
theme
,
foreground
),
textLinkColor
:
getColor
(
theme
,
textLinkForeground
),
textLinkActiveForeground
:
getColor
(
theme
,
textLinkActiveForeground
),
inputBackground
:
getColor
(
theme
,
inputBackground
),
inputForeground
:
getColor
(
theme
,
inputForeground
),
inputBorder
:
getColor
(
theme
,
inputBorder
),
inputActiveBorder
:
getColor
(
theme
,
inputActiveOptionBorder
),
inputErrorBorder
:
getColor
(
theme
,
inputValidationErrorBorder
),
buttonBackground
:
getColor
(
theme
,
buttonBackground
),
buttonForeground
:
getColor
(
theme
,
buttonForeground
),
buttonHoverBackground
:
getColor
(
theme
,
buttonHoverBackground
),
sliderActiveColor
:
getColor
(
theme
,
scrollbarSliderActiveBackground
),
sliderBackgroundColor
:
getColor
(
theme
,
scrollbarSliderBackground
),
sliderHoverColor
:
getColor
(
theme
,
scrollbarSliderHoverBackground
),
};
}
function
getColor
(
theme
:
ITheme
,
key
:
string
):
string
|
undefined
{
const
color
=
theme
.
getColor
(
key
);
return
color
?
color
.
toString
()
:
undefined
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录