Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
4e0af001
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,发现更多精彩内容 >>
提交
4e0af001
编写于
10月 17, 2019
作者:
A
Alex Ross
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
More tasks workspace file changes
上级
f367d0fe
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
29 addition
and
12 deletion
+29
-12
src/vs/workbench/contrib/debug/browser/debugService.ts
src/vs/workbench/contrib/debug/browser/debugService.ts
+2
-2
src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts
...vs/workbench/contrib/tasks/browser/abstractTaskService.ts
+25
-8
src/vs/workbench/contrib/tasks/common/taskService.ts
src/vs/workbench/contrib/tasks/common/taskService.ts
+2
-2
未找到文件。
src/vs/workbench/contrib/debug/browser/debugService.ts
浏览文件 @
4e0af001
...
@@ -30,7 +30,7 @@ import { IPanelService } from 'vs/workbench/services/panel/common/panelService';
...
@@ -30,7 +30,7 @@ import { IPanelService } from 'vs/workbench/services/panel/common/panelService';
import
{
IWorkbenchLayoutService
,
Parts
}
from
'
vs/workbench/services/layout/browser/layoutService
'
;
import
{
IWorkbenchLayoutService
,
Parts
}
from
'
vs/workbench/services/layout/browser/layoutService
'
;
import
{
ITextFileService
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
import
{
ITextFileService
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IWorkspaceContextService
,
WorkbenchState
,
IWorkspaceFolder
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IWorkspaceContextService
,
WorkbenchState
,
IWorkspaceFolder
,
IWorkspace
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
parse
,
getFirstFrame
}
from
'
vs/base/common/console
'
;
import
{
parse
,
getFirstFrame
}
from
'
vs/base/common/console
'
;
import
{
TaskEvent
,
TaskEventKind
,
TaskIdentifier
}
from
'
vs/workbench/contrib/tasks/common/tasks
'
;
import
{
TaskEvent
,
TaskEventKind
,
TaskIdentifier
}
from
'
vs/workbench/contrib/tasks/common/tasks
'
;
...
@@ -750,7 +750,7 @@ export class DebugService implements IDebugService {
...
@@ -750,7 +750,7 @@ export class DebugService implements IDebugService {
}
}
}
}
private
async
runTask
(
root
:
IWorkspaceFolder
|
undefined
,
taskId
:
string
|
TaskIdentifier
|
undefined
):
Promise
<
ITaskSummary
|
null
>
{
private
async
runTask
(
root
:
IWorkspace
|
IWorkspace
Folder
|
undefined
,
taskId
:
string
|
TaskIdentifier
|
undefined
):
Promise
<
ITaskSummary
|
null
>
{
if
(
!
taskId
)
{
if
(
!
taskId
)
{
return
Promise
.
resolve
(
null
);
return
Promise
.
resolve
(
null
);
}
}
...
...
src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts
浏览文件 @
4e0af001
...
@@ -128,6 +128,10 @@ interface TaskCustomizationTelemetryEvent {
...
@@ -128,6 +128,10 @@ interface TaskCustomizationTelemetryEvent {
properties
:
string
[];
properties
:
string
[];
}
}
function
isWorkspaceFolder
(
folder
:
IWorkspace
|
IWorkspaceFolder
):
folder
is
IWorkspaceFolder
{
return
'
uri
'
in
folder
;
}
class
TaskMap
{
class
TaskMap
{
private
_store
:
Map
<
string
,
Task
[]
>
=
new
Map
();
private
_store
:
Map
<
string
,
Task
[]
>
=
new
Map
();
...
@@ -135,20 +139,33 @@ class TaskMap {
...
@@ -135,20 +139,33 @@ class TaskMap {
this
.
_store
.
forEach
(
callback
);
this
.
_store
.
forEach
(
callback
);
}
}
public
get
(
workspaceFolder
:
IWorkspaceFolder
|
string
):
Task
[]
{
private
getKey
(
workspaceFolder
:
IWorkspace
|
IWorkspaceFolder
|
string
):
string
{
let
result
:
Task
[]
|
undefined
=
Types
.
isString
(
workspaceFolder
)
?
this
.
_store
.
get
(
workspaceFolder
)
:
this
.
_store
.
get
(
workspaceFolder
.
uri
.
toString
());
let
key
:
string
|
undefined
;
if
(
Types
.
isString
(
workspaceFolder
))
{
key
=
workspaceFolder
;
}
else
{
const
uri
:
URI
|
null
|
undefined
=
isWorkspaceFolder
(
workspaceFolder
)
?
workspaceFolder
.
uri
:
workspaceFolder
.
configuration
;
key
=
uri
?
uri
.
toString
()
:
''
;
}
return
key
;
}
public
get
(
workspaceFolder
:
IWorkspace
|
IWorkspaceFolder
|
string
):
Task
[]
{
const
key
=
this
.
getKey
(
workspaceFolder
);
let
result
:
Task
[]
|
undefined
=
this
.
_store
.
get
(
key
);
if
(
!
result
)
{
if
(
!
result
)
{
result
=
[];
result
=
[];
Types
.
isString
(
workspaceFolder
)
?
this
.
_store
.
set
(
workspaceFolder
,
result
)
:
this
.
_store
.
set
(
workspaceFolder
.
uri
.
toString
()
,
result
);
this
.
_store
.
set
(
key
,
result
);
}
}
return
result
;
return
result
;
}
}
public
add
(
workspaceFolder
:
IWorkspaceFolder
|
string
,
...
task
:
Task
[]):
void
{
public
add
(
workspaceFolder
:
IWorkspace
|
IWorkspaceFolder
|
string
,
...
task
:
Task
[]):
void
{
let
values
=
Types
.
isString
(
workspaceFolder
)
?
this
.
_store
.
get
(
workspaceFolder
)
:
this
.
_store
.
get
(
workspaceFolder
.
uri
.
toString
());
const
key
=
this
.
getKey
(
workspaceFolder
);
let
values
=
this
.
_store
.
get
(
key
);
if
(
!
values
)
{
if
(
!
values
)
{
values
=
[];
values
=
[];
Types
.
isString
(
workspaceFolder
)
?
this
.
_store
.
set
(
workspaceFolder
,
values
)
:
this
.
_store
.
set
(
workspaceFolder
.
uri
.
toString
()
,
values
);
this
.
_store
.
set
(
key
,
values
);
}
}
values
.
push
(...
task
);
values
.
push
(...
task
);
}
}
...
@@ -500,8 +517,8 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
...
@@ -500,8 +517,8 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
return
this
.
_taskSystem
.
customExecutionComplete
(
task
,
result
);
return
this
.
_taskSystem
.
customExecutionComplete
(
task
,
result
);
}
}
public
getTask
(
folder
:
IWorkspaceFolder
|
string
,
identifier
:
string
|
TaskIdentifier
,
compareId
:
boolean
=
false
):
Promise
<
Task
|
undefined
>
{
public
getTask
(
folder
:
IWorkspace
|
IWorkspace
Folder
|
string
,
identifier
:
string
|
TaskIdentifier
,
compareId
:
boolean
=
false
):
Promise
<
Task
|
undefined
>
{
const
name
=
Types
.
isString
(
folder
)
?
folder
:
folder
.
name
;
const
name
=
Types
.
isString
(
folder
)
?
folder
:
isWorkspaceFolder
(
folder
)
?
folder
.
name
:
folder
.
configuration
?
resources
.
basename
(
folder
.
configuration
)
:
undefined
;
if
(
this
.
ignoredWorkspaceFolders
.
some
(
ignored
=>
ignored
.
name
===
name
))
{
if
(
this
.
ignoredWorkspaceFolders
.
some
(
ignored
=>
ignored
.
name
===
name
))
{
return
Promise
.
reject
(
new
Error
(
nls
.
localize
(
'
TaskServer.folderIgnored
'
,
'
The folder {0} is ignored since it uses task version 0.1.0
'
,
name
)));
return
Promise
.
reject
(
new
Error
(
nls
.
localize
(
'
TaskServer.folderIgnored
'
,
'
The folder {0} is ignored since it uses task version 0.1.0
'
,
name
)));
}
}
...
...
src/vs/workbench/contrib/tasks/common/taskService.ts
浏览文件 @
4e0af001
...
@@ -9,7 +9,7 @@ import { LinkedMap } from 'vs/base/common/map';
...
@@ -9,7 +9,7 @@ import { LinkedMap } from 'vs/base/common/map';
import
{
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
IDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
IWorkspaceFolder
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IWorkspaceFolder
,
IWorkspace
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
Task
,
ContributedTask
,
CustomTask
,
TaskSet
,
TaskSorter
,
TaskEvent
,
TaskIdentifier
,
ConfiguringTask
,
TaskRunSource
}
from
'
vs/workbench/contrib/tasks/common/tasks
'
;
import
{
Task
,
ContributedTask
,
CustomTask
,
TaskSet
,
TaskSorter
,
TaskEvent
,
TaskIdentifier
,
ConfiguringTask
,
TaskRunSource
}
from
'
vs/workbench/contrib/tasks/common/tasks
'
;
import
{
ITaskSummary
,
TaskTerminateResponse
,
TaskSystemInfo
}
from
'
vs/workbench/contrib/tasks/common/taskSystem
'
;
import
{
ITaskSummary
,
TaskTerminateResponse
,
TaskSystemInfo
}
from
'
vs/workbench/contrib/tasks/common/taskSystem
'
;
import
{
IStringDictionary
}
from
'
vs/base/common/collections
'
;
import
{
IStringDictionary
}
from
'
vs/base/common/collections
'
;
...
@@ -71,7 +71,7 @@ export interface ITaskService {
...
@@ -71,7 +71,7 @@ export interface ITaskService {
/**
/**
* @param alias The task's name, label or defined identifier.
* @param alias The task's name, label or defined identifier.
*/
*/
getTask
(
workspaceFolder
:
IWorkspaceFolder
|
string
,
alias
:
string
|
TaskIdentifier
,
compareId
?:
boolean
):
Promise
<
Task
|
undefined
>
;
getTask
(
workspaceFolder
:
IWorkspace
|
IWorkspace
Folder
|
string
,
alias
:
string
|
TaskIdentifier
,
compareId
?:
boolean
):
Promise
<
Task
|
undefined
>
;
getTasksForGroup
(
group
:
string
):
Promise
<
Task
[]
>
;
getTasksForGroup
(
group
:
string
):
Promise
<
Task
[]
>
;
getRecentlyUsedTasks
():
LinkedMap
<
string
,
string
>
;
getRecentlyUsedTasks
():
LinkedMap
<
string
,
string
>
;
createSorter
():
TaskSorter
;
createSorter
():
TaskSorter
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录