Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
a48e0685
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,发现更多精彩内容 >>
提交
a48e0685
编写于
6月 28, 2017
作者:
D
Dirk Baeumer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixes #29610: Improve presentation of problem matcher picker
上级
471ef70b
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
42 addition
and
11 deletion
+42
-11
src/vs/workbench/parts/tasks/browser/buildQuickOpen.ts
src/vs/workbench/parts/tasks/browser/buildQuickOpen.ts
+3
-1
src/vs/workbench/parts/tasks/browser/quickOpen.ts
src/vs/workbench/parts/tasks/browser/quickOpen.ts
+25
-8
src/vs/workbench/parts/tasks/browser/taskQuickOpen.ts
src/vs/workbench/parts/tasks/browser/taskQuickOpen.ts
+5
-1
src/vs/workbench/parts/tasks/common/taskService.ts
src/vs/workbench/parts/tasks/common/taskService.ts
+1
-0
src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts
...rkbench/parts/tasks/electron-browser/task.contribution.ts
+8
-1
未找到文件。
src/vs/workbench/parts/tasks/browser/buildQuickOpen.ts
浏览文件 @
a48e0685
...
...
@@ -29,7 +29,9 @@ class TaskEntry extends base.TaskEntry {
let
task
=
this
.
_task
;
if
(
this
.
taskService
.
canCustomize
()
&&
task
.
problemMatchers
===
void
0
||
task
.
problemMatchers
.
length
===
0
)
{
this
.
attachProblemMatcher
(
task
).
then
((
task
)
=>
{
if
(
task
)
{
this
.
doRun
(
task
);
}
});
return
true
;
}
else
{
...
...
src/vs/workbench/parts/tasks/browser/quickOpen.ts
浏览文件 @
a48e0685
...
...
@@ -23,6 +23,7 @@ import { ActionBarContributor, ContributableActionProvider } from 'vs/workbench/
interface
ProblemMatcherPickEntry
extends
IPickOpenEntry
{
matcher
:
NamedProblemMatcher
;
learnMore
?:
boolean
;
}
export
class
TaskEntry
extends
Model
.
QuickOpenEntry
{
...
...
@@ -50,15 +51,28 @@ export class TaskEntry extends Model.QuickOpenEntry {
if
(
matcher
.
name
===
matcher
.
label
)
{
entries
.
push
({
label
:
matcher
.
name
,
matcher
:
matcher
});
}
else
{
entries
.
push
({
label
:
nls
.
localize
(
'
entries
'
,
'
{0} [${1}]
'
,
matcher
.
label
,
matcher
.
name
),
matcher
:
matcher
});
entries
.
push
({
label
:
matcher
.
label
,
description
:
`$
${
matcher
.
name
}
`
,
matcher
:
matcher
});
}
}
if
(
entries
.
length
>
0
)
{
entries
.
push
({
label
:
'
Continue without scanning the build output
'
,
separator
:
{
border
:
true
},
matcher
:
undefined
});
entries
=
entries
.
sort
((
a
,
b
)
=>
a
.
label
.
localeCompare
(
b
.
label
));
entries
[
0
].
separator
=
{
border
:
true
};
entries
.
unshift
(
{
label
:
nls
.
localize
(
'
continueWithout
'
,
'
Continue without scanning the build output
'
),
matcher
:
undefined
},
{
label
:
nls
.
localize
(
'
learnMoreAbout
'
,
'
Learn more about scanning the build output
'
),
matcher
:
undefined
,
learnMore
:
true
}
);
return
this
.
quickOpenService
.
pick
(
entries
,
{
placeHolder
:
nls
.
localize
(
'
selectProblemMatcher
'
,
'
Select for which kind of errors and warnings to scan the build output
'
)
}).
then
((
selected
)
=>
{
if
(
selected
&&
selected
.
matcher
)
{
if
(
selected
)
{
if
(
selected
.
learnMore
)
{
this
.
taskService
.
openDocumentation
();
return
undefined
;
}
else
if
(
selected
.
matcher
)
{
let
newTask
=
Objects
.
deepClone
(
task
);
let
matcherReference
=
`$
${
selected
.
matcher
.
name
}
`
;
newTask
.
problemMatchers
=
[
matcherReference
];
...
...
@@ -67,6 +81,9 @@ export class TaskEntry extends Model.QuickOpenEntry {
}
else
{
return
task
;
}
}
else
{
return
task
;
}
});
}
return
TPromise
.
as
(
task
);
...
...
src/vs/workbench/parts/tasks/browser/taskQuickOpen.ts
浏览文件 @
a48e0685
...
...
@@ -28,7 +28,11 @@ class TaskEntry extends base.TaskEntry {
}
let
task
=
this
.
_task
;
if
(
this
.
taskService
.
canCustomize
()
&&
task
.
group
===
TaskGroup
.
Build
&&
((
task
.
problemMatchers
===
void
0
)
||
task
.
problemMatchers
.
length
===
0
))
{
this
.
attachProblemMatcher
(
task
).
then
(
task
=>
this
.
doRun
(
task
));
this
.
attachProblemMatcher
(
task
).
then
(
task
=>
{
if
(
task
)
{
this
.
doRun
(
task
);
}
});
return
true
;
}
else
{
return
this
.
doRun
(
task
);
...
...
src/vs/workbench/parts/tasks/common/taskService.ts
浏览文件 @
a48e0685
...
...
@@ -30,6 +30,7 @@ export interface ITaskProvider {
export
interface
ITaskService
extends
IEventEmitter
{
_serviceBrand
:
any
;
configureAction
():
Action
;
openDocumentation
():
void
;
build
():
TPromise
<
ITaskSummary
>
;
rebuild
():
TPromise
<
ITaskSummary
>
;
clean
():
TPromise
<
ITaskSummary
>
;
...
...
src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts
浏览文件 @
a48e0685
...
...
@@ -14,6 +14,7 @@ import * as nls from 'vs/nls';
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
Severity
from
'
vs/base/common/severity
'
;
import
*
as
Objects
from
'
vs/base/common/objects
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
{
IStringDictionary
}
from
'
vs/base/common/collections
'
;
import
{
Action
}
from
'
vs/base/common/actions
'
;
import
*
as
Dom
from
'
vs/base/browser/dom
'
;
...
...
@@ -45,6 +46,7 @@ import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation
import
{
ProblemMatcherRegistry
}
from
'
vs/platform/markers/common/problemMatcher
'
;
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
import
{
IProgressService2
,
IProgressOptions
,
ProgressLocation
}
from
'
vs/platform/progress/common/progress
'
;
import
{
IOpenerService
}
from
'
vs/platform/opener/common/opener
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
...
...
@@ -573,7 +575,8 @@ class TaskService extends EventEmitter implements ITaskService {
@
ITerminalService
private
terminalService
:
ITerminalService
,
@
IWorkbenchEditorService
private
workbenchEditorService
:
IWorkbenchEditorService
,
@
IStorageService
private
storageService
:
IStorageService
,
@
IProgressService2
private
progressService
:
IProgressService2
@
IProgressService2
private
progressService
:
IProgressService2
,
@
IOpenerService
private
openerService
:
IOpenerService
)
{
super
();
...
...
@@ -742,6 +745,10 @@ class TaskService extends EventEmitter implements ITaskService {
this
.
storageService
.
store
(
TaskService
.
RecentlyUsedTasks_Key
,
JSON
.
stringify
(
values
),
StorageScope
.
WORKSPACE
);
}
public
openDocumentation
():
void
{
this
.
openerService
.
open
(
URI
.
parse
(
'
https://go.microsoft.com/fwlink/?LinkId=733558
'
));
}
public
build
():
TPromise
<
ITaskSummary
>
{
return
this
.
getTaskSets
().
then
((
values
)
=>
{
let
runnable
=
this
.
createRunnableTask
(
values
,
TaskGroup
.
Build
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录