Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
c91cdedd
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,发现更多精彩内容 >>
提交
c91cdedd
编写于
11月 06, 2018
作者:
R
Rachel Macfarlane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix return of openReporter in issueService
上级
af6ec917
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
81 addition
and
81 deletion
+81
-81
src/vs/platform/issue/electron-main/issueService.ts
src/vs/platform/issue/electron-main/issueService.ts
+81
-81
未找到文件。
src/vs/platform/issue/electron-main/issueService.ts
浏览文件 @
c91cdedd
...
...
@@ -74,96 +74,96 @@ export class IssueService implements IIssueService {
}
openReporter
(
data
:
IssueReporterData
):
Promise
<
void
>
{
this
.
_issueParentWindow
=
BrowserWindow
.
getFocusedWindow
();
const
position
=
this
.
getWindowPosition
(
this
.
_issueParentWindow
,
700
,
800
);
if
(
!
this
.
_issueWindow
)
{
this
.
_issueWindow
=
new
BrowserWindow
({
width
:
position
.
width
,
height
:
position
.
height
,
minWidth
:
300
,
minHeight
:
200
,
x
:
position
.
x
,
y
:
position
.
y
,
title
:
localize
(
'
issueReporter
'
,
"
Issue Reporter
"
),
backgroundColor
:
data
.
styles
.
backgroundColor
||
DEFAULT_BACKGROUND_COLOR
});
this
.
_issueWindow
.
setMenuBarVisibility
(
false
);
// workaround for now, until a menu is implemented
// Modified when testing UI
const
features
:
IssueReporterFeatures
=
{};
this
.
logService
.
trace
(
'
issueService#openReporter: opening issue reporter
'
);
this
.
_issueWindow
.
loadURL
(
this
.
getIssueReporterPath
(
data
,
features
));
this
.
_issueWindow
.
on
(
'
close
'
,
()
=>
this
.
_issueWindow
=
null
);
this
.
_issueParentWindow
.
on
(
'
closed
'
,
()
=>
{
if
(
this
.
_issueWindow
)
{
this
.
_issueWindow
.
close
();
this
.
_issueWindow
=
null
;
}
});
}
this
.
_issueWindow
.
focus
();
return
new
Promise
(
_
=>
{
this
.
_issueParentWindow
=
BrowserWindow
.
getFocusedWindow
();
const
position
=
this
.
getWindowPosition
(
this
.
_issueParentWindow
,
700
,
800
);
if
(
!
this
.
_issueWindow
)
{
this
.
_issueWindow
=
new
BrowserWindow
({
width
:
position
.
width
,
height
:
position
.
height
,
minWidth
:
300
,
minHeight
:
200
,
x
:
position
.
x
,
y
:
position
.
y
,
title
:
localize
(
'
issueReporter
'
,
"
Issue Reporter
"
),
backgroundColor
:
data
.
styles
.
backgroundColor
||
DEFAULT_BACKGROUND_COLOR
});
this
.
_issueWindow
.
setMenuBarVisibility
(
false
);
// workaround for now, until a menu is implemented
// Modified when testing UI
const
features
:
IssueReporterFeatures
=
{};
this
.
logService
.
trace
(
'
issueService#openReporter: opening issue reporter
'
);
this
.
_issueWindow
.
loadURL
(
this
.
getIssueReporterPath
(
data
,
features
));
this
.
_issueWindow
.
on
(
'
close
'
,
()
=>
this
.
_issueWindow
=
null
);
this
.
_issueParentWindow
.
on
(
'
closed
'
,
()
=>
{
if
(
this
.
_issueWindow
)
{
this
.
_issueWindow
.
close
();
this
.
_issueWindow
=
null
;
}
});
}
return
null
;
this
.
_issueWindow
.
focus
();
});
}
openProcessExplorer
(
data
:
ProcessExplorerData
):
Promise
<
void
>
{
// Create as singleton
if
(
!
this
.
_processExplorerWindow
)
{
const
parentWindow
=
BrowserWindow
.
getFocusedWindow
();
const
position
=
this
.
getWindowPosition
(
parentWindow
,
800
,
300
);
this
.
_processExplorerWindow
=
new
BrowserWindow
({
skipTaskbar
:
true
,
resizable
:
true
,
width
:
position
.
width
,
height
:
position
.
height
,
minWidth
:
300
,
minHeight
:
200
,
x
:
position
.
x
,
y
:
position
.
y
,
backgroundColor
:
data
.
styles
.
backgroundColor
,
title
:
localize
(
'
processExplorer
'
,
"
Process Explorer
"
)
});
this
.
_processExplorerWindow
.
setMenuBarVisibility
(
false
);
const
windowConfiguration
=
{
appRoot
:
this
.
environmentService
.
appRoot
,
nodeCachedDataDir
:
this
.
environmentService
.
nodeCachedDataDir
,
windowId
:
this
.
_processExplorerWindow
.
id
,
userEnv
:
this
.
userEnv
,
machineId
:
this
.
machineId
,
data
};
const
environment
=
parseArgs
(
process
.
argv
);
const
config
=
objects
.
assign
(
environment
,
windowConfiguration
);
for
(
let
key
in
config
)
{
if
(
config
[
key
]
===
void
0
||
config
[
key
]
===
null
||
config
[
key
]
===
''
)
{
delete
config
[
key
];
// only send over properties that have a true value
return
new
Promise
(
_
=>
{
// Create as singleton
if
(
!
this
.
_processExplorerWindow
)
{
const
parentWindow
=
BrowserWindow
.
getFocusedWindow
();
const
position
=
this
.
getWindowPosition
(
parentWindow
,
800
,
300
);
this
.
_processExplorerWindow
=
new
BrowserWindow
({
skipTaskbar
:
true
,
resizable
:
true
,
width
:
position
.
width
,
height
:
position
.
height
,
minWidth
:
300
,
minHeight
:
200
,
x
:
position
.
x
,
y
:
position
.
y
,
backgroundColor
:
data
.
styles
.
backgroundColor
,
title
:
localize
(
'
processExplorer
'
,
"
Process Explorer
"
)
});
this
.
_processExplorerWindow
.
setMenuBarVisibility
(
false
);
const
windowConfiguration
=
{
appRoot
:
this
.
environmentService
.
appRoot
,
nodeCachedDataDir
:
this
.
environmentService
.
nodeCachedDataDir
,
windowId
:
this
.
_processExplorerWindow
.
id
,
userEnv
:
this
.
userEnv
,
machineId
:
this
.
machineId
,
data
};
const
environment
=
parseArgs
(
process
.
argv
);
const
config
=
objects
.
assign
(
environment
,
windowConfiguration
);
for
(
let
key
in
config
)
{
if
(
config
[
key
]
===
void
0
||
config
[
key
]
===
null
||
config
[
key
]
===
''
)
{
delete
config
[
key
];
// only send over properties that have a true value
}
}
}
this
.
_processExplorerWindow
.
loadURL
(
`
${
require
.
toUrl
(
'
vs/code/electron-browser/processExplorer/processExplorer.html
'
)}
?config=
${
encodeURIComponent
(
JSON
.
stringify
(
config
))}
`
);
this
.
_processExplorerWindow
.
loadURL
(
`
${
require
.
toUrl
(
'
vs/code/electron-browser/processExplorer/processExplorer.html
'
)}
?config=
${
encodeURIComponent
(
JSON
.
stringify
(
config
))}
`
);
this
.
_processExplorerWindow
.
on
(
'
close
'
,
()
=>
this
.
_processExplorerWindow
=
null
);
this
.
_processExplorerWindow
.
on
(
'
close
'
,
()
=>
this
.
_processExplorerWindow
=
null
);
parentWindow
.
on
(
'
close
'
,
()
=>
{
if
(
this
.
_processExplorerWindow
)
{
this
.
_processExplorerWindow
.
close
();
this
.
_processExplorerWindow
=
null
;
}
});
}
// Focus
this
.
_processExplorerWindow
.
focus
();
parentWindow
.
on
(
'
close
'
,
()
=>
{
if
(
this
.
_processExplorerWindow
)
{
this
.
_processExplorerWindow
.
close
();
this
.
_processExplorerWindow
=
null
;
}
});
}
return
null
;
// Focus
this
.
_processExplorerWindow
.
focus
();
});
}
private
getWindowPosition
(
parentWindow
:
BrowserWindow
,
defaultWidth
:
number
,
defaultHeight
:
number
):
IWindowState
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录