Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
b6db5627
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(gitcode.net)2024年7月9日维护升级公告
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
b6db5627
编写于
11月 16, 2017
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more cleanup (for #38414)
上级
05d1ec3c
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
2 addition
and
97 deletion
+2
-97
src/vs/base/browser/ui/iconLabel/iconLabel.ts
src/vs/base/browser/ui/iconLabel/iconLabel.ts
+0
-5
src/vs/base/common/filters.ts
src/vs/base/common/filters.ts
+1
-10
src/vs/base/common/glob.ts
src/vs/base/common/glob.ts
+0
-5
src/vs/base/common/labels.ts
src/vs/base/common/labels.ts
+0
-8
src/vs/base/common/map.ts
src/vs/base/common/map.ts
+0
-4
src/vs/base/test/common/filters.perf.test.ts
src/vs/base/test/common/filters.perf.test.ts
+0
-2
src/vs/base/test/common/filters.test.ts
src/vs/base/test/common/filters.test.ts
+1
-9
src/vs/base/test/node/glob.test.ts
src/vs/base/test/node/glob.test.ts
+0
-19
src/vs/platform/workspaces/common/workspaces.ts
src/vs/platform/workspaces/common/workspaces.ts
+0
-1
src/vs/platform/workspaces/electron-main/workspacesMainService.ts
...latform/workspaces/electron-main/workspacesMainService.ts
+0
-8
src/vs/platform/workspaces/test/electron-main/workspacesMainService.test.ts
...rkspaces/test/electron-main/workspacesMainService.test.ts
+0
-26
未找到文件。
src/vs/base/browser/ui/iconLabel/iconLabel.ts
浏览文件 @
b6db5627
...
...
@@ -18,11 +18,6 @@ export interface IIconLabelCreationOptions {
supportHighlights
?:
boolean
;
}
export
interface
ILabelBadgeOptions
{
title
:
string
;
className
:
string
;
}
export
interface
IIconLabelOptions
{
title
?:
string
;
extraClasses
?:
string
[];
...
...
src/vs/base/common/filters.ts
浏览文件 @
b6db5627
...
...
@@ -703,13 +703,4 @@ export function nextTypoPermutation(pattern: string, patternPos: number) {
+
pattern
[
patternPos
+
1
]
+
pattern
[
patternPos
]
+
pattern
.
slice
(
patternPos
+
2
);
}
export
function
fuzzyScoreGraceful
(
pattern
:
string
,
word
:
string
):
[
number
,
number
[]]
{
let
ret
=
fuzzyScore
(
pattern
,
word
);
for
(
let
patternPos
=
1
;
patternPos
<
pattern
.
length
-
1
&&
!
ret
;
patternPos
++
)
{
let
pattern2
=
nextTypoPermutation
(
pattern
,
patternPos
);
ret
=
fuzzyScore
(
pattern2
,
word
);
}
return
ret
;
}
}
\ No newline at end of file
src/vs/base/common/glob.ts
浏览文件 @
b6db5627
...
...
@@ -5,7 +5,6 @@
'
use strict
'
;
import
arrays
=
require
(
'
vs/base/common/arrays
'
);
import
objects
=
require
(
'
vs/base/common/objects
'
);
import
strings
=
require
(
'
vs/base/common/strings
'
);
import
paths
=
require
(
'
vs/base/common/paths
'
);
import
{
BoundedMap
}
from
'
vs/base/common/map
'
;
...
...
@@ -25,10 +24,6 @@ export function getEmptyExpression(): IExpression {
return
Object
.
create
(
null
);
}
export
function
mergeExpressions
(...
expressions
:
IExpression
[]):
IExpression
{
return
objects
.
assign
(
getEmptyExpression
(),
...
expressions
.
filter
(
expr
=>
!!
expr
));
}
export
interface
SiblingClause
{
when
:
string
;
}
...
...
src/vs/base/common/labels.ts
浏览文件 @
b6db5627
...
...
@@ -9,14 +9,6 @@ import platform = require('vs/base/common/platform');
import
{
nativeSep
,
normalize
,
isEqualOrParent
,
isEqual
,
basename
,
join
}
from
'
vs/base/common/paths
'
;
import
{
endsWith
,
ltrim
}
from
'
vs/base/common/strings
'
;
export
interface
ILabelProvider
{
/**
* Given an element returns a label for it to display in the UI.
*/
getLabel
(
element
:
any
):
string
;
}
export
interface
IWorkspaceFolderProvider
{
getWorkspaceFolder
(
resource
:
URI
):
{
uri
:
URI
};
getWorkspace
():
{
...
...
src/vs/base/common/map.ts
浏览文件 @
b6db5627
...
...
@@ -7,10 +7,6 @@
import
URI
from
'
vs/base/common/uri
'
;
export
interface
Key
{
toString
():
string
;
}
export
interface
Entry
<
K
,
T
>
{
key
:
K
;
value
:
T
;
...
...
src/vs/base/test/common/filters.perf.test.ts
浏览文件 @
b6db5627
...
...
@@ -39,7 +39,5 @@ perfSuite('Performance - fuzzyMatch', function () {
perfTest
(
'
matchesFuzzy
'
,
filters
.
matchesFuzzy
);
perfTest
(
'
fuzzyContiguousFilter
'
,
filters
.
fuzzyContiguousFilter
);
perfTest
(
'
fuzzyScore
'
,
filters
.
fuzzyScore
);
perfTest
(
'
fuzzyScoreGraceful
'
,
filters
.
fuzzyScoreGraceful
);
});
src/vs/base/test/common/filters.test.ts
浏览文件 @
b6db5627
...
...
@@ -5,7 +5,7 @@
'
use strict
'
;
import
*
as
assert
from
'
assert
'
;
import
{
IFilter
,
or
,
matchesPrefix
,
matchesStrictPrefix
,
matchesCamelCase
,
matchesSubString
,
matchesContiguousSubString
,
matchesWords
,
fuzzyScore
,
nextTypoPermutation
,
fuzzyScoreGraceful
,
IMatch
}
from
'
vs/base/common/filters
'
;
import
{
IFilter
,
or
,
matchesPrefix
,
matchesStrictPrefix
,
matchesCamelCase
,
matchesSubString
,
matchesContiguousSubString
,
matchesWords
,
fuzzyScore
,
nextTypoPermutation
,
IMatch
}
from
'
vs/base/common/filters
'
;
function
filterOk
(
filter
:
IFilter
,
word
:
string
,
wordToMatchAgainst
:
string
,
highlights
?:
{
start
:
number
;
end
:
number
;
}[])
{
let
r
=
filter
(
word
,
wordToMatchAgainst
);
...
...
@@ -438,12 +438,4 @@ suite('Filters', () => {
assertTypos
(
'
abc
'
,
'
acb
'
);
assertTypos
(
'
foboar
'
,
'
fbooar
'
,
'
foobar
'
,
'
fobaor
'
,
'
fobora
'
);
});
test
(
'
fuzzyScoreGraceful
'
,
function
()
{
assertMatches
(
'
tkb
'
,
'
the_black_knight
'
,
'
^the_^black_^knight
'
,
fuzzyScoreGraceful
);
assertMatches
(
'
tkbk
'
,
'
the_black_knight
'
,
'
^the_^blac^k_^knight
'
,
fuzzyScoreGraceful
);
assertMatches
(
'
tkkb
'
,
'
the_black_knight
'
,
undefined
,
fuzzyScoreGraceful
);
assertMatches
(
'
tkb
'
,
'
no_match
'
,
undefined
,
fuzzyScoreGraceful
);
});
});
src/vs/base/test/node/glob.test.ts
浏览文件 @
b6db5627
...
...
@@ -907,25 +907,6 @@ suite('Glob', () => {
return
slashPath
.
replace
(
/
\/
/g
,
path
.
sep
);
}
test
(
'
mergeExpressions
'
,
()
=>
{
// Empty => empty
assert
.
deepEqual
(
glob
.
mergeExpressions
(),
glob
.
getEmptyExpression
());
// Doesn't modify given expressions
const
expr1
=
{
'
a
'
:
true
};
glob
.
mergeExpressions
(
expr1
,
{
'
b
'
:
true
});
assert
.
deepEqual
(
expr1
,
{
'
a
'
:
true
});
// Merges correctly
assert
.
deepEqual
(
glob
.
mergeExpressions
({
'
a
'
:
true
},
{
'
b
'
:
true
}),
{
'
a
'
:
true
,
'
b
'
:
true
});
// Ignores null/undefined portions
assert
.
deepEqual
(
glob
.
mergeExpressions
(
undefined
,
{
'
a
'
:
true
},
null
,
{
'
b
'
:
true
}),
{
'
a
'
:
true
,
'
b
'
:
true
});
// Later expressions take precedence
assert
.
deepEqual
(
glob
.
mergeExpressions
({
'
a
'
:
true
,
'
b
'
:
false
,
'
c
'
:
true
},
{
'
a
'
:
false
,
'
b
'
:
true
}),
{
'
a
'
:
false
,
'
b
'
:
true
,
'
c
'
:
true
});
});
test
(
'
relative pattern - glob star
'
,
function
()
{
if
(
isWindows
)
{
let
p
=
{
base
:
'
C:
\\
DNXConsoleApp
\\
foo
'
,
pattern
:
'
**/*.cs
'
};
...
...
src/vs/platform/workspaces/common/workspaces.ts
浏览文件 @
b6db5627
...
...
@@ -92,7 +92,6 @@ export interface IWorkspacesMainService extends IWorkspacesService {
createWorkspaceSync
(
folders
?:
IWorkspaceFolderCreationData
[]):
IWorkspaceIdentifier
;
resolveWorkspace
(
path
:
string
):
TPromise
<
IResolvedWorkspace
>
;
resolveWorkspaceSync
(
path
:
string
):
IResolvedWorkspace
;
isUntitledWorkspace
(
workspace
:
IWorkspaceIdentifier
):
boolean
;
...
...
src/vs/platform/workspaces/electron-main/workspacesMainService.ts
浏览文件 @
b6db5627
...
...
@@ -57,14 +57,6 @@ export class WorkspacesMainService implements IWorkspacesMainService {
return
this
.
_onUntitledWorkspaceDeleted
.
event
;
}
public
resolveWorkspace
(
path
:
string
):
TPromise
<
IResolvedWorkspace
>
{
if
(
!
this
.
isWorkspacePath
(
path
))
{
return
TPromise
.
as
(
null
);
// does not look like a valid workspace config file
}
return
readFile
(
path
).
then
(
contents
=>
this
.
doResolveWorkspace
(
path
,
contents
.
toString
()));
}
public
resolveWorkspaceSync
(
path
:
string
):
IResolvedWorkspace
{
if
(
!
this
.
isWorkspacePath
(
path
))
{
return
null
;
// does not look like a valid workspace config file
...
...
src/vs/platform/workspaces/test/electron-main/workspacesMainService.test.ts
浏览文件 @
b6db5627
...
...
@@ -186,32 +186,6 @@ suite('WorkspacesMainService', () => {
});
});
test
(
'
resolveWorkspace
'
,
done
=>
{
return
createWorkspace
([
process
.
cwd
(),
os
.
tmpdir
()]).
then
(
workspace
=>
{
return
service
.
resolveWorkspace
(
workspace
.
configPath
).
then
(
ws
=>
{
assert
.
ok
(
ws
);
// make it a valid workspace path
const
newPath
=
path
.
join
(
path
.
dirname
(
workspace
.
configPath
),
`workspace.
${
WORKSPACE_EXTENSION
}
`
);
fs
.
renameSync
(
workspace
.
configPath
,
newPath
);
workspace
.
configPath
=
newPath
;
return
service
.
resolveWorkspace
(
workspace
.
configPath
).
then
(
resolved
=>
{
assert
.
equal
(
2
,
resolved
.
folders
.
length
);
assert
.
equal
(
resolved
.
configPath
,
workspace
.
configPath
);
assert
.
ok
(
resolved
.
id
);
fs
.
writeFileSync
(
workspace
.
configPath
,
JSON
.
stringify
({
something
:
'
something
'
}));
// invalid workspace
return
service
.
resolveWorkspace
(
workspace
.
configPath
).
then
(
resolvedInvalid
=>
{
assert
.
ok
(
!
resolvedInvalid
);
done
();
});
});
});
});
});
test
(
'
resolveWorkspaceSync (support relative paths)
'
,
done
=>
{
return
createWorkspace
([
process
.
cwd
(),
os
.
tmpdir
()]).
then
(
workspace
=>
{
fs
.
writeFileSync
(
workspace
.
configPath
,
JSON
.
stringify
({
folders
:
[{
path
:
'
./ticino-playground/lib
'
}]
}));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录