Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
c2da7508
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,发现更多精彩内容 >>
提交
c2da7508
编写于
9月 11, 2020
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
do not use deprecated dom helper methods
#103454
上级
93c96b63
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
26 addition
and
30 deletion
+26
-30
src/vs/base/browser/ui/selectBox/selectBoxCustom.ts
src/vs/base/browser/ui/selectBox/selectBoxCustom.ts
+16
-16
src/vs/base/browser/ui/selectBox/selectBoxNative.ts
src/vs/base/browser/ui/selectBox/selectBoxNative.ts
+1
-1
src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.ts
...nch/contrib/debug/browser/breakpointEditorContribution.ts
+1
-1
src/vs/workbench/contrib/debug/browser/debugActionViewItems.ts
...s/workbench/contrib/debug/browser/debugActionViewItems.ts
+2
-2
src/vs/workbench/contrib/debug/browser/replFilter.ts
src/vs/workbench/contrib/debug/browser/replFilter.ts
+1
-2
src/vs/workbench/contrib/debug/common/debugger.ts
src/vs/workbench/contrib/debug/common/debugger.ts
+1
-2
src/vs/workbench/contrib/debug/common/replModel.ts
src/vs/workbench/contrib/debug/common/replModel.ts
+1
-2
src/vs/workbench/contrib/files/common/explorerModel.ts
src/vs/workbench/contrib/files/common/explorerModel.ts
+2
-2
src/vs/workbench/contrib/remote/browser/explorerViewItems.ts
src/vs/workbench/contrib/remote/browser/explorerViewItems.ts
+1
-2
未找到文件。
src/vs/base/browser/ui/selectBox/selectBoxCustom.ts
浏览文件 @
c2da7508
...
...
@@ -45,7 +45,7 @@ class SelectListRenderer implements IListRenderer<ISelectOptionItem, ISelectList
data
.
text
=
dom
.
append
(
container
,
$
(
'
.option-text
'
));
data
.
decoratorRight
=
dom
.
append
(
container
,
$
(
'
.option-decorator-right
'
));
data
.
itemDescription
=
dom
.
append
(
container
,
$
(
'
.option-text-description
'
));
d
om
.
addClass
(
data
.
itemDescription
,
'
visually-hidden
'
);
d
ata
.
itemDescription
.
classList
.
add
(
'
visually-hidden
'
);
return
data
;
}
...
...
@@ -68,10 +68,10 @@ class SelectListRenderer implements IListRenderer<ISelectOptionItem, ISelectList
// pseudo-select disabled option
if
(
isDisabled
)
{
d
om
.
addClass
(
data
.
root
,
'
option-disabled
'
);
d
ata
.
root
.
classList
.
add
(
'
option-disabled
'
);
}
else
{
// Make sure we do class removal from prior template rendering
d
om
.
removeClass
(
data
.
root
,
'
option-disabled
'
);
d
ata
.
root
.
classList
.
remove
(
'
option-disabled
'
);
}
}
...
...
@@ -162,7 +162,7 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
this
.
contextViewProvider
=
contextViewProvider
;
this
.
selectDropDownContainer
=
dom
.
$
(
'
.monaco-select-box-dropdown-container
'
);
// Use custom CSS vars for padding calculation (shared with parent select)
dom
.
addClass
(
this
.
selectDropDownContainer
,
'
monaco-select-box-dropdown-padding
'
);
this
.
selectDropDownContainer
.
classList
.
add
(
'
monaco-select-box-dropdown-padding
'
);
// Setup container for select option details
this
.
selectionDetailsPane
=
dom
.
append
(
this
.
selectDropDownContainer
,
$
(
'
.select-box-details-pane
'
));
...
...
@@ -309,7 +309,7 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
public
render
(
container
:
HTMLElement
):
void
{
this
.
container
=
container
;
dom
.
addClass
(
container
,
'
select-container
'
);
container
.
classList
.
add
(
'
select-container
'
);
container
.
appendChild
(
this
.
selectElement
);
this
.
applyStyles
();
}
...
...
@@ -440,8 +440,8 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
this
.
layoutSelectDropDown
();
},
onHide
:
()
=>
{
dom
.
toggleClass
(
this
.
selectDropDownContainer
,
'
visible
'
,
false
);
dom
.
toggleClass
(
this
.
selectElement
,
'
synthetic-focus
'
,
false
);
this
.
selectDropDownContainer
.
classList
.
remove
(
'
visible
'
);
this
.
selectElement
.
classList
.
remove
(
'
synthetic-focus
'
);
},
anchorPosition
:
this
.
_dropDownPosition
},
this
.
selectBoxOptions
.
optionsAsChildren
?
this
.
container
:
undefined
);
...
...
@@ -455,8 +455,8 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
render
:
(
container
:
HTMLElement
)
=>
this
.
renderSelectDropDown
(
container
),
layout
:
()
=>
this
.
layoutSelectDropDown
(),
onHide
:
()
=>
{
dom
.
toggleClass
(
this
.
selectDropDownContainer
,
'
visible
'
,
false
);
dom
.
toggleClass
(
this
.
selectElement
,
'
synthetic-focus
'
,
false
);
this
.
selectDropDownContainer
.
classList
.
remove
(
'
visible
'
);
this
.
selectElement
.
classList
.
remove
(
'
synthetic-focus
'
);
},
anchorPosition
:
this
.
_dropDownPosition
},
this
.
selectBoxOptions
.
optionsAsChildren
?
this
.
container
:
undefined
);
...
...
@@ -529,7 +529,7 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
if
(
this
.
selectList
)
{
// Make visible to enable measurements
dom
.
toggleClass
(
this
.
selectDropDownContainer
,
'
visible
'
,
true
);
this
.
selectDropDownContainer
.
classList
.
add
(
'
visible
'
);
const
selectPosition
=
dom
.
getDomNodePagePosition
(
this
.
selectElement
);
const
styles
=
getComputedStyle
(
this
.
selectElement
);
...
...
@@ -584,8 +584,8 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
this
.
selectDropDownContainer
.
appendChild
(
this
.
selectionDetailsPane
);
this
.
selectDropDownContainer
.
appendChild
(
this
.
selectDropDownListContainer
);
dom
.
removeClass
(
this
.
selectionDetailsPane
,
'
border-top
'
);
dom
.
addClass
(
this
.
selectionDetailsPane
,
'
border-bottom
'
);
this
.
selectionDetailsPane
.
classList
.
remove
(
'
border-top
'
);
this
.
selectionDetailsPane
.
classList
.
add
(
'
border-bottom
'
);
}
else
{
this
.
_dropDownPosition
=
AnchorPosition
.
BELOW
;
...
...
@@ -594,8 +594,8 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
this
.
selectDropDownContainer
.
appendChild
(
this
.
selectDropDownListContainer
);
this
.
selectDropDownContainer
.
appendChild
(
this
.
selectionDetailsPane
);
dom
.
removeClass
(
this
.
selectionDetailsPane
,
'
border-bottom
'
);
dom
.
addClass
(
this
.
selectionDetailsPane
,
'
border-top
'
);
this
.
selectionDetailsPane
.
classList
.
remove
(
'
border-bottom
'
);
this
.
selectionDetailsPane
.
classList
.
add
(
'
border-top
'
);
}
// Do full layout on showSelectDropDown only
return
true
;
...
...
@@ -655,8 +655,8 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
// Maintain focus outline on parent select as well as list container - tabindex for focus
this
.
selectDropDownListContainer
.
setAttribute
(
'
tabindex
'
,
'
0
'
);
dom
.
toggleClass
(
this
.
selectElement
,
'
synthetic-focus
'
,
true
);
dom
.
toggleClass
(
this
.
selectDropDownContainer
,
'
synthetic-focus
'
,
true
);
this
.
selectElement
.
classList
.
add
(
'
synthetic-focus
'
);
this
.
selectDropDownContainer
.
classList
.
add
(
'
synthetic-focus
'
);
return
true
;
}
else
{
...
...
src/vs/base/browser/ui/selectBox/selectBoxNative.ts
浏览文件 @
c2da7508
...
...
@@ -143,7 +143,7 @@ export class SelectBoxNative extends Disposable implements ISelectBoxDelegate {
}
public
render
(
container
:
HTMLElement
):
void
{
dom
.
addClass
(
container
,
'
select-container
'
);
container
.
classList
.
add
(
'
select-container
'
);
container
.
appendChild
(
this
.
selectElement
);
this
.
setOptions
(
this
.
options
,
this
.
selected
);
this
.
applyStyles
();
...
...
src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.ts
浏览文件 @
c2da7508
...
...
@@ -627,7 +627,7 @@ class InlineBreakpointWidget implements IContentWidget, IDisposable {
return
null
;
}
// Workaround: since the content widget can not be placed before the first column we need to force the left position
dom
.
toggleClass
(
this
.
domNode
,
'
line-start
'
,
this
.
range
.
startColumn
===
1
);
this
.
domNode
.
classList
.
toggle
(
'
line-start
'
,
this
.
range
.
startColumn
===
1
);
return
{
position
:
{
lineNumber
:
this
.
range
.
startLineNumber
,
column
:
this
.
range
.
startColumn
-
1
},
...
...
src/vs/workbench/contrib/debug/browser/debugActionViewItems.ts
浏览文件 @
c2da7508
...
...
@@ -84,10 +84,10 @@ export class StartDebugActionViewItem implements IActionViewItem {
}
}));
this
.
toDispose
.
push
(
dom
.
addDisposableListener
(
this
.
start
,
dom
.
EventType
.
MOUSE_UP
,
()
=>
{
dom
.
removeClass
(
this
.
start
,
'
active
'
);
this
.
start
.
classList
.
remove
(
'
active
'
);
}));
this
.
toDispose
.
push
(
dom
.
addDisposableListener
(
this
.
start
,
dom
.
EventType
.
MOUSE_OUT
,
()
=>
{
dom
.
removeClass
(
this
.
start
,
'
active
'
);
this
.
start
.
classList
.
remove
(
'
active
'
);
}));
this
.
toDispose
.
push
(
dom
.
addDisposableListener
(
this
.
start
,
dom
.
EventType
.
KEY_DOWN
,
(
e
:
KeyboardEvent
)
=>
{
...
...
src/vs/workbench/contrib/debug/browser/replFilter.ts
浏览文件 @
c2da7508
...
...
@@ -5,7 +5,6 @@
import
{
matchesFuzzy
}
from
'
vs/base/common/filters
'
;
import
{
splitGlobAware
}
from
'
vs/base/common/glob
'
;
import
*
as
strings
from
'
vs/base/common/strings
'
;
import
{
ITreeFilter
,
TreeVisibility
,
TreeFilterResult
}
from
'
vs/base/browser/ui/tree/tree
'
;
import
{
IReplElement
}
from
'
vs/workbench/contrib/debug/common/debug
'
;
import
*
as
DOM
from
'
vs/base/browser/dom
'
;
...
...
@@ -42,7 +41,7 @@ export class ReplFilter implements ITreeFilter<IReplElement> {
if
(
query
&&
query
!==
''
)
{
const
filters
=
splitGlobAware
(
query
,
'
,
'
).
map
(
s
=>
s
.
trim
()).
filter
(
s
=>
!!
s
.
length
);
for
(
const
f
of
filters
)
{
if
(
strings
.
startsWith
(
f
,
'
!
'
))
{
if
(
f
.
startsWith
(
'
!
'
))
{
this
.
_parsedQueries
.
push
({
type
:
'
exclude
'
,
query
:
f
.
slice
(
1
)
});
}
else
{
this
.
_parsedQueries
.
push
({
type
:
'
include
'
,
query
:
f
});
...
...
src/vs/workbench/contrib/debug/common/debugger.ts
浏览文件 @
c2da7508
...
...
@@ -4,7 +4,6 @@
*--------------------------------------------------------------------------------------------*/
import
*
as
nls
from
'
vs/nls
'
;
import
*
as
strings
from
'
vs/base/common/strings
'
;
import
*
as
objects
from
'
vs/base/common/objects
'
;
import
{
isObject
}
from
'
vs/base/common/types
'
;
import
{
IJSONSchema
,
IJSONSchemaSnippet
}
from
'
vs/base/common/jsonSchema
'
;
...
...
@@ -171,7 +170,7 @@ export class Debugger implements IDebugger {
// fix formatting
const
editorConfig
=
this
.
configurationService
.
getValue
<
any
>
();
if
(
editorConfig
.
editor
&&
editorConfig
.
editor
.
insertSpaces
)
{
content
=
content
.
replace
(
new
RegExp
(
'
\t
'
,
'
g
'
),
strings
.
repeat
(
'
'
,
editorConfig
.
editor
.
tabSize
));
content
=
content
.
replace
(
new
RegExp
(
'
\t
'
,
'
g
'
),
'
'
.
repeat
(
editorConfig
.
editor
.
tabSize
));
}
return
Promise
.
resolve
(
content
);
...
...
src/vs/workbench/contrib/debug/common/replModel.ts
浏览文件 @
c2da7508
...
...
@@ -10,7 +10,6 @@ import { ExpressionContainer } from 'vs/workbench/contrib/debug/common/debugMode
import
{
isString
,
isUndefinedOrNull
,
isObject
}
from
'
vs/base/common/types
'
;
import
{
basenameOrAuthority
}
from
'
vs/base/common/resources
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
endsWith
}
from
'
vs/base/common/strings
'
;
import
{
generateUuid
}
from
'
vs/base/common/uuid
'
;
import
{
Emitter
}
from
'
vs/base/common/event
'
;
...
...
@@ -203,7 +202,7 @@ export class ReplModel {
if
(
typeof
data
===
'
string
'
)
{
const
previousElement
=
this
.
replElements
.
length
?
this
.
replElements
[
this
.
replElements
.
length
-
1
]
:
undefined
;
if
(
previousElement
instanceof
SimpleReplElement
&&
previousElement
.
severity
===
sev
&&
!
endsWith
(
previousElement
.
value
,
'
\n
'
)
&&
!
endsWith
(
previousElement
.
value
,
'
\r\n
'
))
{
if
(
previousElement
instanceof
SimpleReplElement
&&
previousElement
.
severity
===
sev
&&
!
previousElement
.
value
.
endsWith
(
'
\n
'
)
&&
!
previousElement
.
value
.
endsWith
(
'
\r\n
'
))
{
previousElement
.
value
+=
data
;
this
.
_onDidChangeElements
.
fire
();
}
else
{
...
...
src/vs/workbench/contrib/files/common/explorerModel.ts
浏览文件 @
c2da7508
...
...
@@ -8,7 +8,7 @@ import { isEqual } from 'vs/base/common/extpath';
import
{
posix
}
from
'
vs/base/common/path
'
;
import
{
ResourceMap
}
from
'
vs/base/common/map
'
;
import
{
IFileStat
,
IFileService
,
FileSystemProviderCapabilities
}
from
'
vs/platform/files/common/files
'
;
import
{
rtrim
,
startsWithIgnoreCase
,
startsWith
,
equalsIgnoreCase
}
from
'
vs/base/common/strings
'
;
import
{
rtrim
,
startsWithIgnoreCase
,
equalsIgnoreCase
}
from
'
vs/base/common/strings
'
;
import
{
coalesce
}
from
'
vs/base/common/arrays
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
...
...
@@ -363,7 +363,7 @@ export class ExplorerItem {
// For performance reasons try to do the comparison as fast as possible
const
ignoreCase
=
!
this
.
fileService
.
hasCapability
(
resource
,
FileSystemProviderCapabilities
.
PathCaseSensitive
);
if
(
resource
&&
this
.
resource
.
scheme
===
resource
.
scheme
&&
equalsIgnoreCase
(
this
.
resource
.
authority
,
resource
.
authority
)
&&
(
ignoreCase
?
startsWithIgnoreCase
(
resource
.
path
,
this
.
resource
.
path
)
:
startsWith
(
resource
.
path
,
this
.
resource
.
path
)))
{
(
ignoreCase
?
startsWithIgnoreCase
(
resource
.
path
,
this
.
resource
.
path
)
:
resource
.
path
.
startsWith
(
this
.
resource
.
path
)))
{
return
this
.
findByPath
(
rtrim
(
resource
.
path
,
posix
.
sep
),
this
.
resource
.
path
.
length
,
ignoreCase
);
}
...
...
src/vs/workbench/contrib/remote/browser/explorerViewItems.ts
浏览文件 @
c2da7508
...
...
@@ -11,7 +11,6 @@ import { IContextViewService } from 'vs/platform/contextview/browser/contextView
import
{
IRemoteExplorerService
,
REMOTE_EXPLORER_TYPE_KEY
}
from
'
vs/workbench/services/remote/common/remoteExplorerService
'
;
import
{
ISelectOptionItem
}
from
'
vs/base/browser/ui/selectBox/selectBox
'
;
import
{
IViewDescriptor
}
from
'
vs/workbench/common/views
'
;
import
{
startsWith
}
from
'
vs/base/common/strings
'
;
import
{
isStringArray
}
from
'
vs/base/common/types
'
;
import
{
IWorkbenchEnvironmentService
}
from
'
vs/workbench/services/environment/common/environmentService
'
;
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
...
...
@@ -82,7 +81,7 @@ export class SwitchRemoteViewItem extends SelectActionViewItem {
static
createOptionItems
(
views
:
IViewDescriptor
[],
contextKeyService
:
IContextKeyService
):
IRemoteSelectItem
[]
{
let
options
:
IRemoteSelectItem
[]
=
[];
views
.
forEach
(
view
=>
{
if
(
view
.
group
&&
startsWith
(
view
.
group
,
'
targets
'
)
&&
view
.
remoteAuthority
&&
(
!
view
.
when
||
contextKeyService
.
contextMatchesRules
(
view
.
when
)))
{
if
(
view
.
group
&&
view
.
group
.
startsWith
(
'
targets
'
)
&&
view
.
remoteAuthority
&&
(
!
view
.
when
||
contextKeyService
.
contextMatchesRules
(
view
.
when
)))
{
options
.
push
({
text
:
view
.
name
,
authority
:
isStringArray
(
view
.
remoteAuthority
)
?
view
.
remoteAuthority
:
[
view
.
remoteAuthority
]
});
}
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录