Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
04750498
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,发现更多精彩内容 >>
提交
04750498
编写于
2月 22, 2018
作者:
S
Sandeep Somavarapu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix #43271
上级
ca58c21b
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
29 addition
and
15 deletion
+29
-15
extensions/log/package.json
extensions/log/package.json
+0
-5
src/vs/workbench/parts/output/common/output.ts
src/vs/workbench/parts/output/common/output.ts
+13
-3
src/vs/workbench/parts/output/common/outputLinkProvider.ts
src/vs/workbench/parts/output/common/outputLinkProvider.ts
+2
-2
src/vs/workbench/parts/output/electron-browser/output.contribution.ts
...ench/parts/output/electron-browser/output.contribution.ts
+9
-1
src/vs/workbench/parts/output/electron-browser/outputServices.ts
...workbench/parts/output/electron-browser/outputServices.ts
+5
-4
未找到文件。
extensions/log/package.json
浏览文件 @
04750498
...
...
@@ -24,11 +24,6 @@
}
],
"grammars"
:
[
{
"language"
:
"Log"
,
"scopeName"
:
"text.log"
,
"path"
:
"./syntaxes/log.tmLanguage.json"
},
{
"language"
:
"log"
,
"scopeName"
:
"text.log"
,
...
...
src/vs/workbench/parts/output/common/output.ts
浏览文件 @
04750498
...
...
@@ -22,14 +22,24 @@ export const OUTPUT_MIME = 'text/x-code-output';
export
const
OUTPUT_SCHEME
=
'
output
'
;
/**
* Output resource scheme.
* Id used by the output editor.
*/
export
const
OUTPUT_MODE_ID
=
'
Log
'
;
/**
* Mime type used by the log output editor.
*/
export
const
LOG_MIME
=
'
text/x-code-log-output
'
;
/**
* Log resource scheme.
*/
export
const
LOG_SCHEME
=
'
log
'
;
/**
* Id used by the output editor.
* Id used by the
log
output editor.
*/
export
const
OUTPUT_MODE_ID
=
'
L
og
'
;
export
const
LOG_MODE_ID
=
'
l
og
'
;
/**
* Output panel id
...
...
src/vs/workbench/parts/output/common/outputLinkProvider.ts
浏览文件 @
04750498
...
...
@@ -11,7 +11,7 @@ import { RunOnceScheduler, wireCancellationToken } from 'vs/base/common/async';
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
import
{
LinkProviderRegistry
,
ILink
}
from
'
vs/editor/common/modes
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
OUTPUT_MODE_ID
}
from
'
vs/workbench/parts/output/common/output
'
;
import
{
OUTPUT_MODE_ID
,
LOG_MODE_ID
}
from
'
vs/workbench/parts/output/common/output
'
;
import
{
MonacoWebWorker
,
createWebWorker
}
from
'
vs/editor/common/services/webWorker
'
;
import
{
ICreateData
,
OutputLinkComputer
}
from
'
vs/workbench/parts/output/common/outputLinkComputer
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
...
...
@@ -44,7 +44,7 @@ export class OutputLinkProvider {
const
folders
=
this
.
contextService
.
getWorkspace
().
folders
;
if
(
folders
.
length
>
0
)
{
if
(
!
this
.
linkProviderRegistration
)
{
this
.
linkProviderRegistration
=
LinkProviderRegistry
.
register
(
{
language
:
OUTPUT_MODE_ID
,
scheme
:
'
*
'
}
,
{
this
.
linkProviderRegistration
=
LinkProviderRegistry
.
register
(
[{
language
:
OUTPUT_MODE_ID
,
scheme
:
'
*
'
},
{
language
:
LOG_MODE_ID
,
scheme
:
'
*
'
}]
,
{
provideLinks
:
(
model
,
token
):
Thenable
<
ILink
[]
>
=>
{
return
wireCancellationToken
(
token
,
this
.
provideLinks
(
model
.
uri
));
}
...
...
src/vs/workbench/parts/output/electron-browser/output.contribution.ts
浏览文件 @
04750498
...
...
@@ -13,7 +13,7 @@ import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import
{
IWorkbenchActionRegistry
,
Extensions
as
ActionExtensions
}
from
'
vs/workbench/common/actions
'
;
import
{
OutputService
,
LogContentProvider
}
from
'
vs/workbench/parts/output/electron-browser/outputServices
'
;
import
{
ToggleOutputAction
,
ClearOutputAction
}
from
'
vs/workbench/parts/output/browser/outputActions
'
;
import
{
OUTPUT_MODE_ID
,
OUTPUT_MIME
,
OUTPUT_PANEL_ID
,
IOutputService
,
CONTEXT_IN_OUTPUT
,
LOG_SCHEME
,
COMMAND_OPEN_LOG_VIEWER
}
from
'
vs/workbench/parts/output/common/output
'
;
import
{
OUTPUT_MODE_ID
,
OUTPUT_MIME
,
OUTPUT_PANEL_ID
,
IOutputService
,
CONTEXT_IN_OUTPUT
,
LOG_SCHEME
,
COMMAND_OPEN_LOG_VIEWER
,
LOG_MODE_ID
,
LOG_MIME
}
from
'
vs/workbench/parts/output/common/output
'
;
import
{
PanelRegistry
,
Extensions
,
PanelDescriptor
}
from
'
vs/workbench/browser/panel
'
;
import
{
CommandsRegistry
,
ICommandHandler
}
from
'
vs/platform/commands/common/commands
'
;
import
{
ContextKeyExpr
}
from
'
vs/platform/contextkey/common/contextkey
'
;
...
...
@@ -39,6 +39,14 @@ ModesRegistry.registerLanguage({
mimetypes
:
[
OUTPUT_MIME
]
});
// Register Log Output Mode
ModesRegistry
.
registerLanguage
({
id
:
LOG_MODE_ID
,
extensions
:
[],
aliases
:
[
null
],
mimetypes
:
[
LOG_MIME
]
});
// Register Output Panel
Registry
.
as
<
PanelRegistry
>
(
Extensions
.
Panels
).
registerPanel
(
new
PanelDescriptor
(
OutputPanel
,
...
...
src/vs/workbench/parts/output/electron-browser/outputServices.ts
浏览文件 @
04750498
...
...
@@ -16,7 +16,7 @@ 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
{
IOutputChannelIdentifier
,
IOutputChannel
,
IOutputService
,
Extensions
,
OUTPUT_PANEL_ID
,
IOutputChannelRegistry
,
OUTPUT_SCHEME
,
OUTPUT_MIME
,
MAX_OUTPUT_LENGTH
,
LOG_SCHEME
}
from
'
vs/workbench/parts/output/common/output
'
;
import
{
IOutputChannelIdentifier
,
IOutputChannel
,
IOutputService
,
Extensions
,
OUTPUT_PANEL_ID
,
IOutputChannelRegistry
,
OUTPUT_SCHEME
,
OUTPUT_MIME
,
MAX_OUTPUT_LENGTH
,
LOG_SCHEME
,
LOG_MIME
}
from
'
vs/workbench/parts/output/common/output
'
;
import
{
OutputPanel
}
from
'
vs/workbench/parts/output/browser/outputPanel
'
;
import
{
IPanelService
}
from
'
vs/workbench/services/panel/common/panelService
'
;
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
...
...
@@ -134,6 +134,7 @@ abstract class AbstractFileOutputChannel extends Disposable {
constructor
(
protected
readonly
outputChannelIdentifier
:
IOutputChannelIdentifier
,
private
readonly
modelUri
:
URI
,
private
mimeType
:
string
,
protected
fileService
:
IFileService
,
protected
modelService
:
IModelService
,
protected
modeService
:
IModeService
,
...
...
@@ -166,7 +167,7 @@ abstract class AbstractFileOutputChannel extends Disposable {
if
(
this
.
model
)
{
this
.
model
.
setValue
(
content
);
}
else
{
this
.
model
=
this
.
modelService
.
createModel
(
content
,
this
.
modeService
.
getOrCreateMode
(
OUTPUT_MIME
),
this
.
modelUri
);
this
.
model
=
this
.
modelService
.
createModel
(
content
,
this
.
modeService
.
getOrCreateMode
(
this
.
mimeType
),
this
.
modelUri
);
this
.
onModelCreated
(
this
.
model
);
const
disposables
:
IDisposable
[]
=
[];
disposables
.
push
(
this
.
model
.
onWillDispose
(()
=>
{
...
...
@@ -217,7 +218,7 @@ class OutputChannelBackedByFile extends AbstractFileOutputChannel implements Out
@
IModeService
modeService
:
IModeService
,
@
ILogService
logService
:
ILogService
)
{
super
({
...
outputChannelIdentifier
,
file
:
URI
.
file
(
paths
.
join
(
outputDir
,
`
${
outputChannelIdentifier
.
id
}
.log`
))
},
modelUri
,
fileService
,
modelService
,
modeService
);
super
({
...
outputChannelIdentifier
,
file
:
URI
.
file
(
paths
.
join
(
outputDir
,
`
${
outputChannelIdentifier
.
id
}
.log`
))
},
modelUri
,
OUTPUT_MIME
,
fileService
,
modelService
,
modeService
);
// Use one rotating file to check for main file reset
this
.
outputWriter
=
new
RotatingLogger
(
this
.
id
,
this
.
file
.
fsPath
,
1024
*
1024
*
30
,
1
);
...
...
@@ -363,7 +364,7 @@ class FileOutputChannel extends AbstractFileOutputChannel implements OutputChann
@
IModeService
modeService
:
IModeService
,
@
ILogService
logService
:
ILogService
,
)
{
super
(
outputChannelIdentifier
,
modelUri
,
fileService
,
modelService
,
modeService
);
super
(
outputChannelIdentifier
,
modelUri
,
LOG_MIME
,
fileService
,
modelService
,
modeService
);
this
.
fileHandler
=
this
.
_register
(
new
OutputFileListener
(
this
.
file
));
this
.
_register
(
this
.
fileHandler
.
onDidContentChange
(()
=>
this
.
onDidContentChange
()));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录