Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
261fa9f9
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
Vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
261fa9f9
编写于
4月 12, 2019
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix #71992
上级
39012b24
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
27 addition
and
24 deletion
+27
-24
src/vs/base/common/uri.ts
src/vs/base/common/uri.ts
+4
-2
src/vs/base/test/common/uri.test.ts
src/vs/base/test/common/uri.test.ts
+2
-2
src/vs/monaco.d.ts
src/vs/monaco.d.ts
+2
-1
src/vs/platform/extensionManagement/node/extensionManagementIpc.ts
...atform/extensionManagement/node/extensionManagementIpc.ts
+2
-2
src/vs/platform/history/electron-main/historyStorage.ts
src/vs/platform/history/electron-main/historyStorage.ts
+1
-1
src/vs/workbench/api/browser/mainThreadDecorations.ts
src/vs/workbench/api/browser/mainThreadDecorations.ts
+1
-1
src/vs/workbench/api/browser/mainThreadSearch.ts
src/vs/workbench/api/browser/mainThreadSearch.ts
+1
-1
src/vs/workbench/api/common/extHostDialogs.ts
src/vs/workbench/api/common/extHostDialogs.ts
+1
-1
src/vs/workbench/api/common/extHostTypeConverters.ts
src/vs/workbench/api/common/extHostTypeConverters.ts
+2
-2
src/vs/workbench/api/common/extHostWorkspace.ts
src/vs/workbench/api/common/extHostWorkspace.ts
+1
-1
src/vs/workbench/api/electron-browser/mainThreadWebview.ts
src/vs/workbench/api/electron-browser/mainThreadWebview.ts
+1
-1
src/vs/workbench/browser/parts/editor/editor.contribution.ts
src/vs/workbench/browser/parts/editor/editor.contribution.ts
+3
-3
src/vs/workbench/contrib/files/browser/files.contribution.ts
src/vs/workbench/contrib/files/browser/files.contribution.ts
+2
-2
src/vs/workbench/electron-browser/window.ts
src/vs/workbench/electron-browser/window.ts
+1
-1
src/vs/workbench/services/history/browser/history.ts
src/vs/workbench/services/history/browser/history.ts
+3
-3
未找到文件。
src/vs/base/common/uri.ts
浏览文件 @
261fa9f9
...
...
@@ -373,9 +373,11 @@ export class URI implements UriComponents {
return
this
;
}
static
revive
(
data
:
UriComponents
|
any
):
URI
{
static
revive
(
data
:
UriComponents
|
URI
):
URI
;
static
revive
(
data
:
UriComponents
|
URI
|
undefined
|
null
):
URI
|
undefined
;
static
revive
(
data
:
UriComponents
|
URI
|
undefined
|
null
):
URI
|
undefined
{
if
(
!
data
)
{
return
data
;
return
undefined
;
}
else
if
(
data
instanceof
URI
)
{
return
data
;
}
else
{
...
...
src/vs/base/test/common/uri.test.ts
浏览文件 @
261fa9f9
...
...
@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
*
as
assert
from
'
assert
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
URI
,
UriComponents
}
from
'
vs/base/common/uri
'
;
import
{
isWindows
}
from
'
vs/base/common/platform
'
;
...
...
@@ -441,7 +441,7 @@ suite('URI', () => {
// let c = 100000;
// while (c-- > 0) {
for
(
let
value
of
values
)
{
let
data
=
value
.
toJSON
();
let
data
=
value
.
toJSON
()
as
UriComponents
;
let
clone
=
URI
.
revive
(
data
);
assert
.
equal
(
clone
.
scheme
,
value
.
scheme
);
...
...
src/vs/monaco.d.ts
浏览文件 @
261fa9f9
...
...
@@ -172,7 +172,8 @@ declare namespace monaco {
*/
toString
(
skipEncoding
?:
boolean
):
string
;
toJSON
():
object
;
static
revive
(
data
:
UriComponents
|
any
):
Uri
;
static
revive
(
data
:
UriComponents
|
Uri
):
Uri
;
static
revive
(
data
:
UriComponents
|
Uri
|
undefined
|
null
):
Uri
|
undefined
;
}
export
interface
UriComponents
{
...
...
src/vs/platform/extensionManagement/node/extensionManagementIpc.ts
浏览文件 @
261fa9f9
...
...
@@ -86,7 +86,7 @@ export class ExtensionManagementChannelClient implements IExtensionManagementSer
get
onDidUninstallExtension
():
Event
<
DidUninstallExtensionEvent
>
{
return
this
.
channel
.
listen
(
'
onDidUninstallExtension
'
);
}
zip
(
extension
:
ILocalExtension
):
Promise
<
URI
>
{
return
Promise
.
resolve
(
this
.
channel
.
call
(
'
zip
'
,
[
extension
]).
then
(
result
=>
URI
.
revive
(
result
)));
return
Promise
.
resolve
(
this
.
channel
.
call
(
'
zip
'
,
[
extension
]).
then
(
result
=>
URI
.
revive
(
<
UriComponents
>
result
)));
}
unzip
(
zipLocation
:
URI
,
type
:
ExtensionType
):
Promise
<
IExtensionIdentifier
>
{
...
...
@@ -122,4 +122,4 @@ export class ExtensionManagementChannelClient implements IExtensionManagementSer
getExtensionsReport
():
Promise
<
IReportedExtension
[]
>
{
return
Promise
.
resolve
(
this
.
channel
.
call
(
'
getExtensionsReport
'
));
}
}
\ No newline at end of file
}
src/vs/platform/history/electron-main/historyStorage.ts
浏览文件 @
261fa9f9
...
...
@@ -55,7 +55,7 @@ export function restoreRecentlyOpened(data: RecentlyOpenedStorageData | undefine
result
.
workspaces
.
push
({
workspace
:
{
id
:
workspace
[
'
id
'
],
configPath
:
URI
.
file
(
workspace
[
'
configPath
'
])
}
});
}
else
if
(
workspace
&&
typeof
workspace
[
'
path
'
]
===
'
string
'
&&
typeof
workspace
[
'
scheme
'
]
===
'
string
'
)
{
// added by 1.26-insiders
result
.
workspaces
.
push
({
folderUri
:
URI
.
revive
(
workspace
)
});
result
.
workspaces
.
push
({
folderUri
:
URI
.
revive
(
<
UriComponents
>
workspace
)
});
}
}
}
...
...
src/vs/workbench/api/browser/mainThreadDecorations.ts
浏览文件 @
261fa9f9
...
...
@@ -112,7 +112,7 @@ export class MainThreadDecorations implements MainThreadDecorationsShape {
const
provider
=
this
.
_provider
.
get
(
handle
);
if
(
provider
)
{
const
[
emitter
]
=
provider
;
emitter
.
fire
(
resources
&&
resources
.
map
(
URI
.
revive
));
emitter
.
fire
(
resources
&&
resources
.
map
(
r
=>
URI
.
revive
(
r
)
));
}
}
...
...
src/vs/workbench/api/browser/mainThreadSearch.ts
浏览文件 @
261fa9f9
...
...
@@ -162,7 +162,7 @@ class RemoteSearchProvider implements ISearchResultProvider, IDisposable {
});
}
else
{
searchOp
.
addMatch
({
resource
:
URI
.
revive
(
result
)
resource
:
URI
.
revive
(
<
UriComponents
>
result
)
});
}
});
...
...
src/vs/workbench/api/common/extHostDialogs.ts
浏览文件 @
261fa9f9
...
...
@@ -17,7 +17,7 @@ export class ExtHostDialogs {
showOpenDialog
(
options
:
vscode
.
OpenDialogOptions
):
Promise
<
URI
[]
|
undefined
>
{
return
this
.
_proxy
.
$showOpenDialog
(
options
).
then
(
filepaths
=>
{
return
filepaths
?
filepaths
.
map
(
URI
.
revive
)
:
undefined
;
return
filepaths
?
filepaths
.
map
(
p
=>
URI
.
revive
(
p
)
)
:
undefined
;
});
}
...
...
src/vs/workbench/api/common/extHostTypeConverters.ts
浏览文件 @
261fa9f9
...
...
@@ -478,8 +478,8 @@ export namespace WorkspaceEdit {
);
}
else
{
result
.
renameFile
(
URI
.
revive
((
<
ResourceFileEditDto
>
edit
).
oldUri
),
URI
.
revive
((
<
ResourceFileEditDto
>
edit
).
newUri
),
URI
.
revive
((
<
ResourceFileEditDto
>
edit
).
oldUri
!
),
URI
.
revive
((
<
ResourceFileEditDto
>
edit
).
newUri
!
),
(
<
ResourceFileEditDto
>
edit
).
options
);
}
...
...
src/vs/workbench/api/common/extHostWorkspace.ts
浏览文件 @
261fa9f9
...
...
@@ -420,7 +420,7 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape, IExtHostWorkspac
}
return
this
.
_proxy
.
$startFileSearch
(
includePattern
,
includeFolder
,
excludePatternOrDisregardExcludes
,
maxResults
,
token
)
.
then
(
data
=>
Array
.
isArray
(
data
)
?
data
.
map
(
URI
.
revive
)
:
[]);
.
then
(
data
=>
Array
.
isArray
(
data
)
?
data
.
map
(
d
=>
URI
.
revive
(
d
)
)
:
[]);
}
findTextInFiles
(
query
:
vscode
.
TextSearchQuery
,
options
:
vscode
.
FindTextInFilesOptions
,
callback
:
(
result
:
vscode
.
TextSearchResult
)
=>
void
,
extensionId
:
ExtensionIdentifier
,
token
:
vscode
.
CancellationToken
=
CancellationToken
.
None
):
Promise
<
vscode
.
TextSearchComplete
|
undefined
>
{
...
...
src/vs/workbench/api/electron-browser/mainThreadWebview.ts
浏览文件 @
261fa9f9
...
...
@@ -414,7 +414,7 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews
function
reviveWebviewOptions
(
options
:
WebviewInputOptions
):
WebviewInputOptions
{
return
{
...
options
,
localResourceRoots
:
Array
.
isArray
(
options
.
localResourceRoots
)
?
options
.
localResourceRoots
.
map
(
URI
.
revive
)
:
undefined
,
localResourceRoots
:
Array
.
isArray
(
options
.
localResourceRoots
)
?
options
.
localResourceRoots
.
map
(
r
=>
URI
.
revive
(
r
)
)
:
undefined
,
};
}
...
...
src/vs/workbench/browser/parts/editor/editor.contribution.ts
浏览文件 @
261fa9f9
...
...
@@ -5,7 +5,7 @@
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
*
as
nls
from
'
vs/nls
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
URI
,
UriComponents
}
from
'
vs/base/common/uri
'
;
import
{
Action
,
IAction
}
from
'
vs/base/common/actions
'
;
import
{
IEditorQuickOpenEntry
,
IQuickOpenRegistry
,
Extensions
as
QuickOpenExtensions
,
QuickOpenHandlerDescriptor
}
from
'
vs/workbench/browser/quickopen
'
;
import
{
StatusbarItemDescriptor
,
IStatusbarRegistry
,
Extensions
as
StatusExtensions
}
from
'
vs/workbench/browser/parts/statusbar/statusbar
'
;
...
...
@@ -142,7 +142,7 @@ class UntitledEditorInputFactory implements IEditorInputFactory {
deserialize
(
instantiationService
:
IInstantiationService
,
serializedEditorInput
:
string
):
UntitledEditorInput
{
return
instantiationService
.
invokeFunction
<
UntitledEditorInput
>
(
accessor
=>
{
const
deserialized
:
ISerializedUntitledEditorInput
=
JSON
.
parse
(
serializedEditorInput
);
const
resource
=
!!
deserialized
.
resourceJSON
?
URI
.
revive
(
deserialized
.
resourceJSON
)
:
URI
.
parse
(
deserialized
.
resource
);
const
resource
=
!!
deserialized
.
resourceJSON
?
URI
.
revive
(
<
UriComponents
>
deserialized
.
resourceJSON
)
:
URI
.
parse
(
deserialized
.
resource
);
const
filePath
=
resource
.
scheme
===
Schemas
.
untitled
?
undefined
:
resource
.
scheme
===
Schemas
.
file
?
resource
.
fsPath
:
resource
.
path
;
const
language
=
deserialized
.
modeId
;
const
encoding
=
deserialized
.
encoding
;
...
...
@@ -925,4 +925,4 @@ MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
title
:
nls
.
localize
({
key
:
'
miSwitchGroup
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Switch &&Group
"
),
submenu
:
MenuId
.
MenubarSwitchGroupMenu
,
order
:
2
});
\ No newline at end of file
});
src/vs/workbench/contrib/files/browser/files.contribution.ts
浏览文件 @
261fa9f9
...
...
@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
URI
,
UriComponents
}
from
'
vs/base/common/uri
'
;
import
{
ViewletRegistry
,
Extensions
as
ViewletExtensions
,
ViewletDescriptor
,
ShowViewletAction
}
from
'
vs/workbench/browser/viewlet
'
;
import
*
as
nls
from
'
vs/nls
'
;
import
{
sep
}
from
'
vs/base/common/path
'
;
...
...
@@ -157,7 +157,7 @@ class FileEditorInputFactory implements IEditorInputFactory {
public
deserialize
(
instantiationService
:
IInstantiationService
,
serializedEditorInput
:
string
):
FileEditorInput
{
return
instantiationService
.
invokeFunction
<
FileEditorInput
>
(
accessor
=>
{
const
fileInput
:
ISerializedFileInput
=
JSON
.
parse
(
serializedEditorInput
);
const
resource
=
!!
fileInput
.
resourceJSON
?
URI
.
revive
(
fileInput
.
resourceJSON
)
:
URI
.
parse
(
fileInput
.
resource
);
const
resource
=
!!
fileInput
.
resourceJSON
?
URI
.
revive
(
<
UriComponents
>
fileInput
.
resourceJSON
)
:
URI
.
parse
(
fileInput
.
resource
);
const
encoding
=
fileInput
.
encoding
;
return
accessor
.
get
(
IEditorService
).
createInput
({
resource
,
encoding
,
forceFile
:
true
})
as
FileEditorInput
;
...
...
src/vs/workbench/electron-browser/window.ts
浏览文件 @
261fa9f9
...
...
@@ -526,7 +526,7 @@ export class ElectronWindow extends Disposable {
const
resource
=
URI
.
revive
(
p
.
fileUri
);
let
input
:
IResourceInput
|
IUntitledResourceInput
;
if
(
isNew
)
{
input
=
{
filePath
:
resource
.
fsPath
,
options
:
{
pinned
:
true
}
};
input
=
{
filePath
:
resource
!
.
fsPath
,
options
:
{
pinned
:
true
}
};
}
else
{
input
=
{
resource
,
options
:
{
pinned
:
true
}
};
}
...
...
src/vs/workbench/services/history/browser/history.ts
浏览文件 @
261fa9f9
...
...
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import
{
onUnexpectedError
}
from
'
vs/base/common/errors
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
URI
,
UriComponents
}
from
'
vs/base/common/uri
'
;
import
{
IEditor
}
from
'
vs/editor/common/editorCommon
'
;
import
{
ITextEditorOptions
,
IResourceInput
,
ITextEditorSelection
}
from
'
vs/platform/editor/common/editor
'
;
import
{
IEditorInput
,
IEditor
as
IBaseEditor
,
Extensions
as
EditorExtensions
,
EditorInput
,
IEditorCloseEvent
,
IEditorInputFactoryRegistry
,
toResource
,
Extensions
as
EditorInputExtensions
,
IFileInputFactory
,
IEditorIdentifier
}
from
'
vs/workbench/common/editor
'
;
...
...
@@ -888,7 +888,7 @@ export class HistoryService extends Disposable implements IHistoryService {
// File resource: via URI.revive()
if
(
serializedEditorHistoryEntry
.
resourceJSON
)
{
return
{
resource
:
URI
.
revive
(
serializedEditorHistoryEntry
.
resourceJSON
)
};
return
{
resource
:
URI
.
revive
(
<
UriComponents
>
serializedEditorHistoryEntry
.
resourceJSON
)
};
}
// Editor input: via factory
...
...
@@ -974,4 +974,4 @@ export class HistoryService extends Disposable implements IHistoryService {
}
}
registerSingleton
(
IHistoryService
,
HistoryService
);
\ No newline at end of file
registerSingleton
(
IHistoryService
,
HistoryService
);
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录