Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
1b681fd9
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,发现更多精彩内容 >>
提交
1b681fd9
编写于
3月 06, 2019
作者:
M
Martin Aeschlimann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
showItemInFolder with URI
上级
4159cb41
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
19 addition
and
15 deletion
+19
-15
src/vs/platform/windows/common/windows.ts
src/vs/platform/windows/common/windows.ts
+1
-1
src/vs/platform/windows/electron-main/windowsService.ts
src/vs/platform/windows/electron-main/windowsService.ts
+4
-2
src/vs/platform/windows/node/windowsIpc.ts
src/vs/platform/windows/node/windowsIpc.ts
+2
-2
src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
+1
-1
src/vs/workbench/contrib/extensions/electron-browser/extensionsActions.ts
.../contrib/extensions/electron-browser/extensionsActions.ts
+3
-3
src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.ts
...rkbench/contrib/files/browser/editors/binaryFileEditor.ts
+1
-1
src/vs/workbench/contrib/files/browser/fileCommands.ts
src/vs/workbench/contrib/files/browser/fileCommands.ts
+2
-2
src/vs/workbench/contrib/logs/common/logsActions.ts
src/vs/workbench/contrib/logs/common/logsActions.ts
+2
-1
src/vs/workbench/contrib/performance/electron-browser/startupProfiler.ts
...h/contrib/performance/electron-browser/startupProfiler.ts
+2
-1
src/vs/workbench/test/workbenchTestServices.ts
src/vs/workbench/test/workbenchTestServices.ts
+1
-1
未找到文件。
src/vs/platform/windows/common/windows.ts
浏览文件 @
1b681fd9
...
...
@@ -155,7 +155,7 @@ export interface IWindowsService {
getWindows
():
Promise
<
{
id
:
number
;
workspace
?:
IWorkspaceIdentifier
;
folderUri
?:
ISingleFolderWorkspaceIdentifier
;
title
:
string
;
filename
?:
string
;
}[]
>
;
getWindowCount
():
Promise
<
number
>
;
log
(
severity
:
string
,
...
messages
:
string
[]):
Promise
<
void
>
;
showItemInFolder
(
path
:
string
):
Promise
<
void
>
;
showItemInFolder
(
path
:
URI
):
Promise
<
void
>
;
getActiveWindowId
():
Promise
<
number
|
undefined
>
;
// This needs to be handled from browser process to prevent
...
...
src/vs/platform/windows/electron-main/windowsService.ts
浏览文件 @
1b681fd9
...
...
@@ -324,10 +324,12 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
console
[
severity
].
apply
(
console
,
...
messages
);
}
async
showItemInFolder
(
path
:
string
):
Promise
<
void
>
{
async
showItemInFolder
(
path
:
URI
):
Promise
<
void
>
{
this
.
logService
.
trace
(
'
windowsService#showItemInFolder
'
);
shell
.
showItemInFolder
(
path
);
if
(
path
.
scheme
===
Schemas
.
file
)
{
shell
.
showItemInFolder
(
path
.
fsPath
);
}
}
async
getActiveWindowId
():
Promise
<
number
|
undefined
>
{
...
...
src/vs/platform/windows/node/windowsIpc.ts
浏览文件 @
1b681fd9
...
...
@@ -95,7 +95,7 @@ export class WindowsChannel implements IServerChannel {
case
'
toggleSharedProcess
'
:
return
this
.
service
.
toggleSharedProcess
();
case
'
quit
'
:
return
this
.
service
.
quit
();
case
'
log
'
:
return
this
.
service
.
log
(
arg
[
0
],
arg
[
1
]);
case
'
showItemInFolder
'
:
return
this
.
service
.
showItemInFolder
(
arg
);
case
'
showItemInFolder
'
:
return
this
.
service
.
showItemInFolder
(
URI
.
revive
(
arg
)
);
case
'
getActiveWindowId
'
:
return
this
.
service
.
getActiveWindowId
();
case
'
openExternal
'
:
return
this
.
service
.
openExternal
(
arg
);
case
'
startCrashReporter
'
:
return
this
.
service
.
startCrashReporter
(
arg
);
...
...
@@ -309,7 +309,7 @@ export class WindowsChannelClient implements IWindowsService {
return
this
.
channel
.
call
(
'
log
'
,
[
severity
,
messages
]);
}
showItemInFolder
(
path
:
string
):
Promise
<
void
>
{
showItemInFolder
(
path
:
URI
):
Promise
<
void
>
{
return
this
.
channel
.
call
(
'
showItemInFolder
'
,
path
);
}
...
...
src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
浏览文件 @
1b681fd9
...
...
@@ -617,7 +617,7 @@ class ShowItemInFolderAction extends Action {
}
run
():
Promise
<
void
>
{
return
this
.
windowsService
.
showItemInFolder
(
this
.
path
);
return
this
.
windowsService
.
showItemInFolder
(
URI
.
file
(
this
.
path
)
);
}
}
...
...
src/vs/workbench/contrib/extensions/electron-browser/extensionsActions.ts
浏览文件 @
1b681fd9
...
...
@@ -2529,11 +2529,11 @@ export class OpenExtensionsFolderAction extends Action {
const
extensionsHome
=
URI
.
file
(
this
.
environmentService
.
extensionsPath
);
return
Promise
.
resolve
(
this
.
fileService
.
resolveFile
(
extensionsHome
)).
then
(
file
=>
{
let
itemToShow
:
string
;
let
itemToShow
:
URI
;
if
(
file
.
children
&&
file
.
children
.
length
>
0
)
{
itemToShow
=
file
.
children
[
0
].
resource
.
fsPath
;
itemToShow
=
file
.
children
[
0
].
resource
;
}
else
{
itemToShow
=
extensionsHome
.
fsPath
;
itemToShow
=
extensionsHome
;
}
return
this
.
windowsService
.
showItemInFolder
(
itemToShow
);
...
...
src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.ts
浏览文件 @
1b681fd9
...
...
@@ -57,7 +57,7 @@ export class BinaryFileEditor extends BaseBinaryResourceEditor {
private
openExternal
(
resource
:
URI
):
void
{
this
.
windowsService
.
openExternal
(
resource
.
toString
()).
then
(
didOpen
=>
{
if
(
!
didOpen
)
{
return
this
.
windowsService
.
showItemInFolder
(
resource
.
fsPath
);
return
this
.
windowsService
.
showItemInFolder
(
resource
);
}
return
undefined
;
...
...
src/vs/workbench/contrib/files/browser/fileCommands.ts
浏览文件 @
1b681fd9
...
...
@@ -357,9 +357,9 @@ CommandsRegistry.registerCommand({
function
revealResourcesInOS
(
resources
:
URI
[],
windowsService
:
IWindowsService
,
notificationService
:
INotificationService
,
workspaceContextService
:
IWorkspaceContextService
):
void
{
if
(
resources
.
length
)
{
sequence
(
resources
.
map
(
r
=>
()
=>
windowsService
.
showItemInFolder
(
r
.
fsPath
)));
sequence
(
resources
.
map
(
r
=>
()
=>
windowsService
.
showItemInFolder
(
r
)));
}
else
if
(
workspaceContextService
.
getWorkspace
().
folders
.
length
)
{
windowsService
.
showItemInFolder
(
workspaceContextService
.
getWorkspace
().
folders
[
0
].
uri
.
fsPath
);
windowsService
.
showItemInFolder
(
workspaceContextService
.
getWorkspace
().
folders
[
0
].
uri
);
}
else
{
notificationService
.
info
(
nls
.
localize
(
'
openFileToReveal
'
,
"
Open a file first to reveal
"
));
}
...
...
src/vs/workbench/contrib/logs/common/logsActions.ts
浏览文件 @
1b681fd9
...
...
@@ -10,6 +10,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment'
import
{
IWindowsService
}
from
'
vs/platform/windows/common/windows
'
;
import
{
ILogService
,
LogLevel
,
DEFAULT_LOG_LEVEL
}
from
'
vs/platform/log/common/log
'
;
import
{
IQuickInputService
}
from
'
vs/platform/quickinput/common/quickInput
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
export
class
OpenLogsFolderAction
extends
Action
{
...
...
@@ -24,7 +25,7 @@ export class OpenLogsFolderAction extends Action {
}
run
():
Promise
<
void
>
{
return
this
.
windowsService
.
showItemInFolder
(
join
(
this
.
environmentService
.
logsPath
,
'
main.log
'
));
return
this
.
windowsService
.
showItemInFolder
(
URI
.
file
(
join
(
this
.
environmentService
.
logsPath
,
'
main.log
'
)
));
}
}
...
...
src/vs/workbench/contrib/performance/electron-browser/startupProfiler.ts
浏览文件 @
1b681fd9
...
...
@@ -16,6 +16,7 @@ import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
import
{
PerfviewInput
}
from
'
vs/workbench/contrib/performance/electron-browser/perfviewEditor
'
;
import
{
IExtensionService
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
import
{
IClipboardService
}
from
'
vs/platform/clipboard/common/clipboardService
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
export
class
StartupProfiler
implements
IWorkbenchContribution
{
...
...
@@ -78,7 +79,7 @@ export class StartupProfiler implements IWorkbenchContribution {
}).
then
(
res
=>
{
if
(
res
.
confirmed
)
{
Promise
.
all
<
any
>
([
this
.
_windowsService
.
showItemInFolder
(
join
(
dir
,
files
[
0
]
)),
this
.
_windowsService
.
showItemInFolder
(
URI
.
file
(
join
(
dir
,
files
[
0
])
)),
this
.
_createPerfIssue
(
files
)
]).
then
(()
=>
{
// keep window stable until restart is selected
...
...
src/vs/workbench/test/workbenchTestServices.ts
浏览文件 @
1b681fd9
...
...
@@ -1332,7 +1332,7 @@ export class TestWindowsService implements IWindowsService {
return
Promise
.
resolve
();
}
showItemInFolder
(
_path
:
string
):
Promise
<
void
>
{
showItemInFolder
(
_path
:
URI
):
Promise
<
void
>
{
return
Promise
.
resolve
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录