Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
ae5ecf9e
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,发现更多精彩内容 >>
提交
ae5ecf9e
编写于
10月 16, 2020
作者:
R
Rob Lourens
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove deprecated API usage from search #103454
上级
979f9f73
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
14 addition
and
14 deletion
+14
-14
src/vs/workbench/contrib/search/browser/patternInputWidget.ts
...vs/workbench/contrib/search/browser/patternInputWidget.ts
+1
-1
src/vs/workbench/contrib/search/browser/searchResultsView.ts
src/vs/workbench/contrib/search/browser/searchResultsView.ts
+3
-3
src/vs/workbench/contrib/search/browser/searchView.ts
src/vs/workbench/contrib/search/browser/searchView.ts
+1
-1
src/vs/workbench/contrib/search/browser/searchWidget.ts
src/vs/workbench/contrib/search/browser/searchWidget.ts
+9
-9
未找到文件。
src/vs/workbench/contrib/search/browser/patternInputWidget.ts
浏览文件 @
ae5ecf9e
...
...
@@ -138,7 +138,7 @@ export class PatternInputWidget extends Widget implements IThemable {
private
render
(
options
:
IOptions
):
void
{
this
.
domNode
=
document
.
createElement
(
'
div
'
);
this
.
domNode
.
style
.
width
=
this
.
width
+
'
px
'
;
dom
.
addClass
(
this
.
domNode
,
'
monaco-findInput
'
);
this
.
domNode
.
classList
.
add
(
'
monaco-findInput
'
);
this
.
inputBox
=
new
ContextScopedHistoryInputBox
(
this
.
domNode
,
this
.
contextViewProvider
,
{
placeholder
:
this
.
placeholder
||
''
,
...
...
src/vs/workbench/contrib/search/browser/searchResultsView.ts
浏览文件 @
ae5ecf9e
...
...
@@ -225,7 +225,7 @@ export class MatchRenderer extends Disposable implements ITreeRenderer<Match, vo
}
renderTemplate
(
container
:
HTMLElement
):
IMatchTemplate
{
DOM
.
addClass
(
container
,
'
linematch
'
);
container
.
classList
.
add
(
'
linematch
'
);
const
parent
=
DOM
.
append
(
container
,
DOM
.
$
(
'
a.plain.match
'
));
const
before
=
DOM
.
append
(
parent
,
DOM
.
$
(
'
span
'
));
...
...
@@ -254,7 +254,7 @@ export class MatchRenderer extends Disposable implements ITreeRenderer<Match, vo
templateData
.
before
.
textContent
=
preview
.
before
;
templateData
.
match
.
textContent
=
preview
.
inside
;
DOM
.
toggleClass
(
templateData
.
match
,
'
replace
'
,
replace
);
templateData
.
match
.
classList
.
toggle
(
'
replace
'
,
replace
);
templateData
.
replace
.
textContent
=
replace
?
match
.
replaceString
:
''
;
templateData
.
after
.
textContent
=
preview
.
after
;
templateData
.
parent
.
title
=
(
preview
.
before
+
(
replace
?
match
.
replaceString
:
preview
.
inside
)
+
preview
.
after
).
trim
().
substr
(
0
,
999
);
...
...
@@ -264,7 +264,7 @@ export class MatchRenderer extends Disposable implements ITreeRenderer<Match, vo
const
showLineNumbers
=
this
.
configurationService
.
getValue
<
ISearchConfigurationProperties
>
(
'
search
'
).
showLineNumbers
;
const
lineNumberStr
=
showLineNumbers
?
`:
${
match
.
range
().
startLineNumber
}
`
:
''
;
DOM
.
toggleClass
(
templateData
.
lineNumber
,
'
show
'
,
(
numLines
>
0
)
||
showLineNumbers
);
templateData
.
lineNumber
.
classList
.
toggle
(
'
show
'
,
(
numLines
>
0
)
||
showLineNumbers
);
templateData
.
lineNumber
.
textContent
=
lineNumberStr
+
extraLinesStr
;
templateData
.
lineNumber
.
setAttribute
(
'
title
'
,
this
.
getMatchTitle
(
match
,
showLineNumbers
));
...
...
src/vs/workbench/contrib/search/browser/searchView.ts
浏览文件 @
ae5ecf9e
...
...
@@ -988,7 +988,7 @@ export class SearchView extends ViewPane {
}
const
actionsPosition
=
this
.
searchConfig
.
actionsPosition
;
dom
.
toggleClass
(
this
.
getContainer
(),
SearchView
.
ACTIONS_RIGHT_CLASS_NAME
,
actionsPosition
===
'
right
'
);
this
.
getContainer
().
classList
.
toggle
(
SearchView
.
ACTIONS_RIGHT_CLASS_NAME
,
actionsPosition
===
'
right
'
);
this
.
searchWidget
.
setWidth
(
this
.
size
.
width
-
28
/* container margin */
);
...
...
src/vs/workbench/contrib/search/browser/searchWidget.ts
浏览文件 @
ae5ecf9e
...
...
@@ -293,7 +293,7 @@ export class SearchWidget extends Widget {
};
this
.
toggleReplaceButton
=
this
.
_register
(
new
Button
(
parent
,
opts
));
this
.
toggleReplaceButton
.
element
.
setAttribute
(
'
aria-expanded
'
,
'
false
'
);
dom
.
addClasses
(
this
.
toggleReplaceButton
.
element
,
searchHideReplaceIcon
.
classNames
);
this
.
toggleReplaceButton
.
element
.
classList
.
add
(...
searchHideReplaceIcon
.
classNamesArray
);
this
.
toggleReplaceButton
.
icon
=
'
toggle-replace-button
'
;
// TODO@joh need to dispose this listener eventually
this
.
toggleReplaceButton
.
onDidClick
(()
=>
this
.
onToggleReplaceButton
());
...
...
@@ -356,7 +356,7 @@ export class SearchWidget extends Widget {
if
(
options
.
showContextToggle
)
{
this
.
contextLinesInput
=
new
InputBox
(
searchInputContainer
,
this
.
contextViewService
,
{
type
:
'
number
'
});
dom
.
addClass
(
this
.
contextLinesInput
.
element
,
'
context-lines-input
'
);
this
.
contextLinesInput
.
element
.
classList
.
add
(
'
context-lines-input
'
);
this
.
contextLinesInput
.
value
=
''
+
(
this
.
configurationService
.
getValue
<
ISearchConfigurationProperties
>
(
'
search
'
).
searchEditor
.
defaultNumberOfContextLines
??
1
);
this
.
_register
(
this
.
contextLinesInput
.
onDidChange
(()
=>
this
.
onContextLinesChanged
()));
this
.
_register
(
attachInputBoxStyler
(
this
.
contextLinesInput
,
this
.
themeService
));
...
...
@@ -365,7 +365,7 @@ export class SearchWidget extends Widget {
}
private
onContextLinesChanged
()
{
dom
.
toggleClass
(
this
.
domNode
,
'
show-context
'
,
this
.
showContextCheckbox
.
checked
);
this
.
domNode
.
classList
.
toggle
(
'
show-context
'
,
this
.
showContextCheckbox
.
checked
);
this
.
_onDidToggleContext
.
fire
();
if
(
this
.
contextLinesInput
.
value
.
includes
(
'
-
'
))
{
...
...
@@ -383,7 +383,7 @@ export class SearchWidget extends Widget {
this
.
showContextCheckbox
.
checked
=
true
;
this
.
contextLinesInput
.
value
=
''
+
lines
;
}
dom
.
toggleClass
(
this
.
domNode
,
'
show-context
'
,
this
.
showContextCheckbox
.
checked
);
this
.
domNode
.
classList
.
toggle
(
'
show-context
'
,
this
.
showContextCheckbox
.
checked
);
}
private
renderReplaceInput
(
parent
:
HTMLElement
,
options
:
ISearchWidgetOptions
):
void
{
...
...
@@ -429,13 +429,13 @@ export class SearchWidget extends Widget {
}
private
onToggleReplaceButton
():
void
{
dom
.
toggleClass
(
this
.
replaceContainer
,
'
disabled
'
);
this
.
replaceContainer
.
classList
.
toggle
(
'
disabled
'
);
if
(
this
.
isReplaceShown
())
{
dom
.
removeClasses
(
this
.
toggleReplaceButton
.
element
,
searchHideReplaceIcon
.
classNames
);
dom
.
addClasses
(
this
.
toggleReplaceButton
.
element
,
searchShowReplaceIcon
.
classNames
);
this
.
toggleReplaceButton
.
element
.
classList
.
remove
(...
searchHideReplaceIcon
.
classNamesArray
);
this
.
toggleReplaceButton
.
element
.
classList
.
add
(...
searchShowReplaceIcon
.
classNamesArray
);
}
else
{
dom
.
removeClasses
(
this
.
toggleReplaceButton
.
element
,
searchShowReplaceIcon
.
classNames
);
dom
.
addClasses
(
this
.
toggleReplaceButton
.
element
,
searchHideReplaceIcon
.
classNames
);
this
.
toggleReplaceButton
.
element
.
classList
.
remove
(...
searchShowReplaceIcon
.
classNamesArray
);
this
.
toggleReplaceButton
.
element
.
classList
.
add
(...
searchHideReplaceIcon
.
classNamesArray
);
}
this
.
toggleReplaceButton
.
element
.
setAttribute
(
'
aria-expanded
'
,
this
.
isReplaceShown
()
?
'
true
'
:
'
false
'
);
this
.
updateReplaceActiveState
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录