Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
79f3ea1e
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,发现更多精彩内容 >>
提交
79f3ea1e
编写于
11月 13, 2017
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
startup - convert more to workbench contributions
上级
ecb2beb5
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
34 addition
and
34 deletion
+34
-34
src/vs/workbench/electron-browser/shell.ts
src/vs/workbench/electron-browser/shell.ts
+1
-6
src/vs/workbench/parts/cache/node/cache.contribution.ts
src/vs/workbench/parts/cache/node/cache.contribution.ts
+14
-0
src/vs/workbench/parts/cache/node/nodeCachedDataManager.ts
src/vs/workbench/parts/cache/node/nodeCachedDataManager.ts
+7
-2
src/vs/workbench/parts/stats/node/stats.contribution.ts
src/vs/workbench/parts/stats/node/stats.contribution.ts
+2
-2
src/vs/workbench/parts/stats/node/workspaceStats.ts
src/vs/workbench/parts/stats/node/workspaceStats.ts
+9
-24
src/vs/workbench/workbench.main.ts
src/vs/workbench/workbench.main.ts
+1
-0
未找到文件。
src/vs/workbench/electron-browser/shell.ts
浏览文件 @
79f3ea1e
...
...
@@ -67,7 +67,6 @@ import { WorkbenchModeServiceImpl } from 'vs/workbench/services/mode/common/work
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
IUntitledEditorService
,
UntitledEditorService
}
from
'
vs/workbench/services/untitled/common/untitledEditorService
'
;
import
{
ICrashReporterService
,
NullCrashReporterService
,
CrashReporterService
}
from
'
vs/workbench/services/crashReporter/electron-browser/crashReporterService
'
;
import
{
NodeCachedDataManager
}
from
'
vs/workbench/electron-browser/nodeCachedDataManager
'
;
import
{
getDelayedChannel
}
from
'
vs/base/parts/ipc/common/ipc
'
;
import
{
connect
as
connectNet
}
from
'
vs/base/parts/ipc/node/ipc.net
'
;
import
{
IExtensionManagementChannel
,
ExtensionManagementChannelClient
}
from
'
vs/platform/extensionManagement/common/extensionManagementIpc
'
;
...
...
@@ -253,11 +252,7 @@ export class WorkbenchShell {
this
.
messageService
.
show
(
Severity
.
Warning
,
nls
.
localize
(
'
runningAsRoot
'
,
"
It is recommended not to run Code as 'root'.
"
));
}
// Start cached data manager
instantiationService
.
createInstance
(
NodeCachedDataManager
);
// Set lifecycle phase to `Runnning` so that other contributions
// can now do something
// Set lifecycle phase to `Runnning` so that other contributions can now do something
this
.
lifecycleService
.
phase
=
LifecyclePhase
.
Running
;
}
...
...
src/vs/workbench/parts/cache/node/cache.contribution.ts
0 → 100644
浏览文件 @
79f3ea1e
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
IWorkbenchContributionsRegistry
,
Extensions
as
WorkbenchExtensions
}
from
'
vs/workbench/common/contributions
'
;
import
{
NodeCachedDataManager
}
from
'
vs/workbench/parts/cache/node/nodeCachedDataManager
'
;
import
{
LifecyclePhase
}
from
'
vs/platform/lifecycle/common/lifecycle
'
;
// Register NodeCachedDataManager Contribution
Registry
.
as
<
IWorkbenchContributionsRegistry
>
(
WorkbenchExtensions
.
Workbench
).
registerWorkbenchContribution
(
NodeCachedDataManager
,
LifecyclePhase
.
Running
);
\ No newline at end of file
src/vs/workbench/
electron-browser
/nodeCachedDataManager.ts
→
src/vs/workbench/
parts/cache/node
/nodeCachedDataManager.ts
浏览文件 @
79f3ea1e
...
...
@@ -6,21 +6,26 @@
import
{
basename
}
from
'
path
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IWorkbenchContribution
}
from
'
vs/workbench/common/contributions
'
;
declare
type
OnNodeCachedDataArgs
=
[{
errorCode
:
string
,
path
:
string
,
detail
?:
string
},
{
path
:
string
,
length
:
number
}];
declare
const
MonacoEnvironment
:
{
onNodeCachedData
:
OnNodeCachedDataArgs
[]
};
export
class
NodeCachedDataManager
{
export
class
NodeCachedDataManager
implements
IWorkbenchContribution
{
private
readonly
_telemetryService
:
ITelemetryService
;
constructor
(
@
ITelemetryService
telemetryService
:
ITelemetryService
,
@
ITelemetryService
telemetryService
:
ITelemetryService
)
{
this
.
_telemetryService
=
telemetryService
;
this
.
_handleCachedDataInfo
();
}
public
getId
():
string
{
return
'
vs.cache.nodeCachedDataManager
'
;
}
private
_handleCachedDataInfo
():
void
{
let
didRejectCachedData
=
false
;
...
...
src/vs/workbench/parts/stats/node/stats.contribution.ts
浏览文件 @
79f3ea1e
...
...
@@ -7,8 +7,8 @@
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
IWorkbenchContributionsRegistry
,
Extensions
as
WorkbenchExtensions
}
from
'
vs/workbench/common/contributions
'
;
import
{
WorkspaceStats
Reporter
}
from
'
vs/workbench/parts/stats/node/workspaceStats
'
;
import
{
WorkspaceStats
}
from
'
vs/workbench/parts/stats/node/workspaceStats
'
;
import
{
LifecyclePhase
}
from
'
vs/platform/lifecycle/common/lifecycle
'
;
// Register Workspace Stats Contribution
Registry
.
as
<
IWorkbenchContributionsRegistry
>
(
WorkbenchExtensions
.
Workbench
).
registerWorkbenchContribution
(
WorkspaceStatsReporter
,
LifecyclePhase
.
Running
);
\ No newline at end of file
Registry
.
as
<
IWorkbenchContributionsRegistry
>
(
WorkbenchExtensions
.
Workbench
).
registerWorkbenchContribution
(
WorkspaceStats
,
LifecyclePhase
.
Running
);
\ No newline at end of file
src/vs/workbench/parts/stats/node/workspaceStats.ts
浏览文件 @
79f3ea1e
...
...
@@ -15,7 +15,6 @@ import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
IWindowConfiguration
,
IWindowService
}
from
'
vs/platform/windows/common/windows
'
;
import
{
IWorkbenchContribution
}
from
'
vs/workbench/common/contributions
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
const
SshProtocolMatcher
=
/^
([^
@:
]
+@
)?([^
:
]
+
)
:/
;
const
SshUrlMatcher
=
/^
([^
@:
]
+@
)?([^
:
]
+
)
:
(
.+
)
$/
;
...
...
@@ -133,13 +132,20 @@ export function getHashedRemotes(text: string): string[] {
});
}
class
WorkspaceStats
{
export
class
WorkspaceStats
implements
IWorkbenchContribution
{
constructor
(
@
IFileService
private
fileService
:
IFileService
,
@
IWorkspaceContextService
private
contextService
:
IWorkspaceContextService
,
@
ITelemetryService
private
telemetryService
:
ITelemetryService
,
@
IEnvironmentService
private
environmentService
:
IEnvironmentService
@
IEnvironmentService
private
environmentService
:
IEnvironmentService
,
@
IWindowService
windowService
:
IWindowService
)
{
this
.
reportWorkspaceTags
(
windowService
.
getConfiguration
());
this
.
reportCloudStats
();
}
public
getId
():
string
{
return
'
vs.stats.workspaceStatsReporter
'
;
}
private
searchArray
(
arr
:
string
[],
regEx
:
RegExp
):
boolean
{
...
...
@@ -415,25 +421,4 @@ class WorkspaceStats {
this
.
reportAzure
(
uris
);
}
}
}
// Telemetry: workspace tags
export
class
WorkspaceStatsReporter
implements
IWorkbenchContribution
{
constructor
(
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
@
IWindowService
private
windowService
:
IWindowService
)
{
this
.
reportWorkspaceStats
();
}
public
getId
():
string
{
return
'
vs.backup.backupModelTracker
'
;
}
private
reportWorkspaceStats
():
void
{
const
workspaceStats
:
WorkspaceStats
=
this
.
instantiationService
.
createInstance
(
WorkspaceStats
);
workspaceStats
.
reportWorkspaceTags
(
this
.
windowService
.
getConfiguration
());
workspaceStats
.
reportCloudStats
();
}
}
\ No newline at end of file
src/vs/workbench/workbench.main.ts
浏览文件 @
79f3ea1e
...
...
@@ -43,6 +43,7 @@ import 'vs/workbench/parts/files/browser/files.contribution';
import
'
vs/workbench/parts/backup/common/backup.contribution
'
;
import
'
vs/workbench/parts/stats/node/stats.contribution
'
;
import
'
vs/workbench/parts/cache/node/cache.contribution
'
;
import
'
vs/workbench/parts/search/browser/search.contribution
'
;
import
'
vs/workbench/parts/search/browser/searchViewlet
'
;
// can be packaged separately
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录