Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
663a049f
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,发现更多精彩内容 >>
未验证
提交
663a049f
编写于
11月 05, 2020
作者:
M
Miguel Solorio
提交者:
GitHub
11月 05, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into aasim/fix/checkboxOutline
上级
024368a6
25c6703f
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
50 addition
and
44 deletion
+50
-44
extensions/markdown-basics/snippets/markdown.code-snippets
extensions/markdown-basics/snippets/markdown.code-snippets
+6
-1
extensions/typescript-language-features/src/languageFeatures/codeLens/baseCodeLensProvider.ts
...res/src/languageFeatures/codeLens/baseCodeLensProvider.ts
+2
-2
extensions/typescript-language-features/src/languageFeatures/codeLens/implementationsCodeLens.ts
.../src/languageFeatures/codeLens/implementationsCodeLens.ts
+1
-3
extensions/typescript-language-features/src/languageFeatures/codeLens/referencesCodeLens.ts
...tures/src/languageFeatures/codeLens/referencesCodeLens.ts
+3
-7
src/vs/editor/contrib/find/findWidget.ts
src/vs/editor/contrib/find/findWidget.ts
+1
-1
src/vs/editor/contrib/indentation/indentation.ts
src/vs/editor/contrib/indentation/indentation.ts
+2
-2
src/vs/vscode.d.ts
src/vs/vscode.d.ts
+15
-0
src/vs/vscode.proposed.d.ts
src/vs/vscode.proposed.d.ts
+0
-22
src/vs/workbench/contrib/debug/browser/debugEditorContribution.ts
...orkbench/contrib/debug/browser/debugEditorContribution.ts
+1
-1
src/vs/workbench/contrib/debug/browser/debugHover.ts
src/vs/workbench/contrib/debug/browser/debugHover.ts
+16
-4
src/vs/workbench/contrib/debug/node/debugAdapter.ts
src/vs/workbench/contrib/debug/node/debugAdapter.ts
+2
-0
src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts
...vs/workbench/contrib/tasks/browser/abstractTaskService.ts
+1
-1
未找到文件。
extensions/markdown-basics/snippets/markdown.code-snippets
浏览文件 @
663a049f
...
...
@@ -64,6 +64,11 @@
"body": ["1. ${1:first}", "2. ${2:second}", "3. ${3:third}", "$0"],
"description": "Insert ordered list"
},
"Insert definition list": {
"prefix": "definition list",
"body": ["${1:term}", ": ${2:definition}", "$0"],
"description": "Insert definition list"
},
"Insert horizontal rule": {
"prefix": "horizontal rule",
"body": "----------\n",
...
...
@@ -83,5 +88,5 @@
"prefix": "strikethrough",
"body": "~~${1:${TM_SELECTED_TEXT}}~~",
"description": "Insert strikethrough"
}
}
,
}
extensions/typescript-language-features/src/languageFeatures/codeLens/baseCodeLensProvider.ts
浏览文件 @
663a049f
...
...
@@ -23,7 +23,7 @@ export class ReferencesCodeLens extends vscode.CodeLens {
}
}
export
abstract
class
TypeScriptBaseCodeLensProvider
implements
vscode
.
CodeLensProvider
{
export
abstract
class
TypeScriptBaseCodeLensProvider
implements
vscode
.
CodeLensProvider
<
ReferencesCodeLens
>
{
public
static
readonly
cancelledCommand
:
vscode
.
Command
=
{
// Cancellation is not an error. Just show nothing until we can properly re-compute the code lens
...
...
@@ -47,7 +47,7 @@ export abstract class TypeScriptBaseCodeLensProvider implements vscode.CodeLensP
return
this
.
onDidChangeCodeLensesEmitter
.
event
;
}
async
provideCodeLenses
(
document
:
vscode
.
TextDocument
,
token
:
vscode
.
CancellationToken
):
Promise
<
vscode
.
CodeLens
[]
>
{
async
provideCodeLenses
(
document
:
vscode
.
TextDocument
,
token
:
vscode
.
CancellationToken
):
Promise
<
References
CodeLens
[]
>
{
const
filepath
=
this
.
client
.
toOpenedFilePath
(
document
);
if
(
!
filepath
)
{
return
[];
...
...
extensions/typescript-language-features/src/languageFeatures/codeLens/implementationsCodeLens.ts
浏览文件 @
663a049f
...
...
@@ -19,11 +19,9 @@ const localize = nls.loadMessageBundle();
export
default
class
TypeScriptImplementationsCodeLensProvider
extends
TypeScriptBaseCodeLensProvider
{
public
async
resolveCodeLens
(
inputCodeLens
:
vscode
.
CodeLens
,
codeLens
:
References
CodeLens
,
token
:
vscode
.
CancellationToken
,
):
Promise
<
vscode
.
CodeLens
>
{
const
codeLens
=
inputCodeLens
as
ReferencesCodeLens
;
const
args
=
typeConverters
.
Position
.
toFileLocationRequestArgs
(
codeLens
.
file
,
codeLens
.
range
.
start
);
const
response
=
await
this
.
client
.
execute
(
'
implementation
'
,
args
,
token
,
{
lowPriority
:
true
,
cancelOnResourceChange
:
codeLens
.
document
});
if
(
response
.
type
!==
'
response
'
||
!
response
.
body
)
{
...
...
extensions/typescript-language-features/src/languageFeatures/codeLens/referencesCodeLens.ts
浏览文件 @
663a049f
...
...
@@ -26,8 +26,7 @@ export class TypeScriptReferencesCodeLensProvider extends TypeScriptBaseCodeLens
super
(
client
,
_cachedResponse
);
}
public
async
resolveCodeLens
(
inputCodeLens
:
vscode
.
CodeLens
,
token
:
vscode
.
CancellationToken
):
Promise
<
vscode
.
CodeLens
>
{
const
codeLens
=
inputCodeLens
as
ReferencesCodeLens
;
public
async
resolveCodeLens
(
codeLens
:
ReferencesCodeLens
,
token
:
vscode
.
CancellationToken
):
Promise
<
vscode
.
CodeLens
>
{
const
args
=
typeConverters
.
Position
.
toFileLocationRequestArgs
(
codeLens
.
file
,
codeLens
.
range
.
start
);
const
response
=
await
this
.
client
.
execute
(
'
references
'
,
args
,
token
,
{
lowPriority
:
true
,
...
...
@@ -42,12 +41,9 @@ export class TypeScriptReferencesCodeLensProvider extends TypeScriptBaseCodeLens
}
const
locations
=
response
.
body
.
refs
.
filter
(
reference
=>
!
reference
.
isDefinition
)
.
map
(
reference
=>
typeConverters
.
Location
.
fromTextSpan
(
this
.
client
.
toResource
(
reference
.
file
),
reference
))
.
filter
(
location
=>
// Exclude original definition from references
!
(
location
.
uri
.
toString
()
===
codeLens
.
document
.
toString
()
&&
location
.
range
.
start
.
isEqual
(
codeLens
.
range
.
start
)));
typeConverters
.
Location
.
fromTextSpan
(
this
.
client
.
toResource
(
reference
.
file
),
reference
));
codeLens
.
command
=
{
title
:
this
.
getCodeLensLabel
(
locations
),
...
...
src/vs/editor/contrib/find/findWidget.ts
浏览文件 @
663a049f
...
...
@@ -225,7 +225,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL
if
(
this
.
_isVisible
)
{
let
globalBufferTerm
=
await
this
.
_controller
.
getGlobalBufferTerm
();
if
(
globalBufferTerm
&&
globalBufferTerm
!==
this
.
_state
.
searchString
)
{
this
.
_state
.
change
({
searchString
:
globalBufferTerm
},
tru
e
);
this
.
_state
.
change
({
searchString
:
globalBufferTerm
},
fals
e
);
this
.
_findInput
.
select
();
}
}
...
...
src/vs/editor/contrib/indentation/indentation.ts
浏览文件 @
663a049f
...
...
@@ -84,7 +84,7 @@ export function getReindentEditOperations(model: ITextModel, startLineNumber: nu
}
if
(
currentLineText
!==
adjustedLineContent
)
{
indentEdits
.
push
(
EditOperation
.
replace
(
new
Selection
(
startLineNumber
,
1
,
startLineNumber
,
oldIndentation
.
length
+
1
),
TextModel
.
normalizeIndentation
(
globalIndent
,
indentSize
,
insertSpaces
)));
indentEdits
.
push
(
EditOperation
.
replace
Move
(
new
Selection
(
startLineNumber
,
1
,
startLineNumber
,
oldIndentation
.
length
+
1
),
TextModel
.
normalizeIndentation
(
globalIndent
,
indentSize
,
insertSpaces
)));
}
}
else
{
globalIndent
=
strings
.
getLeadingWhitespace
(
currentLineText
);
...
...
@@ -115,7 +115,7 @@ export function getReindentEditOperations(model: ITextModel, startLineNumber: nu
}
if
(
oldIndentation
!==
idealIndentForNextLine
)
{
indentEdits
.
push
(
EditOperation
.
replace
(
new
Selection
(
lineNumber
,
1
,
lineNumber
,
oldIndentation
.
length
+
1
),
TextModel
.
normalizeIndentation
(
idealIndentForNextLine
,
indentSize
,
insertSpaces
)));
indentEdits
.
push
(
EditOperation
.
replace
Move
(
new
Selection
(
lineNumber
,
1
,
lineNumber
,
oldIndentation
.
length
+
1
),
TextModel
.
normalizeIndentation
(
idealIndentForNextLine
,
indentSize
,
insertSpaces
)));
}
// calculate idealIndentForNextLine
...
...
src/vs/vscode.d.ts
浏览文件 @
663a049f
...
...
@@ -6860,6 +6860,21 @@ declare module 'vscode' {
* @param options Defines if existing files should be overwritten.
*/
copy
(
source
:
Uri
,
target
:
Uri
,
options
?:
{
overwrite
?:
boolean
}):
Thenable
<
void
>
;
/**
* Check if a given file system supports writing files.
*
* Keep in mind that just because a file system supports writing, that does
* not mean that writes will always succeed. There may be permissions issues
* or other errors that prevent writing a file.
*
* @param scheme The scheme of the filesystem, for example `file` or `git`.
*
* @return `true` if the file system supports writing, `false` if it does not
* support writing (i.e. it is readonly), and `undefined` if VS Code does not
* know about the filesystem.
*/
isWritableFileSystem
(
scheme
:
string
):
boolean
|
undefined
;
}
/**
...
...
src/vs/vscode.proposed.d.ts
浏览文件 @
663a049f
...
...
@@ -2141,28 +2141,6 @@ declare module 'vscode' {
}
//#endregion
//#region https://github.com/microsoft/vscode/issues/91697
export
interface
FileSystem
{
/**
* Check if a given file system supports writing files.
*
* Keep in mind that just because a file system supports writing, that does
* not mean that writes will always succeed. There may be permissions issues
* or other errors that prevent writing a file.
*
* @param scheme The scheme of the filesystem, for example `file` or `git`.
*
* @return `true` if the file system supports writing, `false` if it does not
* support writing (i.e. it is readonly), and `undefined` if VS Code does not
* know about the filesystem.
*/
isWritableFileSystem
(
scheme
:
string
):
boolean
|
undefined
;
}
//#endregion
//#region https://github.com/microsoft/vscode/issues/108929 FoldingRangeProvider.onDidChangeFoldingRanges @aeschli
export
interface
FoldingRangeProvider2
extends
FoldingRangeProvider
{
...
...
src/vs/workbench/contrib/debug/browser/debugEditorContribution.ts
浏览文件 @
663a049f
...
...
@@ -355,7 +355,7 @@ export class DebugEditorContribution implements IDebugEditorContribution {
}
private
hideHoverWidget
():
void
{
if
(
!
this
.
hideHoverScheduler
.
isScheduled
()
&&
this
.
hoverWidget
.
is
Visible
())
{
if
(
!
this
.
hideHoverScheduler
.
isScheduled
()
&&
this
.
hoverWidget
.
willBe
Visible
())
{
this
.
hideHoverScheduler
.
schedule
();
}
this
.
showHoverScheduler
.
cancel
();
...
...
src/vs/workbench/contrib/debug/browser/debugHover.ts
浏览文件 @
663a049f
...
...
@@ -31,7 +31,7 @@ import { coalesce } from 'vs/base/common/arrays';
import
{
IAsyncDataSource
}
from
'
vs/base/browser/ui/tree/tree
'
;
import
{
VariablesRenderer
}
from
'
vs/workbench/contrib/debug/browser/variablesView
'
;
import
{
EvaluatableExpressionProviderRegistry
}
from
'
vs/editor/common/modes
'
;
import
{
CancellationToken
}
from
'
vs/base/common/cancellation
'
;
import
{
CancellationToken
Source
}
from
'
vs/base/common/cancellation
'
;
const
$
=
dom
.
$
;
...
...
@@ -70,6 +70,7 @@ export class DebugHoverWidget implements IContentWidget {
allowEditorOverflow
=
true
;
private
_isVisible
:
boolean
;
private
showCancellationSource
?:
CancellationTokenSource
;
private
domNode
!
:
HTMLElement
;
private
tree
!
:
AsyncDataTree
<
IExpression
,
IExpression
,
any
>
;
private
showAtPosition
:
Position
|
null
;
...
...
@@ -161,13 +162,17 @@ export class DebugHoverWidget implements IContentWidget {
}
isHovered
():
boolean
{
return
this
.
domNode
.
matches
(
'
:hover
'
);
return
!!
this
.
domNode
?
.
matches
(
'
:hover
'
);
}
isVisible
():
boolean
{
return
this
.
_isVisible
;
}
willBeVisible
():
boolean
{
return
!!
this
.
showCancellationSource
;
}
getId
():
string
{
return
DebugHoverWidget
.
ID
;
}
...
...
@@ -177,6 +182,8 @@ export class DebugHoverWidget implements IContentWidget {
}
async
showAt
(
range
:
Range
,
focus
:
boolean
):
Promise
<
void
>
{
this
.
showCancellationSource
?.
cancel
();
const
cancellationSource
=
this
.
showCancellationSource
=
new
CancellationTokenSource
();
const
session
=
this
.
debugService
.
getViewModel
().
focusedSession
;
if
(
!
session
||
!
this
.
editor
.
hasModel
())
{
...
...
@@ -193,7 +200,7 @@ export class DebugHoverWidget implements IContentWidget {
const
supports
=
EvaluatableExpressionProviderRegistry
.
ordered
(
model
);
const
promises
=
supports
.
map
(
support
=>
{
return
Promise
.
resolve
(
support
.
provideEvaluatableExpression
(
model
,
pos
,
CancellationToken
.
None
)).
then
(
expression
=>
{
return
Promise
.
resolve
(
support
.
provideEvaluatableExpression
(
model
,
pos
,
cancellationSource
.
token
)).
then
(
expression
=>
{
return
expression
;
},
err
=>
{
//onUnexpectedExternalError(err);
...
...
@@ -236,7 +243,7 @@ export class DebugHoverWidget implements IContentWidget {
}
}
if
(
!
expression
||
(
expression
instanceof
Expression
&&
!
expression
.
available
))
{
if
(
cancellationSource
.
token
.
isCancellationRequested
||
!
expression
||
(
expression
instanceof
Expression
&&
!
expression
.
available
))
{
this
.
hide
();
return
;
}
...
...
@@ -315,6 +322,11 @@ export class DebugHoverWidget implements IContentWidget {
hide
():
void
{
if
(
this
.
showCancellationSource
)
{
this
.
showCancellationSource
.
cancel
();
this
.
showCancellationSource
=
undefined
;
}
if
(
!
this
.
_isVisible
)
{
return
;
}
...
...
src/vs/workbench/contrib/debug/node/debugAdapter.ts
浏览文件 @
663a049f
...
...
@@ -263,6 +263,8 @@ export class ExecutableDebugAdapter extends StreamDebugAdapter {
channel
.
append
(
sanitize
(
data
));
}
});
}
else
{
this
.
serverProcess
.
stderr
!
.
resume
();
}
// finally connect to the DA
...
...
src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts
浏览文件 @
663a049f
...
...
@@ -1589,7 +1589,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
this
.
modelService
,
this
.
configurationResolverService
,
this
.
telemetryService
,
this
.
contextService
,
this
.
environmentService
,
AbstractTaskService
.
OutputChannelId
,
this
.
fileService
,
this
.
terminalInstanceService
,
this
.
pathService
,
this
.
viewDescriptorService
,
this
.
logService
,
this
.
pathService
,
this
.
viewDescriptorService
,
this
.
logService
,
this
.
configurationService
,
(
workspaceFolder
:
IWorkspaceFolder
|
undefined
)
=>
{
if
(
workspaceFolder
)
{
return
this
.
getTaskSystemInfo
(
workspaceFolder
.
uri
.
scheme
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录