Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
e4162e38
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,发现更多精彩内容 >>
提交
e4162e38
编写于
12月 11, 2019
作者:
S
Sandeep Somavarapu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
move output channel registry to workbench services
上级
26c955f0
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
97 addition
and
86 deletion
+97
-86
src/vs/workbench/api/browser/mainThreadOutputService.ts
src/vs/workbench/api/browser/mainThreadOutputService.ts
+2
-1
src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts
...nch/contrib/extensions/browser/extensions.contribution.ts
+1
-1
src/vs/workbench/contrib/logs/common/logs.contribution.ts
src/vs/workbench/contrib/logs/common/logs.contribution.ts
+1
-1
src/vs/workbench/contrib/output/browser/logViewer.ts
src/vs/workbench/contrib/output/browser/logViewer.ts
+2
-1
src/vs/workbench/contrib/output/browser/outputActions.ts
src/vs/workbench/contrib/output/browser/outputActions.ts
+2
-1
src/vs/workbench/contrib/output/browser/outputServices.ts
src/vs/workbench/contrib/output/browser/outputServices.ts
+2
-1
src/vs/workbench/contrib/output/common/output.ts
src/vs/workbench/contrib/output/common/output.ts
+2
-78
src/vs/workbench/contrib/remote/common/remote.contribution.ts
...vs/workbench/contrib/remote/common/remote.contribution.ts
+1
-1
src/vs/workbench/contrib/tasks/browser/task.contribution.ts
src/vs/workbench/contrib/tasks/browser/task.contribution.ts
+1
-1
src/vs/workbench/services/output/common/output.ts
src/vs/workbench/services/output/common/output.ts
+83
-0
未找到文件。
src/vs/workbench/api/browser/mainThreadOutputService.ts
浏览文件 @
e4162e38
...
...
@@ -4,7 +4,8 @@
*--------------------------------------------------------------------------------------------*/
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
IOutputService
,
IOutputChannel
,
OUTPUT_PANEL_ID
,
Extensions
,
IOutputChannelRegistry
}
from
'
vs/workbench/contrib/output/common/output
'
;
import
{
IOutputService
,
IOutputChannel
,
OUTPUT_PANEL_ID
}
from
'
vs/workbench/contrib/output/common/output
'
;
import
{
Extensions
,
IOutputChannelRegistry
}
from
'
vs/workbench/services/output/common/output
'
;
import
{
IWorkbenchLayoutService
}
from
'
vs/workbench/services/layout/browser/layoutService
'
;
import
{
IPanelService
}
from
'
vs/workbench/services/panel/common/panelService
'
;
import
{
MainThreadOutputServiceShape
,
MainContext
,
IExtHostContext
,
ExtHostOutputServiceShape
,
ExtHostContext
}
from
'
../common/extHost.protocol
'
;
...
...
src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts
浏览文件 @
e4162e38
...
...
@@ -12,7 +12,7 @@ import { ExtensionsLabel, ExtensionsChannelId, PreferencesLabel, IExtensionManag
import
{
IExtensionManagementServerService
,
IExtensionTipsService
}
from
'
vs/workbench/services/extensionManagement/common/extensionManagement
'
;
import
{
IWorkbenchActionRegistry
,
Extensions
as
WorkbenchActionExtensions
}
from
'
vs/workbench/common/actions
'
;
import
{
IWorkbenchContributionsRegistry
,
Extensions
as
WorkbenchExtensions
,
IWorkbenchContribution
}
from
'
vs/workbench/common/contributions
'
;
import
{
IOutputChannelRegistry
,
Extensions
as
OutputExtensions
}
from
'
vs/workbench/
contrib
/output/common/output
'
;
import
{
IOutputChannelRegistry
,
Extensions
as
OutputExtensions
}
from
'
vs/workbench/
services
/output/common/output
'
;
import
{
SyncDescriptor
}
from
'
vs/platform/instantiation/common/descriptors
'
;
import
{
VIEWLET_ID
,
IExtensionsWorkbenchService
}
from
'
vs/workbench/contrib/extensions/common/extensions
'
;
import
{
ExtensionsWorkbenchService
}
from
'
vs/workbench/contrib/extensions/browser/extensionsWorkbenchService
'
;
...
...
src/vs/workbench/contrib/logs/common/logs.contribution.ts
浏览文件 @
e4162e38
...
...
@@ -14,7 +14,7 @@ import { IWorkbenchContribution, IWorkbenchContributionsRegistry, Extensions as
import
{
IWorkbenchEnvironmentService
}
from
'
vs/workbench/services/environment/common/environmentService
'
;
import
{
IFileService
,
FileChangeType
,
whenProviderRegistered
}
from
'
vs/platform/files/common/files
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
IOutputChannelRegistry
,
Extensions
as
OutputExt
}
from
'
vs/workbench/
contrib
/output/common/output
'
;
import
{
IOutputChannelRegistry
,
Extensions
as
OutputExt
}
from
'
vs/workbench/
services
/output/common/output
'
;
import
{
Disposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
ILogService
,
LogLevel
}
from
'
vs/platform/log/common/log
'
;
import
{
dirname
}
from
'
vs/base/common/resources
'
;
...
...
src/vs/workbench/contrib/output/browser/logViewer.ts
浏览文件 @
e4162e38
...
...
@@ -14,7 +14,8 @@ import { IThemeService } from 'vs/platform/theme/common/themeService';
import
{
ResourceEditorInput
}
from
'
vs/workbench/common/editor/resourceEditorInput
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
ITextModelService
}
from
'
vs/editor/common/services/resolverService
'
;
import
{
LOG_SCHEME
,
IFileOutputChannelDescriptor
}
from
'
vs/workbench/contrib/output/common/output
'
;
import
{
LOG_SCHEME
}
from
'
vs/workbench/contrib/output/common/output
'
;
import
{
IFileOutputChannelDescriptor
}
from
'
vs/workbench/services/output/common/output
'
;
import
{
IEditorGroupsService
}
from
'
vs/workbench/services/editor/common/editorGroupsService
'
;
import
{
IEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
...
...
src/vs/workbench/contrib/output/browser/outputActions.ts
浏览文件 @
e4162e38
...
...
@@ -6,7 +6,8 @@
import
*
as
nls
from
'
vs/nls
'
;
import
*
as
aria
from
'
vs/base/browser/ui/aria/aria
'
;
import
{
IAction
,
Action
}
from
'
vs/base/common/actions
'
;
import
{
IOutputService
,
OUTPUT_PANEL_ID
,
IOutputChannelRegistry
,
Extensions
as
OutputExt
,
IOutputChannelDescriptor
,
IFileOutputChannelDescriptor
}
from
'
vs/workbench/contrib/output/common/output
'
;
import
{
IOutputChannelRegistry
,
Extensions
as
OutputExt
,
IOutputChannelDescriptor
,
IFileOutputChannelDescriptor
}
from
'
vs/workbench/services/output/common/output
'
;
import
{
IOutputService
,
OUTPUT_PANEL_ID
}
from
'
vs/workbench/contrib/output/common/output
'
;
import
{
SelectActionViewItem
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
IWorkbenchLayoutService
}
from
'
vs/workbench/services/layout/browser/layoutService
'
;
import
{
IPanelService
}
from
'
vs/workbench/services/panel/common/panelService
'
;
...
...
src/vs/workbench/contrib/output/browser/outputServices.ts
浏览文件 @
e4162e38
...
...
@@ -11,7 +11,8 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
EditorOptions
}
from
'
vs/workbench/common/editor
'
;
import
{
IOutputChannelDescriptor
,
IOutputChannel
,
IOutputService
,
Extensions
,
OUTPUT_PANEL_ID
,
IOutputChannelRegistry
,
OUTPUT_SCHEME
,
LOG_SCHEME
,
CONTEXT_ACTIVE_LOG_OUTPUT
,
LOG_MIME
,
OUTPUT_MIME
}
from
'
vs/workbench/contrib/output/common/output
'
;
import
{
IOutputChannel
,
IOutputService
,
OUTPUT_PANEL_ID
,
OUTPUT_SCHEME
,
LOG_SCHEME
,
CONTEXT_ACTIVE_LOG_OUTPUT
,
LOG_MIME
,
OUTPUT_MIME
}
from
'
vs/workbench/contrib/output/common/output
'
;
import
{
IOutputChannelDescriptor
,
Extensions
,
IOutputChannelRegistry
}
from
'
vs/workbench/services/output/common/output
'
;
import
{
OutputPanel
}
from
'
vs/workbench/contrib/output/browser/outputPanel
'
;
import
{
IPanelService
}
from
'
vs/workbench/services/panel/common/panelService
'
;
import
{
OutputLinkProvider
}
from
'
vs/workbench/contrib/output/common/outputLinkProvider
'
;
...
...
src/vs/workbench/contrib/output/common/output.ts
浏览文件 @
e4162e38
...
...
@@ -3,11 +3,10 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
Event
,
Emitter
}
from
'
vs/base/common/event
'
;
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
Event
}
from
'
vs/base/common/event
'
;
import
{
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
RawContextKey
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
IOutputChannelDescriptor
}
from
'
vs/workbench/services/output/common/output
'
;
/**
* Mime type used by the output editor.
...
...
@@ -44,10 +43,6 @@ export const LOG_MODE_ID = 'log';
*/
export
const
OUTPUT_PANEL_ID
=
'
workbench.panel.output
'
;
export
const
Extensions
=
{
OutputChannels
:
'
workbench.contributions.outputChannels
'
};
export
const
OUTPUT_SERVICE_ID
=
'
outputService
'
;
export
const
MAX_OUTPUT_LENGTH
=
10000
/* Max. number of output lines to show in output */
*
100
/* Guestimated chars per line */
;
...
...
@@ -129,74 +124,3 @@ export interface IOutputChannel {
*/
dispose
():
void
;
}
export
interface
IOutputChannelDescriptor
{
id
:
string
;
label
:
string
;
log
:
boolean
;
file
?:
URI
;
}
export
interface
IFileOutputChannelDescriptor
extends
IOutputChannelDescriptor
{
file
:
URI
;
}
export
interface
IOutputChannelRegistry
{
readonly
onDidRegisterChannel
:
Event
<
string
>
;
readonly
onDidRemoveChannel
:
Event
<
string
>
;
/**
* Make an output channel known to the output world.
*/
registerChannel
(
descriptor
:
IOutputChannelDescriptor
):
void
;
/**
* Returns the list of channels known to the output world.
*/
getChannels
():
IOutputChannelDescriptor
[];
/**
* Returns the channel with the passed id.
*/
getChannel
(
id
:
string
):
IOutputChannelDescriptor
|
undefined
;
/**
* Remove the output channel with the passed id.
*/
removeChannel
(
id
:
string
):
void
;
}
class
OutputChannelRegistry
implements
IOutputChannelRegistry
{
private
channels
=
new
Map
<
string
,
IOutputChannelDescriptor
>
();
private
readonly
_onDidRegisterChannel
=
new
Emitter
<
string
>
();
readonly
onDidRegisterChannel
:
Event
<
string
>
=
this
.
_onDidRegisterChannel
.
event
;
private
readonly
_onDidRemoveChannel
=
new
Emitter
<
string
>
();
readonly
onDidRemoveChannel
:
Event
<
string
>
=
this
.
_onDidRemoveChannel
.
event
;
public
registerChannel
(
descriptor
:
IOutputChannelDescriptor
):
void
{
if
(
!
this
.
channels
.
has
(
descriptor
.
id
))
{
this
.
channels
.
set
(
descriptor
.
id
,
descriptor
);
this
.
_onDidRegisterChannel
.
fire
(
descriptor
.
id
);
}
}
public
getChannels
():
IOutputChannelDescriptor
[]
{
const
result
:
IOutputChannelDescriptor
[]
=
[];
this
.
channels
.
forEach
(
value
=>
result
.
push
(
value
));
return
result
;
}
public
getChannel
(
id
:
string
):
IOutputChannelDescriptor
|
undefined
{
return
this
.
channels
.
get
(
id
);
}
public
removeChannel
(
id
:
string
):
void
{
this
.
channels
.
delete
(
id
);
this
.
_onDidRemoveChannel
.
fire
(
id
);
}
}
Registry
.
add
(
Extensions
.
OutputChannels
,
new
OutputChannelRegistry
());
\ No newline at end of file
src/vs/workbench/contrib/remote/common/remote.contribution.ts
浏览文件 @
e4162e38
...
...
@@ -12,7 +12,7 @@ import { Schemas } from 'vs/base/common/network';
import
{
IRemoteAgentService
,
RemoteExtensionLogFileName
}
from
'
vs/workbench/services/remote/common/remoteAgentService
'
;
import
{
ILogService
}
from
'
vs/platform/log/common/log
'
;
import
{
LoggerChannelClient
}
from
'
vs/platform/log/common/logIpc
'
;
import
{
IOutputChannelRegistry
,
Extensions
as
OutputExt
,
}
from
'
vs/workbench/
contrib
/output/common/output
'
;
import
{
IOutputChannelRegistry
,
Extensions
as
OutputExt
,
}
from
'
vs/workbench/
services
/output/common/output
'
;
import
{
localize
}
from
'
vs/nls
'
;
import
{
joinPath
}
from
'
vs/base/common/resources
'
;
import
{
Disposable
}
from
'
vs/base/common/lifecycle
'
;
...
...
src/vs/workbench/contrib/tasks/browser/task.contribution.ts
浏览文件 @
e4162e38
...
...
@@ -20,7 +20,7 @@ import { IJSONSchema } from 'vs/base/common/jsonSchema';
import
{
StatusbarAlignment
,
IStatusbarService
,
IStatusbarEntryAccessor
,
IStatusbarEntry
}
from
'
vs/workbench/services/statusbar/common/statusbar
'
;
import
{
IQuickOpenRegistry
,
Extensions
as
QuickOpenExtensions
,
QuickOpenHandlerDescriptor
}
from
'
vs/workbench/browser/quickopen
'
;
import
{
IOutputChannelRegistry
,
Extensions
as
OutputExt
}
from
'
vs/workbench/
contrib
/output/common/output
'
;
import
{
IOutputChannelRegistry
,
Extensions
as
OutputExt
}
from
'
vs/workbench/
services
/output/common/output
'
;
import
{
Scope
,
IActionBarRegistry
,
Extensions
as
ActionBarExtensions
}
from
'
vs/workbench/browser/actions
'
;
import
{
TaskEvent
,
TaskEventKind
,
TaskGroup
,
TASK_RUNNING_STATE
}
from
'
vs/workbench/contrib/tasks/common/tasks
'
;
...
...
src/vs/workbench/services/output/common/output.ts
0 → 100644
浏览文件 @
e4162e38
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
Event
,
Emitter
}
from
'
vs/base/common/event
'
;
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
export
const
Extensions
=
{
OutputChannels
:
'
workbench.contributions.outputChannels
'
};
export
interface
IOutputChannelDescriptor
{
id
:
string
;
label
:
string
;
log
:
boolean
;
file
?:
URI
;
}
export
interface
IFileOutputChannelDescriptor
extends
IOutputChannelDescriptor
{
file
:
URI
;
}
export
interface
IOutputChannelRegistry
{
readonly
onDidRegisterChannel
:
Event
<
string
>
;
readonly
onDidRemoveChannel
:
Event
<
string
>
;
/**
* Make an output channel known to the output world.
*/
registerChannel
(
descriptor
:
IOutputChannelDescriptor
):
void
;
/**
* Returns the list of channels known to the output world.
*/
getChannels
():
IOutputChannelDescriptor
[];
/**
* Returns the channel with the passed id.
*/
getChannel
(
id
:
string
):
IOutputChannelDescriptor
|
undefined
;
/**
* Remove the output channel with the passed id.
*/
removeChannel
(
id
:
string
):
void
;
}
class
OutputChannelRegistry
implements
IOutputChannelRegistry
{
private
channels
=
new
Map
<
string
,
IOutputChannelDescriptor
>
();
private
readonly
_onDidRegisterChannel
=
new
Emitter
<
string
>
();
readonly
onDidRegisterChannel
:
Event
<
string
>
=
this
.
_onDidRegisterChannel
.
event
;
private
readonly
_onDidRemoveChannel
=
new
Emitter
<
string
>
();
readonly
onDidRemoveChannel
:
Event
<
string
>
=
this
.
_onDidRemoveChannel
.
event
;
public
registerChannel
(
descriptor
:
IOutputChannelDescriptor
):
void
{
if
(
!
this
.
channels
.
has
(
descriptor
.
id
))
{
this
.
channels
.
set
(
descriptor
.
id
,
descriptor
);
this
.
_onDidRegisterChannel
.
fire
(
descriptor
.
id
);
}
}
public
getChannels
():
IOutputChannelDescriptor
[]
{
const
result
:
IOutputChannelDescriptor
[]
=
[];
this
.
channels
.
forEach
(
value
=>
result
.
push
(
value
));
return
result
;
}
public
getChannel
(
id
:
string
):
IOutputChannelDescriptor
|
undefined
{
return
this
.
channels
.
get
(
id
);
}
public
removeChannel
(
id
:
string
):
void
{
this
.
channels
.
delete
(
id
);
this
.
_onDidRemoveChannel
.
fire
(
id
);
}
}
Registry
.
add
(
Extensions
.
OutputChannels
,
new
OutputChannelRegistry
());
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录