Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
c0a9bc39
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,发现更多精彩内容 >>
提交
c0a9bc39
编写于
7月 03, 2019
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixes #76209
上级
b736c9aa
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
9 addition
and
7 deletion
+9
-7
src/vs/workbench/browser/labels.ts
src/vs/workbench/browser/labels.ts
+6
-2
src/vs/workbench/contrib/files/browser/views/openEditorsView.ts
.../workbench/contrib/files/browser/views/openEditorsView.ts
+3
-2
src/vs/workbench/contrib/files/common/editors/fileEditorInput.ts
...workbench/contrib/files/common/editors/fileEditorInput.ts
+0
-3
未找到文件。
src/vs/workbench/browser/labels.ts
浏览文件 @
c0a9bc39
...
...
@@ -8,7 +8,7 @@ import * as resources from 'vs/base/common/resources';
import
{
IconLabel
,
IIconLabelValueOptions
,
IIconLabelCreationOptions
}
from
'
vs/base/browser/ui/iconLabel/iconLabel
'
;
import
{
IExtensionService
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
toResource
,
IEditorInput
,
SideBySideEditor
}
from
'
vs/workbench/common/editor
'
;
import
{
toResource
,
IEditorInput
,
SideBySideEditor
,
Verbosity
}
from
'
vs/workbench/common/editor
'
;
import
{
PLAINTEXT_MODE_ID
}
from
'
vs/editor/common/modes/modesRegistry
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
...
...
@@ -35,6 +35,7 @@ export interface IResourceLabelProps {
export
interface
IResourceLabelOptions
extends
IIconLabelValueOptions
{
fileKind
?:
FileKind
;
fileDecorations
?:
{
colors
:
boolean
,
badges
:
boolean
,
data
?:
IDecorationData
};
descriptionVerbosity
?:
Verbosity
;
}
export
interface
IFileLabelOptions
extends
IResourceLabelOptions
{
...
...
@@ -316,6 +317,9 @@ class ResourceLabelWidget extends IconLabel {
}
notifyFormattersChange
():
void
{
if
(
this
.
label
&&
this
.
label
.
resource
)
{
this
.
setFile
(
this
.
label
.
resource
,
this
.
options
);
}
this
.
render
(
false
);
}
...
...
@@ -362,7 +366,7 @@ class ResourceLabelWidget extends IconLabel {
this
.
setResource
({
resource
:
toResource
(
editor
,
{
supportSideBySide
:
SideBySideEditor
.
MASTER
}),
name
:
withNullAsUndefined
(
editor
.
getName
()),
description
:
withNullAsUndefined
(
editor
.
getDescription
())
description
:
withNullAsUndefined
(
editor
.
getDescription
(
options
?
options
.
descriptionVerbosity
:
undefined
))
},
options
);
}
...
...
src/vs/workbench/contrib/files/browser/views/openEditorsView.ts
浏览文件 @
c0a9bc39
...
...
@@ -12,7 +12,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import
{
IEditorGroupsService
,
IEditorGroup
,
GroupChangeKind
,
GroupsOrder
}
from
'
vs/workbench/services/editor/common/editorGroupsService
'
;
import
{
IConfigurationService
,
IConfigurationChangeEvent
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
IEditorInput
}
from
'
vs/workbench/common/editor
'
;
import
{
IEditorInput
,
Verbosity
}
from
'
vs/workbench/common/editor
'
;
import
{
SaveAllAction
,
SaveAllInGroupAction
,
CloseGroupAction
}
from
'
vs/workbench/contrib/files/browser/fileActions
'
;
import
{
OpenEditorsFocusedContext
,
ExplorerFocusedContext
,
IFilesConfiguration
,
OpenEditor
}
from
'
vs/workbench/contrib/files/common/files
'
;
import
{
ITextFileService
,
AutoSaveMode
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
...
...
@@ -570,7 +570,8 @@ class OpenEditorRenderer implements IListRenderer<OpenEditor, IOpenEditorTemplat
templateData
.
root
.
setEditor
(
editor
.
editor
,
{
italic
:
editor
.
isPreview
(),
extraClasses
:
[
'
open-editor
'
],
fileDecorations
:
this
.
configurationService
.
getValue
<
IFilesConfiguration
>
().
explorer
.
decorations
fileDecorations
:
this
.
configurationService
.
getValue
<
IFilesConfiguration
>
().
explorer
.
decorations
,
descriptionVerbosity
:
Verbosity
.
MEDIUM
});
}
...
...
src/vs/workbench/contrib/files/common/editors/fileEditorInput.ts
浏览文件 @
c0a9bc39
...
...
@@ -150,17 +150,14 @@ export class FileEditorInput extends EditorInput implements IFileEditorInput {
return
this
.
decorateLabel
(
this
.
name
);
}
@
memoize
private
get
shortDescription
():
string
{
return
basename
(
this
.
labelService
.
getUriLabel
(
dirname
(
this
.
resource
)));
}
@
memoize
private
get
mediumDescription
():
string
{
return
this
.
labelService
.
getUriLabel
(
dirname
(
this
.
resource
),
{
relative
:
true
});
}
@
memoize
private
get
longDescription
():
string
{
return
this
.
labelService
.
getUriLabel
(
dirname
(
this
.
resource
));
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录