Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
36883965
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
36883965
编写于
8月 07, 2018
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debt - use getPathFromAmdModule instead of 'URI.parse(require.toUrl(xxx)).fsPath'
上级
e9ed5e19
变更
23
显示空白变更内容
内联
并排
Showing
23 changed file
with
56 addition
and
51 deletion
+56
-51
src/vs/base/node/paths.ts
src/vs/base/node/paths.ts
+3
-3
src/vs/base/node/processes.ts
src/vs/base/node/processes.ts
+2
-2
src/vs/base/node/ps.ts
src/vs/base/node/ps.ts
+3
-2
src/vs/base/node/stdFork.ts
src/vs/base/node/stdFork.ts
+2
-2
src/vs/base/parts/ipc/test/node/ipc.perf.ts
src/vs/base/parts/ipc/test/node/ipc.perf.ts
+3
-3
src/vs/base/test/node/processes/processes.test.ts
src/vs/base/test/node/processes/processes.test.ts
+2
-2
src/vs/base/test/node/uri.test.perf.ts
src/vs/base/test/node/uri.test.perf.ts
+2
-1
src/vs/base/test/node/zip/zip.test.ts
src/vs/base/test/node/zip/zip.test.ts
+2
-2
src/vs/platform/environment/node/environmentService.ts
src/vs/platform/environment/node/environmentService.ts
+2
-2
src/vs/platform/extensionManagement/node/extensionManagementService.ts
...rm/extensionManagement/node/extensionManagementService.ts
+2
-1
src/vs/platform/node/package.ts
src/vs/platform/node/package.ts
+3
-3
src/vs/platform/node/product.ts
src/vs/platform/node/product.ts
+2
-2
src/vs/workbench/parts/cli/electron-browser/cli.contribution.ts
.../workbench/parts/cli/electron-browser/cli.contribution.ts
+2
-2
src/vs/workbench/parts/debug/node/debugger.ts
src/vs/workbench/parts/debug/node/debugger.ts
+2
-2
src/vs/workbench/parts/debug/node/terminals.ts
src/vs/workbench/parts/debug/node/terminals.ts
+3
-3
src/vs/workbench/parts/execution/electron-browser/terminalService.ts
...bench/parts/execution/electron-browser/terminalService.ts
+2
-2
src/vs/workbench/services/extensions/electron-browser/extensionHost.ts
...nch/services/extensions/electron-browser/extensionHost.ts
+2
-2
src/vs/workbench/services/extensions/electron-browser/extensionService.ts
.../services/extensions/electron-browser/extensionService.ts
+4
-3
src/vs/workbench/services/files/node/watcher/nsfw/watcherService.ts
...kbench/services/files/node/watcher/nsfw/watcherService.ts
+2
-2
src/vs/workbench/services/files/node/watcher/unix/watcherService.ts
...kbench/services/files/node/watcher/unix/watcherService.ts
+3
-3
src/vs/workbench/services/files/node/watcher/win32/csharpWatcherService.ts
...services/files/node/watcher/win32/csharpWatcherService.ts
+3
-3
src/vs/workbench/services/search/node/searchService.ts
src/vs/workbench/services/search/node/searchService.ts
+2
-1
src/vs/workbench/services/search/node/textSearchWorkerProvider.ts
...orkbench/services/search/node/textSearchWorkerProvider.ts
+3
-3
未找到文件。
src/vs/base/node/paths.ts
浏览文件 @
36883965
...
@@ -3,14 +3,14 @@
...
@@ -3,14 +3,14 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
*--------------------------------------------------------------------------------------------*/
import
uri
from
'
vs/base/common/uri
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
interface
IPaths
{
interface
IPaths
{
getAppDataPath
(
platform
:
string
):
string
;
getAppDataPath
(
platform
:
string
):
string
;
getDefaultUserDataPath
(
platform
:
string
):
string
;
getDefaultUserDataPath
(
platform
:
string
):
string
;
}
}
const
pathsPath
=
uri
.
parse
(
require
.
toUrl
(
'
paths
'
)).
fsPath
;
const
pathsPath
=
getPathFromAmdModule
(
require
,
'
paths
'
)
;
const
paths
=
require
.
__$__nodeRequire
<
IPaths
>
(
pathsPath
);
const
paths
=
require
.
__$__nodeRequire
<
IPaths
>
(
pathsPath
);
export
const
getAppDataPath
=
paths
.
getAppDataPath
;
export
const
getAppDataPath
=
paths
.
getAppDataPath
;
export
const
getDefaultUserDataPath
=
paths
.
getDefaultUserDataPath
;
export
const
getDefaultUserDataPath
=
paths
.
getDefaultUserDataPath
;
src/vs/base/node/processes.ts
浏览文件 @
36883965
...
@@ -11,12 +11,12 @@ import * as nls from 'vs/nls';
...
@@ -11,12 +11,12 @@ import * as nls from 'vs/nls';
import
{
TPromise
,
TValueCallback
,
ErrorCallback
}
from
'
vs/base/common/winjs.base
'
;
import
{
TPromise
,
TValueCallback
,
ErrorCallback
}
from
'
vs/base/common/winjs.base
'
;
import
*
as
Types
from
'
vs/base/common/types
'
;
import
*
as
Types
from
'
vs/base/common/types
'
;
import
{
IStringDictionary
}
from
'
vs/base/common/collections
'
;
import
{
IStringDictionary
}
from
'
vs/base/common/collections
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
*
as
Objects
from
'
vs/base/common/objects
'
;
import
*
as
Objects
from
'
vs/base/common/objects
'
;
import
*
as
TPath
from
'
vs/base/common/paths
'
;
import
*
as
TPath
from
'
vs/base/common/paths
'
;
import
*
as
Platform
from
'
vs/base/common/platform
'
;
import
*
as
Platform
from
'
vs/base/common/platform
'
;
import
{
LineDecoder
}
from
'
vs/base/node/decoder
'
;
import
{
LineDecoder
}
from
'
vs/base/node/decoder
'
;
import
{
CommandOptions
,
ForkOptions
,
SuccessData
,
Source
,
TerminateResponse
,
TerminateResponseCode
,
Executable
}
from
'
vs/base/common/processes
'
;
import
{
CommandOptions
,
ForkOptions
,
SuccessData
,
Source
,
TerminateResponse
,
TerminateResponseCode
,
Executable
}
from
'
vs/base/common/processes
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
export
{
CommandOptions
,
ForkOptions
,
SuccessData
,
Source
,
TerminateResponse
,
TerminateResponseCode
};
export
{
CommandOptions
,
ForkOptions
,
SuccessData
,
Source
,
TerminateResponse
,
TerminateResponseCode
};
export
type
TProgressCallback
<
T
>
=
(
progress
:
T
)
=>
void
;
export
type
TProgressCallback
<
T
>
=
(
progress
:
T
)
=>
void
;
...
@@ -54,7 +54,7 @@ export function terminateProcess(process: cp.ChildProcess, cwd?: string): Termin
...
@@ -54,7 +54,7 @@ export function terminateProcess(process: cp.ChildProcess, cwd?: string): Termin
}
}
}
else
if
(
Platform
.
isLinux
||
Platform
.
isMacintosh
)
{
}
else
if
(
Platform
.
isLinux
||
Platform
.
isMacintosh
)
{
try
{
try
{
let
cmd
=
URI
.
parse
(
require
.
toUrl
(
'
vs/base/node/terminateProcess.sh
'
)).
fsPath
;
let
cmd
=
getPathFromAmdModule
(
require
,
'
vs/base/node/terminateProcess.sh
'
)
;
let
result
=
cp
.
spawnSync
(
cmd
,
[
process
.
pid
.
toString
()]);
let
result
=
cp
.
spawnSync
(
cmd
,
[
process
.
pid
.
toString
()]);
if
(
result
.
error
)
{
if
(
result
.
error
)
{
return
{
success
:
false
,
error
:
result
.
error
};
return
{
success
:
false
,
error
:
result
.
error
};
...
...
src/vs/base/node/ps.ts
浏览文件 @
36883965
...
@@ -6,7 +6,8 @@
...
@@ -6,7 +6,8 @@
'
use strict
'
;
'
use strict
'
;
import
{
exec
}
from
'
child_process
'
;
import
{
exec
}
from
'
child_process
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
export
interface
ProcessItem
{
export
interface
ProcessItem
{
name
:
string
;
name
:
string
;
...
@@ -207,7 +208,7 @@ export function listProcesses(rootPid: number): Promise<ProcessItem> {
...
@@ -207,7 +208,7 @@ export function listProcesses(rootPid: number): Promise<ProcessItem> {
// The cpu usage value reported on Linux is the average over the process lifetime,
// The cpu usage value reported on Linux is the average over the process lifetime,
// recalculate the usage over a one second interval
// recalculate the usage over a one second interval
// JSON.stringify is needed to escape spaces, https://github.com/nodejs/node/issues/6803
// JSON.stringify is needed to escape spaces, https://github.com/nodejs/node/issues/6803
let
cmd
=
JSON
.
stringify
(
URI
.
parse
(
require
.
toUrl
(
'
vs/base/node/cpuUsage.sh
'
)).
fsPath
);
let
cmd
=
JSON
.
stringify
(
getPathFromAmdModule
(
require
,
'
vs/base/node/cpuUsage.sh
'
)
);
cmd
+=
'
'
+
pids
.
join
(
'
'
);
cmd
+=
'
'
+
pids
.
join
(
'
'
);
exec
(
cmd
,
{},
(
err
,
stdout
,
stderr
)
=>
{
exec
(
cmd
,
{},
(
err
,
stdout
,
stderr
)
=>
{
...
...
src/vs/base/node/stdFork.ts
浏览文件 @
36883965
...
@@ -9,7 +9,7 @@ import * as path from 'path';
...
@@ -9,7 +9,7 @@ import * as path from 'path';
import
*
as
os
from
'
os
'
;
import
*
as
os
from
'
os
'
;
import
*
as
net
from
'
net
'
;
import
*
as
net
from
'
net
'
;
import
*
as
cp
from
'
child_process
'
;
import
*
as
cp
from
'
child_process
'
;
import
uri
from
'
vs/base/common/uri
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
export
interface
IForkOpts
{
export
interface
IForkOpts
{
cwd
?:
string
;
cwd
?:
string
;
...
@@ -117,7 +117,7 @@ export function fork(modulePath: string, args: string[], options: IForkOpts, cal
...
@@ -117,7 +117,7 @@ export function fork(modulePath: string, args: string[], options: IForkOpts, cal
};
};
// Create the process
// Create the process
let
bootstrapperPath
=
(
uri
.
parse
(
require
.
toUrl
(
'
./stdForkStart.js
'
)).
fsPath
);
let
bootstrapperPath
=
(
getPathFromAmdModule
(
require
,
'
./stdForkStart.js
'
)
);
childProcess
=
cp
.
fork
(
bootstrapperPath
,
[
modulePath
].
concat
(
args
),
{
childProcess
=
cp
.
fork
(
bootstrapperPath
,
[
modulePath
].
concat
(
args
),
{
silent
:
true
,
silent
:
true
,
cwd
:
options
.
cwd
,
cwd
:
options
.
cwd
,
...
...
src/vs/base/parts/ipc/test/node/ipc.perf.ts
浏览文件 @
36883965
...
@@ -7,12 +7,12 @@
...
@@ -7,12 +7,12 @@
import
*
as
assert
from
'
assert
'
;
import
*
as
assert
from
'
assert
'
;
import
{
Client
}
from
'
vs/base/parts/ipc/node/ipc.cp
'
;
import
{
Client
}
from
'
vs/base/parts/ipc/node/ipc.cp
'
;
import
uri
from
'
vs/base/common/uri
'
;
import
{
always
}
from
'
vs/base/common/async
'
;
import
{
always
}
from
'
vs/base/common/async
'
;
import
{
ITestChannel
,
TestServiceClient
,
ITestService
}
from
'
./testService
'
;
import
{
ITestChannel
,
TestServiceClient
,
ITestService
}
from
'
./testService
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
function
createClient
():
Client
{
function
createClient
():
Client
{
return
new
Client
(
uri
.
parse
(
require
.
toUrl
(
'
bootstrap
'
)).
fsPath
,
{
return
new
Client
(
getPathFromAmdModule
(
require
,
'
bootstrap
'
)
,
{
serverName
:
'
TestServer
'
,
serverName
:
'
TestServer
'
,
env
:
{
AMD_ENTRYPOINT
:
'
vs/base/parts/ipc/test/node/testApp
'
,
verbose
:
true
}
env
:
{
AMD_ENTRYPOINT
:
'
vs/base/parts/ipc/test/node/testApp
'
,
verbose
:
true
}
});
});
...
...
src/vs/base/test/node/processes/processes.test.ts
浏览文件 @
36883965
...
@@ -9,8 +9,8 @@ import * as assert from 'assert';
...
@@ -9,8 +9,8 @@ import * as assert from 'assert';
import
*
as
cp
from
'
child_process
'
;
import
*
as
cp
from
'
child_process
'
;
import
*
as
objects
from
'
vs/base/common/objects
'
;
import
*
as
objects
from
'
vs/base/common/objects
'
;
import
*
as
platform
from
'
vs/base/common/platform
'
;
import
*
as
platform
from
'
vs/base/common/platform
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
*
as
processes
from
'
vs/base/node/processes
'
;
import
*
as
processes
from
'
vs/base/node/processes
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
function
fork
(
id
:
string
):
cp
.
ChildProcess
{
function
fork
(
id
:
string
):
cp
.
ChildProcess
{
const
opts
:
any
=
{
const
opts
:
any
=
{
...
@@ -21,7 +21,7 @@ function fork(id: string): cp.ChildProcess {
...
@@ -21,7 +21,7 @@ function fork(id: string): cp.ChildProcess {
})
})
};
};
return
cp
.
fork
(
URI
.
parse
(
require
.
toUrl
(
'
bootstrap
'
)).
fsPath
,
[
'
--type=processTests
'
],
opts
);
return
cp
.
fork
(
getPathFromAmdModule
(
require
,
'
bootstrap
'
)
,
[
'
--type=processTests
'
],
opts
);
}
}
suite
(
'
Processes
'
,
()
=>
{
suite
(
'
Processes
'
,
()
=>
{
...
...
src/vs/base/test/node/uri.test.perf.ts
浏览文件 @
36883965
...
@@ -7,13 +7,14 @@
...
@@ -7,13 +7,14 @@
import
*
as
assert
from
'
assert
'
;
import
*
as
assert
from
'
assert
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
{
readFileSync
}
from
'
fs
'
;
import
{
readFileSync
}
from
'
fs
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
suite
(
'
URI - perf
'
,
function
()
{
suite
(
'
URI - perf
'
,
function
()
{
let
manyFileUris
:
URI
[];
let
manyFileUris
:
URI
[];
setup
(
function
()
{
setup
(
function
()
{
manyFileUris
=
[];
manyFileUris
=
[];
let
data
=
readFileSync
(
URI
.
parse
(
require
.
toUrl
(
'
./uri.test.data.txt
'
)).
fsPath
).
toString
();
let
data
=
readFileSync
(
getPathFromAmdModule
(
require
,
'
./uri.test.data.txt
'
)
).
toString
();
let
lines
=
data
.
split
(
'
\n
'
);
let
lines
=
data
.
split
(
'
\n
'
);
for
(
let
line
of
lines
)
{
for
(
let
line
of
lines
)
{
manyFileUris
.
push
(
URI
.
file
(
line
));
manyFileUris
.
push
(
URI
.
file
(
line
));
...
...
src/vs/base/test/node/zip/zip.test.ts
浏览文件 @
36883965
...
@@ -8,13 +8,13 @@
...
@@ -8,13 +8,13 @@
import
*
as
assert
from
'
assert
'
;
import
*
as
assert
from
'
assert
'
;
import
*
as
path
from
'
path
'
;
import
*
as
path
from
'
path
'
;
import
*
as
os
from
'
os
'
;
import
*
as
os
from
'
os
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
{
extract
}
from
'
vs/base/node/zip
'
;
import
{
extract
}
from
'
vs/base/node/zip
'
;
import
{
generateUuid
}
from
'
vs/base/common/uuid
'
;
import
{
generateUuid
}
from
'
vs/base/common/uuid
'
;
import
{
rimraf
,
exists
}
from
'
vs/base/node/pfs
'
;
import
{
rimraf
,
exists
}
from
'
vs/base/node/pfs
'
;
import
{
NullLogService
}
from
'
vs/platform/log/common/log
'
;
import
{
NullLogService
}
from
'
vs/platform/log/common/log
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
const
fixtures
=
URI
.
parse
(
require
.
toUrl
(
'
./fixtures
'
)).
fsPath
;
const
fixtures
=
getPathFromAmdModule
(
require
,
'
./fixtures
'
)
;
suite
(
'
Zip
'
,
()
=>
{
suite
(
'
Zip
'
,
()
=>
{
...
...
src/vs/platform/environment/node/environmentService.ts
浏览文件 @
36883965
...
@@ -8,12 +8,12 @@ import * as crypto from 'crypto';
...
@@ -8,12 +8,12 @@ import * as crypto from 'crypto';
import
*
as
paths
from
'
vs/base/node/paths
'
;
import
*
as
paths
from
'
vs/base/node/paths
'
;
import
*
as
os
from
'
os
'
;
import
*
as
os
from
'
os
'
;
import
*
as
path
from
'
path
'
;
import
*
as
path
from
'
path
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
{
memoize
}
from
'
vs/base/common/decorators
'
;
import
{
memoize
}
from
'
vs/base/common/decorators
'
;
import
pkg
from
'
vs/platform/node/package
'
;
import
pkg
from
'
vs/platform/node/package
'
;
import
product
from
'
vs/platform/node/product
'
;
import
product
from
'
vs/platform/node/product
'
;
import
{
toLocalISOString
}
from
'
vs/base/common/date
'
;
import
{
toLocalISOString
}
from
'
vs/base/common/date
'
;
import
{
isWindows
,
isLinux
}
from
'
vs/base/common/platform
'
;
import
{
isWindows
,
isLinux
}
from
'
vs/base/common/platform
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
// Read this before there's any chance it is overwritten
// Read this before there's any chance it is overwritten
// Related to https://github.com/Microsoft/vscode/issues/30624
// Related to https://github.com/Microsoft/vscode/issues/30624
...
@@ -77,7 +77,7 @@ export class EnvironmentService implements IEnvironmentService {
...
@@ -77,7 +77,7 @@ export class EnvironmentService implements IEnvironmentService {
get
args
():
ParsedArgs
{
return
this
.
_args
;
}
get
args
():
ParsedArgs
{
return
this
.
_args
;
}
@
memoize
@
memoize
get
appRoot
():
string
{
return
path
.
dirname
(
URI
.
parse
(
require
.
toUrl
(
''
)).
fsPath
);
}
get
appRoot
():
string
{
return
path
.
dirname
(
getPathFromAmdModule
(
require
,
''
)
);
}
get
execPath
():
string
{
return
this
.
_execPath
;
}
get
execPath
():
string
{
return
this
.
_execPath
;
}
...
...
src/vs/platform/extensionManagement/node/extensionManagementService.ts
浏览文件 @
36883965
...
@@ -40,8 +40,9 @@ import { ExtensionsLifecycle } from 'vs/platform/extensionManagement/node/extens
...
@@ -40,8 +40,9 @@ import { ExtensionsLifecycle } from 'vs/platform/extensionManagement/node/extens
import
{
toErrorMessage
}
from
'
vs/base/common/errorMessage
'
;
import
{
toErrorMessage
}
from
'
vs/base/common/errorMessage
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
isEngineValid
}
from
'
vs/platform/extensions/node/extensionValidator
'
;
import
{
isEngineValid
}
from
'
vs/platform/extensions/node/extensionValidator
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
const
SystemExtensionsRoot
=
path
.
normalize
(
path
.
join
(
URI
.
parse
(
require
.
toUrl
(
''
)).
fsPath
,
'
..
'
,
'
extensions
'
));
const
SystemExtensionsRoot
=
path
.
normalize
(
path
.
join
(
getPathFromAmdModule
(
require
,
''
)
,
'
..
'
,
'
extensions
'
));
const
ERROR_SCANNING_SYS_EXTENSIONS
=
'
scanningSystem
'
;
const
ERROR_SCANNING_SYS_EXTENSIONS
=
'
scanningSystem
'
;
const
ERROR_SCANNING_USER_EXTENSIONS
=
'
scanningUser
'
;
const
ERROR_SCANNING_USER_EXTENSIONS
=
'
scanningUser
'
;
const
INSTALL_ERROR_UNSET_UNINSTALLED
=
'
unsetUninstalled
'
;
const
INSTALL_ERROR_UNSET_UNINSTALLED
=
'
unsetUninstalled
'
;
...
...
src/vs/platform/node/package.ts
浏览文件 @
36883965
...
@@ -4,13 +4,13 @@
...
@@ -4,13 +4,13 @@
*--------------------------------------------------------------------------------------------*/
*--------------------------------------------------------------------------------------------*/
import
*
as
path
from
'
path
'
;
import
*
as
path
from
'
path
'
;
import
uri
from
'
vs/base/common/uri
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
export
interface
IPackageConfiguration
{
export
interface
IPackageConfiguration
{
name
:
string
;
name
:
string
;
version
:
string
;
version
:
string
;
}
}
const
rootPath
=
path
.
dirname
(
uri
.
parse
(
require
.
toUrl
(
''
)).
fsPath
);
const
rootPath
=
path
.
dirname
(
getPathFromAmdModule
(
require
,
''
)
);
const
packageJsonPath
=
path
.
join
(
rootPath
,
'
package.json
'
);
const
packageJsonPath
=
path
.
join
(
rootPath
,
'
package.json
'
);
export
default
require
.
__$__nodeRequire
(
packageJsonPath
)
as
IPackageConfiguration
;
export
default
require
.
__$__nodeRequire
(
packageJsonPath
)
as
IPackageConfiguration
;
src/vs/platform/node/product.ts
浏览文件 @
36883965
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
*--------------------------------------------------------------------------------------------*/
import
*
as
path
from
'
path
'
;
import
*
as
path
from
'
path
'
;
import
uri
from
'
vs/base/common/uri
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
export
interface
IProductConfiguration
{
export
interface
IProductConfiguration
{
nameShort
:
string
;
nameShort
:
string
;
...
@@ -86,7 +86,7 @@ export interface ISurveyData {
...
@@ -86,7 +86,7 @@ export interface ISurveyData {
userProbability
:
number
;
userProbability
:
number
;
}
}
const
rootPath
=
path
.
dirname
(
uri
.
parse
(
require
.
toUrl
(
''
)).
fsPath
);
const
rootPath
=
path
.
dirname
(
getPathFromAmdModule
(
require
,
''
)
);
const
productJsonPath
=
path
.
join
(
rootPath
,
'
product.json
'
);
const
productJsonPath
=
path
.
join
(
rootPath
,
'
product.json
'
);
const
product
=
require
.
__$__nodeRequire
(
productJsonPath
)
as
IProductConfiguration
;
const
product
=
require
.
__$__nodeRequire
(
productJsonPath
)
as
IProductConfiguration
;
...
...
src/vs/workbench/parts/cli/electron-browser/cli.contribution.ts
浏览文件 @
36883965
...
@@ -10,7 +10,6 @@ import * as pfs from 'vs/base/node/pfs';
...
@@ -10,7 +10,6 @@ import * as pfs from 'vs/base/node/pfs';
import
*
as
platform
from
'
vs/base/common/platform
'
;
import
*
as
platform
from
'
vs/base/common/platform
'
;
import
{
nfcall
}
from
'
vs/base/common/async
'
;
import
{
nfcall
}
from
'
vs/base/common/async
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
{
Action
}
from
'
vs/base/common/actions
'
;
import
{
Action
}
from
'
vs/base/common/actions
'
;
import
{
IWorkbenchActionRegistry
,
Extensions
as
ActionExtensions
}
from
'
vs/workbench/common/actions
'
;
import
{
IWorkbenchActionRegistry
,
Extensions
as
ActionExtensions
}
from
'
vs/workbench/common/actions
'
;
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
...
@@ -20,6 +19,7 @@ import { INotificationService } from 'vs/platform/notification/common/notificati
...
@@ -20,6 +19,7 @@ import { INotificationService } from 'vs/platform/notification/common/notificati
import
{
IDialogService
}
from
'
vs/platform/dialogs/common/dialogs
'
;
import
{
IDialogService
}
from
'
vs/platform/dialogs/common/dialogs
'
;
import
Severity
from
'
vs/base/common/severity
'
;
import
Severity
from
'
vs/base/common/severity
'
;
import
{
ILogService
}
from
'
vs/platform/log/common/log
'
;
import
{
ILogService
}
from
'
vs/platform/log/common/log
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
function
ignore
<
T
>
(
code
:
string
,
value
:
T
=
null
):
(
err
:
any
)
=>
TPromise
<
T
>
{
function
ignore
<
T
>
(
code
:
string
,
value
:
T
=
null
):
(
err
:
any
)
=>
TPromise
<
T
>
{
return
err
=>
err
.
code
===
code
?
TPromise
.
as
<
T
>
(
value
)
:
TPromise
.
wrapError
<
T
>
(
err
);
return
err
=>
err
.
code
===
code
?
TPromise
.
as
<
T
>
(
value
)
:
TPromise
.
wrapError
<
T
>
(
err
);
...
@@ -28,7 +28,7 @@ function ignore<T>(code: string, value: T = null): (err: any) => TPromise<T> {
...
@@ -28,7 +28,7 @@ function ignore<T>(code: string, value: T = null): (err: any) => TPromise<T> {
let
_source
:
string
=
null
;
let
_source
:
string
=
null
;
function
getSource
():
string
{
function
getSource
():
string
{
if
(
!
_source
)
{
if
(
!
_source
)
{
const
root
=
URI
.
parse
(
require
.
toUrl
(
''
)).
fsPath
;
const
root
=
getPathFromAmdModule
(
require
,
''
)
;
_source
=
path
.
resolve
(
root
,
'
..
'
,
'
bin
'
,
'
code
'
);
_source
=
path
.
resolve
(
root
,
'
..
'
,
'
bin
'
,
'
code
'
);
}
}
return
_source
;
return
_source
;
...
...
src/vs/workbench/parts/debug/node/debugger.ts
浏览文件 @
36883965
...
@@ -19,10 +19,10 @@ import { IOutputService } from 'vs/workbench/parts/output/common/output';
...
@@ -19,10 +19,10 @@ import { IOutputService } from 'vs/workbench/parts/output/common/output';
import
{
DebugAdapter
,
SocketDebugAdapter
}
from
'
vs/workbench/parts/debug/node/debugAdapter
'
;
import
{
DebugAdapter
,
SocketDebugAdapter
}
from
'
vs/workbench/parts/debug/node/debugAdapter
'
;
import
{
IConfigurationResolverService
}
from
'
vs/workbench/services/configurationResolver/common/configurationResolver
'
;
import
{
IConfigurationResolverService
}
from
'
vs/workbench/services/configurationResolver/common/configurationResolver
'
;
import
{
TelemetryService
}
from
'
vs/platform/telemetry/common/telemetryService
'
;
import
{
TelemetryService
}
from
'
vs/platform/telemetry/common/telemetryService
'
;
import
uri
from
'
vs/base/common/uri
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
memoize
}
from
'
vs/base/common/decorators
'
;
import
{
memoize
}
from
'
vs/base/common/decorators
'
;
import
{
TaskDefinitionRegistry
}
from
'
vs/workbench/parts/tasks/common/taskDefinitionRegistry
'
;
import
{
TaskDefinitionRegistry
}
from
'
vs/workbench/parts/tasks/common/taskDefinitionRegistry
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
export
class
Debugger
{
export
class
Debugger
{
...
@@ -173,7 +173,7 @@ export class Debugger {
...
@@ -173,7 +173,7 @@ export class Debugger {
return
telemetryInfo
;
return
telemetryInfo
;
}).
then
(
data
=>
{
}).
then
(
data
=>
{
const
client
=
new
TelemetryClient
(
const
client
=
new
TelemetryClient
(
uri
.
parse
(
require
.
toUrl
(
'
bootstrap
'
)).
fsPath
,
getPathFromAmdModule
(
require
,
'
bootstrap
'
)
,
{
{
serverName
:
'
Debug Telemetry
'
,
serverName
:
'
Debug Telemetry
'
,
timeout
:
1000
*
60
*
5
,
timeout
:
1000
*
60
*
5
,
...
...
src/vs/workbench/parts/debug/node/terminals.ts
浏览文件 @
36883965
...
@@ -11,8 +11,8 @@ import * as env from 'vs/base/common/platform';
...
@@ -11,8 +11,8 @@ import * as env from 'vs/base/common/platform';
import
*
as
pfs
from
'
vs/base/node/pfs
'
;
import
*
as
pfs
from
'
vs/base/node/pfs
'
;
import
{
assign
}
from
'
vs/base/common/objects
'
;
import
{
assign
}
from
'
vs/base/common/objects
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
uri
from
'
vs/base/common/uri
'
;
import
{
ITerminalLauncher
,
ITerminalSettings
}
from
'
vs/workbench/parts/debug/common/debug
'
;
import
{
ITerminalLauncher
,
ITerminalSettings
}
from
'
vs/workbench/parts/debug/common/debug
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
const
TERMINAL_TITLE
=
nls
.
localize
(
'
console.title
'
,
"
VS Code Console
"
);
const
TERMINAL_TITLE
=
nls
.
localize
(
'
console.title
'
,
"
VS Code Console
"
);
...
@@ -132,7 +132,7 @@ class MacTerminalService extends TerminalLauncher {
...
@@ -132,7 +132,7 @@ class MacTerminalService extends TerminalLauncher {
// and then launches the program inside that window.
// and then launches the program inside that window.
const
script
=
terminalApp
===
MacTerminalService
.
DEFAULT_TERMINAL_OSX
?
'
TerminalHelper
'
:
'
iTermHelper
'
;
const
script
=
terminalApp
===
MacTerminalService
.
DEFAULT_TERMINAL_OSX
?
'
TerminalHelper
'
:
'
iTermHelper
'
;
const
scriptpath
=
uri
.
parse
(
require
.
toUrl
(
`vs/workbench/parts/execution/electron-browser/
${
script
}
.scpt`
)).
fsPath
;
const
scriptpath
=
getPathFromAmdModule
(
require
,
`vs/workbench/parts/execution/electron-browser/
${
script
}
.scpt`
)
;
const
osaArgs
=
[
const
osaArgs
=
[
scriptpath
,
scriptpath
,
...
...
src/vs/workbench/parts/execution/electron-browser/terminalService.ts
浏览文件 @
36883965
...
@@ -15,8 +15,8 @@ import { TPromise } from 'vs/base/common/winjs.base';
...
@@ -15,8 +15,8 @@ import { TPromise } from 'vs/base/common/winjs.base';
import
{
ITerminalService
}
from
'
vs/workbench/parts/execution/common/execution
'
;
import
{
ITerminalService
}
from
'
vs/workbench/parts/execution/common/execution
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
ITerminalConfiguration
,
getDefaultTerminalWindows
,
getDefaultTerminalLinuxReady
,
DEFAULT_TERMINAL_OSX
}
from
'
vs/workbench/parts/execution/electron-browser/terminal
'
;
import
{
ITerminalConfiguration
,
getDefaultTerminalWindows
,
getDefaultTerminalLinuxReady
,
DEFAULT_TERMINAL_OSX
}
from
'
vs/workbench/parts/execution/electron-browser/terminal
'
;
import
uri
from
'
vs/base/common/uri
'
;
import
{
IProcessEnvironment
}
from
'
vs/base/common/platform
'
;
import
{
IProcessEnvironment
}
from
'
vs/base/common/platform
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
const
TERMINAL_TITLE
=
nls
.
localize
(
'
console.title
'
,
"
VS Code Console
"
);
const
TERMINAL_TITLE
=
nls
.
localize
(
'
console.title
'
,
"
VS Code Console
"
);
...
@@ -143,7 +143,7 @@ export class MacTerminalService implements ITerminalService {
...
@@ -143,7 +143,7 @@ export class MacTerminalService implements ITerminalService {
// and then launches the program inside that window.
// and then launches the program inside that window.
const
script
=
terminalApp
===
DEFAULT_TERMINAL_OSX
?
'
TerminalHelper
'
:
'
iTermHelper
'
;
const
script
=
terminalApp
===
DEFAULT_TERMINAL_OSX
?
'
TerminalHelper
'
:
'
iTermHelper
'
;
const
scriptpath
=
uri
.
parse
(
require
.
toUrl
(
`vs/workbench/parts/execution/electron-browser/
${
script
}
.scpt`
)).
fsPath
;
const
scriptpath
=
getPathFromAmdModule
(
require
,
`vs/workbench/parts/execution/electron-browser/
${
script
}
.scpt`
)
;
const
osaArgs
=
[
const
osaArgs
=
[
scriptpath
,
scriptpath
,
...
...
src/vs/workbench/services/extensions/electron-browser/extensionHost.ts
浏览文件 @
36883965
...
@@ -8,7 +8,6 @@
...
@@ -8,7 +8,6 @@
import
*
as
nls
from
'
vs/nls
'
;
import
*
as
nls
from
'
vs/nls
'
;
import
{
toErrorMessage
}
from
'
vs/base/common/errorMessage
'
;
import
{
toErrorMessage
}
from
'
vs/base/common/errorMessage
'
;
import
*
as
objects
from
'
vs/base/common/objects
'
;
import
*
as
objects
from
'
vs/base/common/objects
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
isWindows
,
isLinux
}
from
'
vs/base/common/platform
'
;
import
{
isWindows
,
isLinux
}
from
'
vs/base/common/platform
'
;
import
{
findFreePort
}
from
'
vs/base/node/ports
'
;
import
{
findFreePort
}
from
'
vs/base/node/ports
'
;
...
@@ -36,6 +35,7 @@ import { IRemoteConsoleLog, log, parse } from 'vs/base/node/console';
...
@@ -36,6 +35,7 @@ import { IRemoteConsoleLog, log, parse } from 'vs/base/node/console';
import
{
getScopes
}
from
'
vs/platform/configuration/common/configurationRegistry
'
;
import
{
getScopes
}
from
'
vs/platform/configuration/common/configurationRegistry
'
;
import
{
ILogService
}
from
'
vs/platform/log/common/log
'
;
import
{
ILogService
}
from
'
vs/platform/log/common/log
'
;
import
{
INotificationService
,
Severity
}
from
'
vs/platform/notification/common/notification
'
;
import
{
INotificationService
,
Severity
}
from
'
vs/platform/notification/common/notification
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
export
class
ExtensionHostProcessWorker
{
export
class
ExtensionHostProcessWorker
{
...
@@ -171,7 +171,7 @@ export class ExtensionHostProcessWorker {
...
@@ -171,7 +171,7 @@ export class ExtensionHostProcessWorker {
}
}
// Run Extension Host as fork of current process
// Run Extension Host as fork of current process
this
.
_extensionHostProcess
=
fork
(
URI
.
parse
(
require
.
toUrl
(
'
bootstrap
'
)).
fsPath
,
[
'
--type=extensionHost
'
],
opts
);
this
.
_extensionHostProcess
=
fork
(
getPathFromAmdModule
(
require
,
'
bootstrap
'
)
,
[
'
--type=extensionHost
'
],
opts
);
// Catch all output coming from the extension host process
// Catch all output coming from the extension host process
type
Output
=
{
data
:
string
,
format
:
string
[]
};
type
Output
=
{
data
:
string
,
format
:
string
[]
};
...
...
src/vs/workbench/services/extensions/electron-browser/extensionService.ts
浏览文件 @
36883965
...
@@ -43,18 +43,19 @@ import { RPCProtocol } from 'vs/workbench/services/extensions/node/rpcProtocol';
...
@@ -43,18 +43,19 @@ import { RPCProtocol } from 'vs/workbench/services/extensions/node/rpcProtocol';
import
{
INotificationService
,
Severity
}
from
'
vs/platform/notification/common/notification
'
;
import
{
INotificationService
,
Severity
}
from
'
vs/platform/notification/common/notification
'
;
import
{
isFalsyOrEmpty
}
from
'
vs/base/common/arrays
'
;
import
{
isFalsyOrEmpty
}
from
'
vs/base/common/arrays
'
;
import
{
Schemas
}
from
'
vs/base/common/network
'
;
import
{
Schemas
}
from
'
vs/base/common/network
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
let
_SystemExtensionsRoot
:
string
=
null
;
let
_SystemExtensionsRoot
:
string
=
null
;
function
getSystemExtensionsRoot
():
string
{
function
getSystemExtensionsRoot
():
string
{
if
(
!
_SystemExtensionsRoot
)
{
if
(
!
_SystemExtensionsRoot
)
{
_SystemExtensionsRoot
=
path
.
normalize
(
path
.
join
(
URI
.
parse
(
require
.
toUrl
(
''
)).
fsPath
,
'
..
'
,
'
extensions
'
));
_SystemExtensionsRoot
=
path
.
normalize
(
path
.
join
(
getPathFromAmdModule
(
require
,
''
)
,
'
..
'
,
'
extensions
'
));
}
}
return
_SystemExtensionsRoot
;
return
_SystemExtensionsRoot
;
}
}
let
_ExtraDevSystemExtensionsRoot
:
string
=
null
;
let
_ExtraDevSystemExtensionsRoot
:
string
=
null
;
function
getExtraDevSystemExtensionsRoot
():
string
{
function
getExtraDevSystemExtensionsRoot
():
string
{
if
(
!
_ExtraDevSystemExtensionsRoot
)
{
if
(
!
_ExtraDevSystemExtensionsRoot
)
{
_ExtraDevSystemExtensionsRoot
=
path
.
normalize
(
path
.
join
(
URI
.
parse
(
require
.
toUrl
(
''
)).
fsPath
,
'
..
'
,
'
.build
'
,
'
builtInExtensions
'
));
_ExtraDevSystemExtensionsRoot
=
path
.
normalize
(
path
.
join
(
getPathFromAmdModule
(
require
,
''
)
,
'
..
'
,
'
.build
'
,
'
builtInExtensions
'
));
}
}
return
_ExtraDevSystemExtensionsRoot
;
return
_ExtraDevSystemExtensionsRoot
;
}
}
...
@@ -796,7 +797,7 @@ export class ExtensionService extends Disposable implements IExtensionService {
...
@@ -796,7 +797,7 @@ export class ExtensionService extends Disposable implements IExtensionService {
let
finalBuiltinExtensions
:
TPromise
<
IExtensionDescription
[]
>
=
TPromise
.
wrap
(
builtinExtensions
);
let
finalBuiltinExtensions
:
TPromise
<
IExtensionDescription
[]
>
=
TPromise
.
wrap
(
builtinExtensions
);
if
(
devMode
)
{
if
(
devMode
)
{
const
builtInExtensionsFilePath
=
path
.
normalize
(
path
.
join
(
URI
.
parse
(
require
.
toUrl
(
''
)).
fsPath
,
'
..
'
,
'
build
'
,
'
builtInExtensions.json
'
));
const
builtInExtensionsFilePath
=
path
.
normalize
(
path
.
join
(
getPathFromAmdModule
(
require
,
''
)
,
'
..
'
,
'
build
'
,
'
builtInExtensions.json
'
));
const
builtInExtensions
=
pfs
.
readFile
(
builtInExtensionsFilePath
,
'
utf8
'
)
const
builtInExtensions
=
pfs
.
readFile
(
builtInExtensionsFilePath
,
'
utf8
'
)
.
then
<
IBuiltInExtension
[]
>
(
raw
=>
JSON
.
parse
(
raw
));
.
then
<
IBuiltInExtension
[]
>
(
raw
=>
JSON
.
parse
(
raw
));
...
...
src/vs/workbench/services/files/node/watcher/nsfw/watcherService.ts
浏览文件 @
36883965
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
import
{
getNextTickChannel
}
from
'
vs/base/parts/ipc/common/ipc
'
;
import
{
getNextTickChannel
}
from
'
vs/base/parts/ipc/common/ipc
'
;
import
{
Client
}
from
'
vs/base/parts/ipc/node/ipc.cp
'
;
import
{
Client
}
from
'
vs/base/parts/ipc/node/ipc.cp
'
;
import
uri
from
'
vs/base/common/uri
'
;
import
{
toFileChangesEvent
,
IRawFileChange
}
from
'
vs/workbench/services/files/node/watcher/common
'
;
import
{
toFileChangesEvent
,
IRawFileChange
}
from
'
vs/workbench/services/files/node/watcher/common
'
;
import
{
IWatcherChannel
,
WatcherChannelClient
}
from
'
vs/workbench/services/files/node/watcher/nsfw/watcherIpc
'
;
import
{
IWatcherChannel
,
WatcherChannelClient
}
from
'
vs/workbench/services/files/node/watcher/nsfw/watcherIpc
'
;
import
{
FileChangesEvent
,
IFilesConfiguration
}
from
'
vs/platform/files/common/files
'
;
import
{
FileChangesEvent
,
IFilesConfiguration
}
from
'
vs/platform/files/common/files
'
;
...
@@ -17,6 +16,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle';
...
@@ -17,6 +16,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import
{
Schemas
}
from
'
vs/base/common/network
'
;
import
{
Schemas
}
from
'
vs/base/common/network
'
;
import
{
filterEvent
}
from
'
vs/base/common/event
'
;
import
{
filterEvent
}
from
'
vs/base/common/event
'
;
import
{
IWatchError
}
from
'
vs/workbench/services/files/node/watcher/nsfw/watcher
'
;
import
{
IWatchError
}
from
'
vs/workbench/services/files/node/watcher/nsfw/watcher
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
export
class
FileWatcher
{
export
class
FileWatcher
{
private
static
readonly
MAX_RESTARTS
=
5
;
private
static
readonly
MAX_RESTARTS
=
5
;
...
@@ -39,7 +39,7 @@ export class FileWatcher {
...
@@ -39,7 +39,7 @@ export class FileWatcher {
public
startWatching
():
()
=>
void
{
public
startWatching
():
()
=>
void
{
const
client
=
new
Client
(
const
client
=
new
Client
(
uri
.
parse
(
require
.
toUrl
(
'
bootstrap
'
)).
fsPath
,
getPathFromAmdModule
(
require
,
'
bootstrap
'
)
,
{
{
serverName
:
'
Watcher
'
,
serverName
:
'
Watcher
'
,
args
:
[
'
--type=watcherService
'
],
args
:
[
'
--type=watcherService
'
],
...
...
src/vs/workbench/services/files/node/watcher/unix/watcherService.ts
浏览文件 @
36883965
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
import
{
getNextTickChannel
}
from
'
vs/base/parts/ipc/common/ipc
'
;
import
{
getNextTickChannel
}
from
'
vs/base/parts/ipc/common/ipc
'
;
import
{
Client
}
from
'
vs/base/parts/ipc/node/ipc.cp
'
;
import
{
Client
}
from
'
vs/base/parts/ipc/node/ipc.cp
'
;
import
uri
from
'
vs/base/common/uri
'
;
import
{
toFileChangesEvent
,
IRawFileChange
}
from
'
vs/workbench/services/files/node/watcher/common
'
;
import
{
toFileChangesEvent
,
IRawFileChange
}
from
'
vs/workbench/services/files/node/watcher/common
'
;
import
{
IWatcherChannel
,
WatcherChannelClient
}
from
'
vs/workbench/services/files/node/watcher/unix/watcherIpc
'
;
import
{
IWatcherChannel
,
WatcherChannelClient
}
from
'
vs/workbench/services/files/node/watcher/unix/watcherIpc
'
;
import
{
FileChangesEvent
,
IFilesConfiguration
}
from
'
vs/platform/files/common/files
'
;
import
{
FileChangesEvent
,
IFilesConfiguration
}
from
'
vs/platform/files/common/files
'
;
...
@@ -17,6 +16,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
...
@@ -17,6 +16,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
import
{
Schemas
}
from
'
vs/base/common/network
'
;
import
{
Schemas
}
from
'
vs/base/common/network
'
;
import
{
filterEvent
}
from
'
vs/base/common/event
'
;
import
{
filterEvent
}
from
'
vs/base/common/event
'
;
import
{
IWatchError
}
from
'
vs/workbench/services/files/node/watcher/unix/watcher
'
;
import
{
IWatchError
}
from
'
vs/workbench/services/files/node/watcher/unix/watcher
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
export
class
FileWatcher
{
export
class
FileWatcher
{
private
static
readonly
MAX_RESTARTS
=
5
;
private
static
readonly
MAX_RESTARTS
=
5
;
...
@@ -42,7 +42,7 @@ export class FileWatcher {
...
@@ -42,7 +42,7 @@ export class FileWatcher {
const
args
=
[
'
--type=watcherService
'
];
const
args
=
[
'
--type=watcherService
'
];
const
client
=
new
Client
(
const
client
=
new
Client
(
uri
.
parse
(
require
.
toUrl
(
'
bootstrap
'
)).
fsPath
,
getPathFromAmdModule
(
require
,
'
bootstrap
'
)
,
{
{
serverName
:
'
Watcher
'
,
serverName
:
'
Watcher
'
,
args
,
args
,
...
...
src/vs/workbench/services/files/node/watcher/win32/csharpWatcherService.ts
浏览文件 @
36883965
...
@@ -10,9 +10,9 @@ import * as cp from 'child_process';
...
@@ -10,9 +10,9 @@ import * as cp from 'child_process';
import
{
FileChangeType
}
from
'
vs/platform/files/common/files
'
;
import
{
FileChangeType
}
from
'
vs/platform/files/common/files
'
;
import
*
as
decoder
from
'
vs/base/node/decoder
'
;
import
*
as
decoder
from
'
vs/base/node/decoder
'
;
import
*
as
glob
from
'
vs/base/common/glob
'
;
import
*
as
glob
from
'
vs/base/common/glob
'
;
import
uri
from
'
vs/base/common/uri
'
;
import
{
IRawFileChange
}
from
'
vs/workbench/services/files/node/watcher/common
'
;
import
{
IRawFileChange
}
from
'
vs/workbench/services/files/node/watcher/common
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
export
class
OutOfProcessWin32FolderWatcher
{
export
class
OutOfProcessWin32FolderWatcher
{
...
@@ -41,7 +41,7 @@ export class OutOfProcessWin32FolderWatcher {
...
@@ -41,7 +41,7 @@ export class OutOfProcessWin32FolderWatcher {
args
.
push
(
'
-verbose
'
);
args
.
push
(
'
-verbose
'
);
}
}
this
.
handle
=
cp
.
spawn
(
uri
.
parse
(
require
.
toUrl
(
'
vs/workbench/services/files/node/watcher/win32/CodeHelper.exe
'
)).
fsPath
,
args
);
this
.
handle
=
cp
.
spawn
(
getPathFromAmdModule
(
require
,
'
vs/workbench/services/files/node/watcher/win32/CodeHelper.exe
'
)
,
args
);
const
stdoutLineDecoder
=
new
decoder
.
LineDecoder
();
const
stdoutLineDecoder
=
new
decoder
.
LineDecoder
();
...
...
src/vs/workbench/services/search/node/searchService.ts
浏览文件 @
36883965
...
@@ -26,6 +26,7 @@ import { IExtensionService } from 'vs/workbench/services/extensions/common/exten
...
@@ -26,6 +26,7 @@ import { IExtensionService } from 'vs/workbench/services/extensions/common/exten
import
{
IUntitledEditorService
}
from
'
vs/workbench/services/untitled/common/untitledEditorService
'
;
import
{
IUntitledEditorService
}
from
'
vs/workbench/services/untitled/common/untitledEditorService
'
;
import
{
IRawSearch
,
IRawSearchService
,
ISerializedFileMatch
,
ISerializedSearchComplete
,
ISerializedSearchProgressItem
,
isSerializedSearchComplete
,
isSerializedSearchSuccess
,
ITelemetryEvent
}
from
'
./search
'
;
import
{
IRawSearch
,
IRawSearchService
,
ISerializedFileMatch
,
ISerializedSearchComplete
,
ISerializedSearchProgressItem
,
isSerializedSearchComplete
,
isSerializedSearchSuccess
,
ITelemetryEvent
}
from
'
./search
'
;
import
{
ISearchChannel
,
SearchChannelClient
}
from
'
./searchIpc
'
;
import
{
ISearchChannel
,
SearchChannelClient
}
from
'
./searchIpc
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
export
class
SearchService
extends
Disposable
implements
ISearchService
{
export
class
SearchService
extends
Disposable
implements
ISearchService
{
public
_serviceBrand
:
any
;
public
_serviceBrand
:
any
;
...
@@ -331,7 +332,7 @@ export class DiskSearch implements ISearchResultProvider {
...
@@ -331,7 +332,7 @@ export class DiskSearch implements ISearchResultProvider {
}
}
const
client
=
new
Client
(
const
client
=
new
Client
(
uri
.
parse
(
require
.
toUrl
(
'
bootstrap
'
)).
fsPath
,
getPathFromAmdModule
(
require
,
'
bootstrap
'
)
,
opts
);
opts
);
const
channel
=
getNextTickChannel
(
client
.
getChannel
<
ISearchChannel
>
(
'
search
'
));
const
channel
=
getNextTickChannel
(
client
.
getChannel
<
ISearchChannel
>
(
'
search
'
));
...
...
src/vs/workbench/services/search/node/textSearchWorkerProvider.ts
浏览文件 @
36883965
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
import
*
as
os
from
'
os
'
;
import
*
as
os
from
'
os
'
;
import
uri
from
'
vs/base/common/uri
'
;
import
*
as
ipc
from
'
vs/base/parts/ipc/common/ipc
'
;
import
*
as
ipc
from
'
vs/base/parts/ipc/common/ipc
'
;
import
{
Client
}
from
'
vs/base/parts/ipc/node/ipc.cp
'
;
import
{
Client
}
from
'
vs/base/parts/ipc/node/ipc.cp
'
;
import
{
ISearchWorker
,
ISearchWorkerChannel
,
SearchWorkerChannelClient
}
from
'
./worker/searchWorkerIpc
'
;
import
{
ISearchWorker
,
ISearchWorkerChannel
,
SearchWorkerChannelClient
}
from
'
./worker/searchWorkerIpc
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
export
interface
ITextSearchWorkerProvider
{
export
interface
ITextSearchWorkerProvider
{
getWorkers
():
ISearchWorker
[];
getWorkers
():
ISearchWorker
[];
...
@@ -31,7 +31,7 @@ export class TextSearchWorkerProvider implements ITextSearchWorkerProvider {
...
@@ -31,7 +31,7 @@ export class TextSearchWorkerProvider implements ITextSearchWorkerProvider {
private
createWorker
():
void
{
private
createWorker
():
void
{
let
client
=
new
Client
(
let
client
=
new
Client
(
uri
.
parse
(
require
.
toUrl
(
'
bootstrap
'
)).
fsPath
,
getPathFromAmdModule
(
require
,
'
bootstrap
'
)
,
{
{
serverName
:
'
Search Worker
'
+
this
.
workers
.
length
,
serverName
:
'
Search Worker
'
+
this
.
workers
.
length
,
args
:
[
'
--type=searchWorker
'
],
args
:
[
'
--type=searchWorker
'
],
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录