Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
8004d277
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8004d277
编写于
2月 18, 2016
作者:
D
Dirk Baeumer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixes #3122: Add snippet support to tasks.json
上级
054734ff
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
218 addition
and
197 deletion
+218
-197
extensions/tasks/package.json
extensions/tasks/package.json
+21
-0
extensions/tasks/src/tasksMain.ts
extensions/tasks/src/tasksMain.ts
+101
-0
extensions/tasks/src/tsconfig.json
extensions/tasks/src/tsconfig.json
+9
-0
extensions/tasks/src/typings/node.additions.d.ts
extensions/tasks/src/typings/node.additions.d.ts
+28
-0
extensions/tasks/src/typings/refs.d.ts
extensions/tasks/src/typings/refs.d.ts
+9
-0
extensions/typescript/src/typescriptServiceClient.ts
extensions/typescript/src/typescriptServiceClient.ts
+1
-1
extensions/typescript/src/typings/node.additions.d.ts
extensions/typescript/src/typings/node.additions.d.ts
+18
-1
src/vs/workbench/parts/tasks/common/taskSampleConfig.json
src/vs/workbench/parts/tasks/common/taskSampleConfig.json
+5
-189
src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts
...rkbench/parts/tasks/electron-browser/task.contribution.ts
+26
-6
未找到文件。
extensions/tasks/package.json
0 → 100644
浏览文件 @
8004d277
{
"name"
:
"tasks"
,
"description"
:
"Extension to add support for tasks.json files"
,
"displayName"
:
"Tasks.json support for VSCode"
,
"version"
:
"0.10.1"
,
"author"
:
"Microsoft Corporation"
,
"license"
:
"MIT"
,
"publisher"
:
"vscode"
,
"engines"
:
{
"vscode"
:
"*"
},
"scripts"
:
{
"vscode:prepublish"
:
"node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../gulpfile.plugins.js compile-plugin:tasks ./src/tsconfig.json"
},
"activationEvents"
:
[
"onLanguage:json"
],
"main"
:
"./out/tasksMain"
,
"contributes"
:
{
}
}
\ No newline at end of file
extensions/tasks/src/tasksMain.ts
0 → 100644
浏览文件 @
8004d277
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
*
as
path
from
'
path
'
;
import
{
languages
,
workspace
,
ExtensionContext
,
TextDocument
,
Position
,
CancellationToken
,
CompletionItem
,
CompletionItemKind
,
DocumentFilter
}
from
'
vscode
'
;
export
function
activate
(
context
:
ExtensionContext
):
void
{
// We can't use a pattern here since it disables the normal json code complete
// which we don't want. Do the filtering in the actual suggest
let
selector
:
DocumentFilter
=
{
language
:
'
json
'
};
let
taskFileName
=
workspace
.
rootPath
?
path
.
join
(
workspace
.
rootPath
,
'
.vscode/tasks.json
'
)
:
null
;
let
items
=
taskFileName
?
createCompletionItems
()
:
[];
languages
.
registerCompletionItemProvider
(
selector
,
{
provideCompletionItems
:
(
document
:
TextDocument
,
position
:
Position
,
token
:
CancellationToken
):
CompletionItem
[]
=>
{
if
(
document
.
fileName
===
taskFileName
)
{
return
items
;
}
else
{
return
[];
}
}
});
}
function
createCompletionItems
():
CompletionItem
[]
{
let
result
:
CompletionItem
[]
=
[];
let
item
:
CompletionItem
;
item
=
new
CompletionItem
(
'
tsc
'
);
item
.
kind
=
CompletionItemKind
.
Snippet
;
item
.
detail
=
'
Use the tsc compiler on a specific file.
'
;
item
.
filterText
=
'
ts-tsc
'
;
item
.
insertText
=
[
'
"version": "0.1.0",
'
,
'
"command": "tsc",
'
,
'
"isShellCommand": true,
'
,
'
"showOutput": "silent",
'
,
'
"args": ["HelloWorld.ts"],
'
,
'
"problemMatcher": "$tsc"
'
].
join
(
'
\n
'
);
result
.
push
(
item
);
item
=
new
CompletionItem
(
'
tsc - tsconfig.json
'
);
item
.
kind
=
CompletionItemKind
.
Snippet
;
item
.
detail
=
'
Use the tsc compiler with a tsconfig.json file.
'
;
item
.
filterText
=
'
ts-tsc - tsconfig.json
'
;
item
.
insertText
=
[
'
"version": "0.1.0",
'
,
'
"command": "tsc",
'
,
'
"isShellCommand": true,
'
,
'
"showOutput": "silent",
'
,
'
"args": ["-p", "."],
'
,
'
"problemMatcher": "$tsc"
'
].
join
(
'
\n
'
);
result
.
push
(
item
);
item
=
new
CompletionItem
(
'
tsc - watch
'
);
item
.
kind
=
CompletionItemKind
.
Snippet
;
item
.
detail
=
'
Use the tsc compiler in watch mode.
'
;
item
.
filterText
=
'
ts-tsc - watch
'
;
item
.
insertText
=
[
'
"version": "0.1.0",
'
,
'
"command": "tsc",
'
,
'
"isShellCommand": true,
'
,
'
"showOutput": "silent",
'
,
'
"args": ["-w", "-p", "."],
'
,
'
"problemMatcher": "$tsc-watch"
'
].
join
(
'
\n
'
);
result
.
push
(
item
);
item
=
new
CompletionItem
(
'
msbuild
'
);
item
.
kind
=
CompletionItemKind
.
Snippet
;
item
.
detail
=
'
Use msbuild to compile your project.
'
;
item
.
filterText
=
'
ts-msbuild
'
;
item
.
insertText
=
[
'
"version": "0.1.0",
'
,
'
"command": "msbuild",
'
,
'
"args": [
'
,
'
\t
// Ask msbuild to generate full paths for file names.
'
,
'
\t
"/property:GenerateFullPaths=true"
'
,
'
],
'
,
'
"taskSelector": "/t:",
'
,
'
"showOutput": "silent",
'
,
'
"tasks": [
'
,
'
\t
{
'
,
'
\t\t
"taskName": "build",
'
,
'
\t\t
// Show the output window only if unrecognized errors occur.
'
,
'
\t\t
"showOutput": "silent",
'
,
'
\t\t
// Use the standard MS compiler pattern to detect errors, warnings and infos
'
,
'
\t\t
"problemMatcher": "$msCompile"
'
,
'
\t
}
'
,
'
]
'
].
join
(
'
\n
'
);
result
.
push
(
item
);
return
result
;
}
\ No newline at end of file
extensions/tasks/src/tsconfig.json
0 → 100644
浏览文件 @
8004d277
{
"compilerOptions"
:
{
"module"
:
"commonjs"
,
"target"
:
"es5"
,
"noLib"
:
true
,
"sourceMap"
:
true
,
"outDir"
:
"../out"
}
}
\ No newline at end of file
extensions/tasks/src/typings/node.additions.d.ts
0 → 100644
浏览文件 @
8004d277
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare
function
setTimeout
(
callback
:
(...
args
:
any
[])
=>
void
,
ms
:
number
,
...
args
:
any
[]):
NodeJS
.
Timer
;
declare
function
clearTimeout
(
timeoutId
:
NodeJS
.
Timer
):
void
;
declare
function
setInterval
(
callback
:
(...
args
:
any
[])
=>
void
,
ms
:
number
,
...
args
:
any
[]):
NodeJS
.
Timer
;
declare
function
clearInterval
(
intervalId
:
NodeJS
.
Timer
):
void
;
declare
function
setImmediate
(
callback
:
(...
args
:
any
[])
=>
void
,
...
args
:
any
[]):
any
;
declare
function
clearImmediate
(
immediateId
:
any
):
void
;
interface
Console
{
assert
(
test
?:
boolean
,
message
?:
string
,
...
optionalParams
:
any
[]):
void
;
dir
(
value
?:
any
,
...
optionalParams
:
any
[]):
void
;
error
(
message
?:
any
,
...
optionalParams
:
any
[]):
void
;
info
(
message
?:
any
,
...
optionalParams
:
any
[]):
void
;
log
(
message
?:
any
,
...
optionalParams
:
any
[]):
void
;
time
(
timerName
?:
string
):
void
;
timeEnd
(
timerName
?:
string
):
void
;
trace
(
message
?:
any
,
...
optionalParams
:
any
[]):
void
;
warn
(
message
?:
any
,
...
optionalParams
:
any
[]):
void
;
}
declare
var
Console
:
{
prototype
:
Console
;
new
():
Console
;
};
\ No newline at end of file
extensions/tasks/src/typings/refs.d.ts
0 → 100644
浏览文件 @
8004d277
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/// <reference path='../../../../src/vs/vscode.d.ts'/>
/// <reference path='../../../../src/typings/mocha.d.ts'/>
/// <reference path='../../../../extensions/node.d.ts'/>
/// <reference path='../../../../extensions/lib.core.d.ts'/>
\ No newline at end of file
extensions/typescript/src/typescriptServiceClient.ts
浏览文件 @
8004d277
...
...
@@ -184,7 +184,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient
return
unknown
;
}
let
contents
=
fs
.
readFileSync
(
fileName
).
toString
();
let
desc
=
null
;
let
desc
:
any
=
null
;
try
{
desc
=
JSON
.
parse
(
contents
);
}
catch
(
err
)
{
...
...
extensions/typescript/src/typings/node.additions.d.ts
浏览文件 @
8004d277
...
...
@@ -8,4 +8,21 @@ declare function clearTimeout(timeoutId: NodeJS.Timer): void;
declare
function
setInterval
(
callback
:
(...
args
:
any
[])
=>
void
,
ms
:
number
,
...
args
:
any
[]):
NodeJS
.
Timer
;
declare
function
clearInterval
(
intervalId
:
NodeJS
.
Timer
):
void
;
declare
function
setImmediate
(
callback
:
(...
args
:
any
[])
=>
void
,
...
args
:
any
[]):
any
;
declare
function
clearImmediate
(
immediateId
:
any
):
void
;
\ No newline at end of file
declare
function
clearImmediate
(
immediateId
:
any
):
void
;
interface
Console
{
assert
(
test
?:
boolean
,
message
?:
string
,
...
optionalParams
:
any
[]):
void
;
dir
(
value
?:
any
,
...
optionalParams
:
any
[]):
void
;
error
(
message
?:
any
,
...
optionalParams
:
any
[]):
void
;
info
(
message
?:
any
,
...
optionalParams
:
any
[]):
void
;
log
(
message
?:
any
,
...
optionalParams
:
any
[]):
void
;
time
(
timerName
?:
string
):
void
;
timeEnd
(
timerName
?:
string
):
void
;
trace
(
message
?:
any
,
...
optionalParams
:
any
[]):
void
;
warn
(
message
?:
any
,
...
optionalParams
:
any
[]):
void
;
}
declare
var
Console
:
{
prototype
:
Console
;
new
():
Console
;
};
\ No newline at end of file
src/vs/workbench/parts/tasks/common/taskSampleConfig.json
浏览文件 @
8004d277
//
Available
variables
which
can
be
used
inside
of
strings.
//
$
{
workspaceRoot
}
:
the
root
folder
of
the
team
//
$
{
file
}
:
the
current
opened
file
//
$
{
fileBasename
}
:
the
current
opened
file's
basename
//
$
{
fileDirname
}
:
the
current
opened
file's
dirname
//
$
{
fileExtname
}
:
the
current
opened
file's
extension
//
$
{
cwd
}
:
the
current
working
directory
of
the
spawned
process
//
A
task
runner
that
calls
the
Typescript
compiler
(tsc)
and
//
Compiles
a
HelloWorld.ts
program
{
"version"
:
"0.1.0"
,
//
The
command
is
tsc.
Assumes
that
tsc
has
been
installed
using
npm
install
-g
typescript
"command"
:
"tsc"
,
//
The
command
is
a
shell
script
"isShellCommand"
:
true
,
//
Show
the
output
window
only
if
unrecognized
errors
occur.
"showOutput"
:
"silent"
,
//
args
is
the
HelloWorld
program
to
compile.
"args"
:
[
"HelloWorld.ts"
],
//
use
the
standard
tsc
problem
matcher
to
find
compile
problems
//
in
the
output.
"problemMatcher"
:
"$tsc"
}
//
A
task
runner
that
calls
the
Typescript
compiler
(tsc)
and
//
compiles
based
on
a
tsconfig.json
file
that
is
present
in
//
the
root
of
the
folder
open
in
VSCode
/*
{
"version"
:
"0.1.0"
,
//
The
command
is
tsc.
Assumes
that
tsc
has
been
installed
using
npm
install
-g
typescript
"command"
:
"tsc"
,
//
The
command
is
a
shell
script
"isShellCommand"
:
true
,
//
Show
the
output
window
only
if
unrecognized
errors
occur.
"showOutput"
:
"silent"
,
//
Tell
the
tsc
compiler
to
use
the
tsconfig.json
from
the
open
folder.
"args"
:
[
"-p"
,
"."
],
//
use
the
standard
tsc
problem
matcher
to
find
compile
problems
//
in
the
output.
"problemMatcher"
:
"$tsc"
}
*/
//
A
task
runner
configuration
for
gulp.
Gulp
provides
a
less
task
//
which
compiles
less
to
css.
/*
{
"version"
:
"0.1.0"
,
"command"
:
"gulp"
,
"isShellCommand"
:
true
,
"tasks"
:
[
{
"taskName"
:
"less"
,
//
Make
this
the
default
build
command.
"isBuildCommand"
:
true
,
//
Show
the
output
window
only
if
unrecognized
errors
occur.
"showOutput"
:
"silent"
,
//
Use
the
standard
less
compilation
problem
matcher.
"problemMatcher"
:
"$lessCompile"
}
]
}
*/
//
Uncomment
the
following
section
to
use
jake
to
build
a
workspace
//
cloned
from
https://github.com/Microsoft/TypeScript.git
/*
{
"version"
:
"0.1.0"
,
//
Task
runner
is
jake
"command"
:
"jake"
,
//
Need
to
be
executed
in
shell
/
cmd
"isShellCommand"
:
true
,
"showOutput"
:
"silent"
,
"tasks"
:
[
{
//
TS
build
command
is
local.
"taskName"
:
"local"
,
//
Make
this
the
default
build
command.
"isBuildCommand"
:
true
,
//
Show
the
output
window
only
if
unrecognized
errors
occur.
"showOutput"
:
"silent"
,
//
Use
the
redefined
Typescript
output
problem
matcher.
"problemMatcher"
:
[
"$tsc"
]
}
]
}
*/
//
Uncomment
the
section
below
to
use
msbuild
and
generate
problems
//
for
csc,
cpp,
tsc
and
vb.
The
configuration
assumes
that
msbuild
//
is
available
on
the
path
and
a
solution
file
exists
in
the
//
workspace
folder
root.
/*
{
"version"
:
"0.1.0"
,
"command"
:
"msbuild"
,
"args"
:
[
//
Ask
msbuild
to
generate
full
paths
for
file
names.
"/property:GenerateFullPaths=true"
],
"taskSelector"
:
"/t:"
,
"showOutput"
:
"silent"
,
"tasks"
:
[
{
"taskName"
:
"build"
,
//
Show
the
output
window
only
if
unrecognized
errors
occur.
"showOutput"
:
"silent"
,
//
Use
the
standard
MS
compiler
pattern
to
detect
errors
,
warnings
//
and
infos
in
the
output.
"problemMatcher"
:
"$msCompile"
}
]
}
*/
//
Uncomment
the
following
section
to
use
msbuild
which
compiles
Typescript
//
and
less
files.
/*
{
"version"
:
"0.1.0"
,
"command"
:
"msbuild"
,
"args"
:
[
//
Ask
msbuild
to
generate
full
paths
for
file
names.
"/property:GenerateFullPaths=true"
],
"taskSelector"
:
"/t:"
,
"showOutput"
:
"silent"
,
"tasks"
:
[
{
"taskName"
:
"build"
,
//
Show
the
output
window
only
if
unrecognized
errors
occur.
"showOutput"
:
"silent"
,
//
Use
the
standard
MS
compiler
pattern
to
detect
errors
,
warnings
//
and
infos
in
the
output.
"problemMatcher"
:
[
"$msCompile"
,
"$lessCompile"
]
}
]
}
*/
//
A
task
runner
example
that
defines
a
problemMatcher
inline
instead
of
using
//
a
predefined
one.
/*
{
"version"
:
"0.1.0"
,
"command"
:
"tsc"
,
"isShellCommand"
:
true
,
"args"
:
[
"HelloWorld.ts"
],
"showOutput"
:
"silent"
,
"problemMatcher"
:
{
//
The
problem
is
owned
by
the
typescript
language
service.
Ensure
that
the
problems
//
are
merged
with
problems
produced
by
Visual
Studio's
language
service.
"owner"
:
"typescript"
,
//
The
file
name
for
reported
problems
is
relative
to
the
current
working
directory.
"fileLocation"
:
[
"relative"
,
"${cwd}"
],
//
The
actual
pattern
to
match
problems
in
the
output.
"pattern"
:
{
//
The
regular
expression.
Matches
HelloWorld.ts(
2
,
10
):
error
TS
2339
:
Property
'logg'
does
not
exist
on
type
'Console'.
"regexp"
:
"^([^
\\
s].*)
\\
((
\\
d+|
\\
d+,
\\
d+|
\\
d+,
\\
d+,
\\
d+,
\\
d+)
\\
):
\\
s+(error|warning|info)
\\
s+(TS
\\
d+)
\\
s*:
\\
s*(.*)$"
,
//
The
match
group
that
denotes
the
file
containing
the
problem.
"file"
:
1
,
//
The
match
group
that
denotes
the
problem
location.
"location"
:
2
,
//
The
match
group
that
denotes
the
problem's
severity.
Can
be
omitted.
"severity"
:
3
,
//
The
match
group
that
denotes
the
problem
code.
Can
be
omitted.
"code"
:
4
,
//
The
match
group
that
denotes
the
problem's
message.
"message"
:
5
}
}
}
*/
\ No newline at end of file
//
See
http://code.visualstudio.com/docs/editor/tasks
//
for
the
documentation
about
the
tasks.json
format
//
Use
IntelliSense
to
insert
predefined
task
snippets
ts
}
\ No newline at end of file
src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts
浏览文件 @
8004d277
...
...
@@ -39,10 +39,13 @@ import { IConfigurationService, ConfigurationServiceEventTypes } from 'vs/platfo
import
{
IFileService
,
FileChangesEvent
,
FileChangeType
,
EventType
as
FileEventType
}
from
'
vs/platform/files/common/files
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IPluginService
}
from
'
vs/platform/plugins/common/plugins
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybindingService
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
import
{
ICodeEditor
}
from
'
vs/editor/browser/editorBrowser
'
;
import
jsonContributionRegistry
=
require
(
'
vs/platform/jsonschemas/common/jsonContributionRegistry
'
);
import
{
IJSONSchema
}
from
'
vs/base/common/jsonSchema
'
;
...
...
@@ -148,11 +151,12 @@ class ConfigureTaskRunnerAction extends Action {
private
contextService
:
IWorkspaceContextService
;
private
outputService
:
IOutputService
;
private
messageService
:
IMessageService
;
private
keybindingService
:
IKeybindingService
constructor
(
id
:
string
,
label
:
string
,
@
IConfigurationService
configurationService
:
IConfigurationService
,
@
IWorkbenchEditorService
editorService
:
IWorkbenchEditorService
,
@
IFileService
fileService
:
IFileService
,
@
IWorkspaceContextService
contextService
:
IWorkspaceContextService
,
@
IOutputService
outputService
:
IOutputService
,
@
IMessageService
messageService
:
IMessageService
)
{
@
IMessageService
messageService
:
IMessageService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
super
(
id
,
label
);
this
.
configurationService
=
configurationService
;
...
...
@@ -161,11 +165,13 @@ class ConfigureTaskRunnerAction extends Action {
this
.
contextService
=
contextService
;
this
.
outputService
=
outputService
;
this
.
messageService
=
messageService
;
this
.
keybindingService
=
keybindingService
;
}
public
run
(
event
?:
any
):
Promise
{
let
sideBySide
=
!!
(
event
&&
(
event
.
ctrlKey
||
event
.
metaKey
));
let
autoDetectFailed
=
false
;
let
fileCreated
=
false
;
return
this
.
fileService
.
resolveFile
(
this
.
contextService
.
toResource
(
'
.vscode/tasks.json
'
)).
then
((
success
)
=>
{
return
success
;
},
(
err
:
any
)
=>
{
...
...
@@ -198,6 +204,7 @@ class ConfigureTaskRunnerAction extends Action {
});
}
return
contentPromise
.
then
((
content
)
=>
{
fileCreated
=
true
;
return
this
.
fileService
.
createFile
(
this
.
contextService
.
toResource
(
'
.vscode/tasks.json
'
),
content
);
});
});
...
...
@@ -208,9 +215,19 @@ class ConfigureTaskRunnerAction extends Action {
options
:
{
forceOpen
:
true
}
},
sideBySide
).
then
((
value
)
=>
{
},
sideBySide
).
then
((
editor
)
=>
{
if
(
fileCreated
)
{
let
codeEditor
:
ICodeEditor
=
editor
.
getControl
()
as
ICodeEditor
;
let
position
=
{
lineNumber
:
5
,
column
:
4
};
codeEditor
.
revealPosition
(
position
);
codeEditor
.
setPosition
(
position
);
// Workaround for: https://github.com/Microsoft/vscode/issues/3121
setTimeout
(()
=>
{
this
.
keybindingService
.
executeCommand
(
'
editor.action.triggerSuggest
'
);
},
300
);
}
this
.
outputService
.
showOutput
(
TaskService
.
OutputChannel
,
true
);
return
value
;
return
editor
;
});
},
(
error
)
=>
{
throw
new
Error
(
nls
.
localize
(
'
ConfigureTaskRunnerAction.failed
'
,
"
Unable to create the 'tasks.json' file inside the '.vscode' folder. Consult the task output for details.
"
));
...
...
@@ -453,6 +470,7 @@ class TaskService extends EventEmitter implements ITaskService {
private
eventService
:
IEventService
;
private
modelService
:
IModelService
;
private
pluginService
:
IPluginService
;
private
keybindingService
:
IKeybindingService
;
private
_taskSystemPromise
:
TPromise
<
ITaskSystem
>
;
private
_taskSystem
:
ITaskSystem
;
...
...
@@ -467,7 +485,8 @@ class TaskService extends EventEmitter implements ITaskService {
@
IFileService
fileService
:
IFileService
,
@
IWorkspaceContextService
contextService
:
IWorkspaceContextService
,
@
ITelemetryService
telemetryService
:
ITelemetryService
,
@
ITextFileService
textFileService
:
ITextFileService
,
@
ILifecycleService
lifecycleService
:
ILifecycleService
,
@
IEventService
eventService
:
IEventService
,
@
IModelService
modelService
:
IModelService
,
@
IPluginService
pluginService
:
IPluginService
)
{
@
IModelService
modelService
:
IModelService
,
@
IPluginService
pluginService
:
IPluginService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
super
();
this
.
modeService
=
modeService
;
...
...
@@ -483,6 +502,7 @@ class TaskService extends EventEmitter implements ITaskService {
this
.
eventService
=
eventService
;
this
.
modelService
=
modelService
;
this
.
pluginService
=
pluginService
;
this
.
keybindingService
=
keybindingService
;
this
.
taskSystemListeners
=
[];
this
.
clearTaskSystemPromise
=
false
;
...
...
@@ -621,7 +641,7 @@ class TaskService extends EventEmitter implements ITaskService {
public
configureAction
():
Action
{
return
new
ConfigureTaskRunnerAction
(
ConfigureTaskRunnerAction
.
ID
,
ConfigureTaskRunnerAction
.
TEXT
,
this
.
configurationService
,
this
.
editorService
,
this
.
fileService
,
this
.
contextService
,
this
.
outputService
,
this
.
messageService
);
this
.
outputService
,
this
.
messageService
,
this
.
keybindingService
);
}
public
build
():
TPromise
<
ITaskSummary
>
{
...
...
@@ -750,7 +770,7 @@ class TaskService extends EventEmitter implements ITaskService {
if
(
needsConfig
||
needsTerminate
)
{
let
closeAction
=
new
CloseMessageAction
();
let
action
=
needsConfig
?
new
ConfigureTaskRunnerAction
(
ConfigureTaskRunnerAction
.
ID
,
ConfigureTaskRunnerAction
.
TEXT
,
this
.
configurationService
,
this
.
editorService
,
this
.
fileService
,
this
.
contextService
,
this
.
outputService
,
this
.
messageService
)
?
this
.
configureAction
(
)
:
new
TerminateAction
(
TerminateAction
.
ID
,
TerminateAction
.
TEXT
,
this
,
this
.
telemetryService
);
closeAction
.
closeFunction
=
this
.
messageService
.
show
(
buildError
.
severity
,
{
message
:
buildError
.
message
,
actions
:
[
closeAction
,
action
]
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录