Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
d66b0fd8
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
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,发现更多精彩内容 >>
提交
d66b0fd8
编写于
9月 20, 2016
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
icons: adopt in problems view
上级
4284156b
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
47 addition
and
20 deletion
+47
-20
src/vs/base/browser/ui/iconLabel/iconLabel.ts
src/vs/base/browser/ui/iconLabel/iconLabel.ts
+28
-8
src/vs/workbench/browser/labels.ts
src/vs/workbench/browser/labels.ts
+7
-3
src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts
src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts
+1
-1
src/vs/workbench/browser/parts/editor/tabsTitleControl.ts
src/vs/workbench/browser/parts/editor/tabsTitleControl.ts
+1
-1
src/vs/workbench/parts/files/browser/views/explorerViewer.ts
src/vs/workbench/parts/files/browser/views/explorerViewer.ts
+1
-1
src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts
.../workbench/parts/files/browser/views/openEditorsViewer.ts
+1
-1
src/vs/workbench/parts/markers/browser/markersPanel.ts
src/vs/workbench/parts/markers/browser/markersPanel.ts
+1
-0
src/vs/workbench/parts/markers/browser/markersTreeViewer.ts
src/vs/workbench/parts/markers/browser/markersTreeViewer.ts
+6
-4
src/vs/workbench/parts/search/browser/searchResultsView.ts
src/vs/workbench/parts/search/browser/searchResultsView.ts
+1
-1
未找到文件。
src/vs/base/browser/ui/iconLabel/iconLabel.ts
浏览文件 @
d66b0fd8
...
...
@@ -7,26 +7,33 @@
import
'
vs/css!./iconlabel
'
;
import
dom
=
require
(
'
vs/base/browser/dom
'
);
import
{
HighlightedLabel
}
from
'
vs/base/browser/ui/highlightedlabel/highlightedLabel
'
;
import
{
IMatch
}
from
'
vs/base/common/filters
'
;
export
interface
IIconLabelCreationOptions
{
supportHighlights
?:
boolean
;
}
export
interface
IIconLabelOptions
{
title
?:
string
;
extraClasses
?:
string
[];
italic
?:
boolean
;
matches
?:
IMatch
[];
}
export
class
IconLabel
{
private
domNode
:
HTMLElement
;
private
labelNode
:
HTMLElement
;
private
labelNode
:
HTMLElement
|
HighlightedLabel
;
private
descriptionNode
:
HTMLElement
;
constructor
(
container
:
HTMLElement
,
label
?:
string
,
description
?:
string
,
options
?:
IIconLabel
Options
)
{
constructor
(
container
:
HTMLElement
,
options
?:
IIconLabelCreation
Options
)
{
this
.
domNode
=
dom
.
append
(
container
,
dom
.
$
(
'
.monaco-icon-label
'
));
this
.
labelNode
=
dom
.
append
(
this
.
domNode
,
dom
.
$
(
'
a.label-name
'
));
this
.
descriptionNode
=
dom
.
append
(
this
.
domNode
,
dom
.
$
(
'
span.label-description
'
));
if
(
label
)
{
this
.
setValue
(
label
,
description
,
options
);
if
(
options
&&
options
.
supportHighlights
)
{
this
.
labelNode
=
new
HighlightedLabel
(
dom
.
append
(
this
.
domNode
,
dom
.
$
(
'
a.label-name
'
)));
}
else
{
this
.
labelNode
=
dom
.
append
(
this
.
domNode
,
dom
.
$
(
'
a.label-name
'
));
}
this
.
descriptionNode
=
dom
.
append
(
this
.
domNode
,
dom
.
$
(
'
span.label-description
'
));
}
public
getHTMLElement
():
HTMLElement
{
...
...
@@ -34,7 +41,13 @@ export class IconLabel {
}
public
setValue
(
label
?:
string
,
description
?:
string
,
options
?:
IIconLabelOptions
):
void
{
this
.
labelNode
.
textContent
=
label
||
''
;
const
labelNode
=
this
.
labelNode
;
if
(
labelNode
instanceof
HighlightedLabel
)
{
labelNode
.
set
(
label
||
''
,
options
?
options
.
matches
:
void
0
);
}
else
{
labelNode
.
textContent
=
label
||
''
;
}
this
.
descriptionNode
.
textContent
=
description
||
''
;
this
.
domNode
.
title
=
options
&&
options
.
title
?
options
.
title
:
''
;
...
...
@@ -52,4 +65,11 @@ export class IconLabel {
this
.
domNode
.
className
=
classes
.
join
(
'
'
);
}
public
dispose
():
void
{
const
labelNode
=
this
.
labelNode
;
if
(
labelNode
instanceof
HighlightedLabel
)
{
labelNode
.
dispose
();
}
}
}
\ No newline at end of file
src/vs/workbench/browser/labels.ts
浏览文件 @
d66b0fd8
...
...
@@ -7,7 +7,7 @@
import
uri
from
'
vs/base/common/uri
'
;
import
paths
=
require
(
'
vs/base/common/paths
'
);
import
{
IconLabel
,
IIconLabelOptions
}
from
'
vs/base/browser/ui/iconLabel/iconLabel
'
;
import
{
IconLabel
,
IIconLabelOptions
,
IIconLabelCreationOptions
}
from
'
vs/base/browser/ui/iconLabel/iconLabel
'
;
import
{
IExtensionService
}
from
'
vs/platform/extensions/common/extensions
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
IEditorInput
}
from
'
vs/platform/editor/common/editor
'
;
...
...
@@ -34,12 +34,13 @@ export class ResourceLabel extends IconLabel {
constructor
(
container
:
HTMLElement
,
options
:
IIconLabelCreationOptions
,
@
IExtensionService
private
extensionService
:
IExtensionService
,
@
IWorkspaceContextService
protected
contextService
:
IWorkspaceContextService
,
@
IConfigurationService
private
configurationService
:
IConfigurationService
,
@
IModeService
private
modeService
:
IModeService
)
{
super
(
container
);
super
(
container
,
options
);
this
.
toDispose
=
[];
...
...
@@ -85,8 +86,9 @@ export class ResourceLabel extends IconLabel {
}
const
italic
=
this
.
options
&&
this
.
options
.
italic
;
const
matches
=
this
.
options
&&
this
.
options
.
matches
;
this
.
setValue
(
this
.
label
.
name
,
this
.
label
.
description
,
{
title
,
extraClasses
,
italic
});
this
.
setValue
(
this
.
label
.
name
,
this
.
label
.
description
,
{
title
,
extraClasses
,
italic
,
matches
});
}
protected
getIconClasses
(
arg1
?:
uri
|
string
):
string
[]
{
...
...
@@ -129,6 +131,8 @@ export class ResourceLabel extends IconLabel {
}
public
dispose
():
void
{
super
.
dispose
();
this
.
toDispose
=
dispose
(
this
.
toDispose
);
this
.
label
=
void
0
;
this
.
options
=
void
0
;
...
...
src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts
浏览文件 @
d66b0fd8
...
...
@@ -41,7 +41,7 @@ export class NoTabsTitleControl extends TitleControl {
this
.
titleContainer
.
appendChild
(
this
.
titleDecoration
);
// Editor Label
this
.
editorLabel
=
this
.
instantiationService
.
createInstance
(
EditorLabel
,
this
.
titleContainer
);
this
.
editorLabel
=
this
.
instantiationService
.
createInstance
(
EditorLabel
,
this
.
titleContainer
,
void
0
);
this
.
toDispose
.
push
(
this
.
editorLabel
);
this
.
toDispose
.
push
(
DOM
.
addDisposableListener
(
this
.
editorLabel
.
getHTMLElement
(),
DOM
.
EventType
.
CLICK
,
(
e
:
MouseEvent
)
=>
this
.
onTitleLabelClick
(
e
)));
...
...
src/vs/workbench/browser/parts/editor/tabsTitleControl.ts
浏览文件 @
d66b0fd8
...
...
@@ -339,7 +339,7 @@ export class TabsTitleControl extends TitleControl {
tabContainers
.
push
(
tabContainer
);
// Tab Editor Label
const
editorLabel
=
this
.
instantiationService
.
createInstance
(
EditorLabel
,
tabContainer
);
const
editorLabel
=
this
.
instantiationService
.
createInstance
(
EditorLabel
,
tabContainer
,
void
0
);
this
.
editorLabels
.
push
(
editorLabel
);
// Tab Close
...
...
src/vs/workbench/parts/files/browser/views/explorerViewer.ts
浏览文件 @
d66b0fd8
...
...
@@ -295,7 +295,7 @@ export class FileRenderer extends ActionsRenderer implements IRenderer {
}
private
renderLabel
(
container
:
Builder
,
stat
:
FileStat
):
IElementCallback
{
const
label
=
this
.
instantiationService
.
createInstance
(
FileLabel
,
container
.
getHTMLElement
());
const
label
=
this
.
instantiationService
.
createInstance
(
FileLabel
,
container
.
getHTMLElement
()
,
void
0
);
const
extraClasses
=
[
'
explorer-item
'
];
label
.
setFile
(
stat
.
resource
,
{
hidePath
:
true
,
isFolder
:
stat
.
isDirectory
,
extraClasses
});
...
...
src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts
浏览文件 @
d66b0fd8
...
...
@@ -158,7 +158,7 @@ export class Renderer implements IRenderer {
editorTemplate
.
container
=
container
;
editorTemplate
.
actionBar
=
new
ActionBar
(
container
);
editorTemplate
.
actionBar
.
push
(
this
.
actionProvider
.
getOpenEditorActions
(),
{
icon
:
true
,
label
:
false
});
editorTemplate
.
root
=
this
.
instantiationService
.
createInstance
(
EditorLabel
,
container
);
editorTemplate
.
root
=
this
.
instantiationService
.
createInstance
(
EditorLabel
,
container
,
void
0
);
return
editorTemplate
;
}
...
...
src/vs/workbench/parts/markers/browser/markersPanel.ts
浏览文件 @
d66b0fd8
...
...
@@ -168,6 +168,7 @@ export class MarkersPanel extends Panel {
private
createTree
(
parent
:
HTMLElement
):
void
{
this
.
treeContainer
=
dom
.
append
(
parent
,
dom
.
$
(
'
.tree-container
'
));
dom
.
addClass
(
this
.
treeContainer
,
'
show-file-icons
'
);
var
actionProvider
=
this
.
instantiationService
.
createInstance
(
ActionProvider
);
var
renderer
=
this
.
instantiationService
.
createInstance
(
Viewer
.
Renderer
,
this
.
getActionRunner
(),
actionProvider
);
let
controller
=
this
.
instantiationService
.
createInstance
(
Controller
,
this
.
rangeHighlightDecorations
);
...
...
src/vs/workbench/parts/markers/browser/markersTreeViewer.ts
浏览文件 @
d66b0fd8
...
...
@@ -12,11 +12,12 @@ import Severity from 'vs/base/common/severity';
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
ActionProvider
}
from
'
vs/workbench/parts/markers/browser/markersActionProvider
'
;
import
{
CountBadge
}
from
'
vs/base/browser/ui/countBadge/countBadge
'
;
import
{
FileLabel
}
from
'
vs/
base/browser/ui/fileLabel/fileLabel
'
;
import
{
FileLabel
}
from
'
vs/
workbench/browser/labels
'
;
import
{
HighlightedLabel
}
from
'
vs/base/browser/ui/highlightedlabel/highlightedLabel
'
;
import
{
IMarker
}
from
'
vs/platform/markers/common/markers
'
;
import
{
MarkersModel
,
Resource
,
Marker
}
from
'
vs/workbench/parts/markers/common/markersModel
'
;
import
Messages
from
'
vs/workbench/parts/markers/common/messages
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
interface
IResourceTemplateData
{
file
:
FileLabel
;
...
...
@@ -70,7 +71,8 @@ export class Renderer implements IRenderer {
constructor
(
private
actionRunner
:
IActionRunner
,
private
actionProvider
:
ActionProvider
,
@
IWorkspaceContextService
private
contextService
:
IWorkspaceContextService
@
IWorkspaceContextService
private
contextService
:
IWorkspaceContextService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
)
{
}
...
...
@@ -101,7 +103,7 @@ export class Renderer implements IRenderer {
private
renderResourceTemplate
(
container
:
HTMLElement
):
IResourceTemplateData
{
var
data
:
IResourceTemplateData
=
Object
.
create
(
null
);
const
resourceLabelContainer
=
dom
.
append
(
container
,
dom
.
$
(
'
.resource-label-container
'
));
data
.
file
=
new
FileLabel
(
resourceLabelContainer
,
null
,
this
.
contextService
);
data
.
file
=
this
.
instantiationService
.
createInstance
(
FileLabel
,
resourceLabelContainer
,
{
supportHighlights
:
true
}
);
// data.statistics= new MarkersStatisticsWidget(dom.append(container, dom.emmet('.marker-stats')));
...
...
@@ -130,7 +132,7 @@ export class Renderer implements IRenderer {
}
private
renderResourceElement
(
tree
:
ITree
,
element
:
Resource
,
templateData
:
IResourceTemplateData
)
{
templateData
.
file
.
set
Value
(
element
.
uri
,
element
.
matches
);
templateData
.
file
.
set
File
(
element
.
uri
,
{
matches
:
element
.
matches
}
);
// templateData.statistics.setStatistics(element.statistics);
templateData
.
count
.
setCount
(
element
.
markers
.
length
);
}
...
...
src/vs/workbench/parts/search/browser/searchResultsView.ts
浏览文件 @
d66b0fd8
...
...
@@ -140,7 +140,7 @@ export class SearchRenderer extends ActionsRenderer {
let
widget
:
LeftRightWidget
;
leftRenderer
=
(
left
:
HTMLElement
):
any
=>
{
const
label
=
this
.
instantiationService
.
createInstance
(
FileLabel
,
left
);
const
label
=
this
.
instantiationService
.
createInstance
(
FileLabel
,
left
,
void
0
);
label
.
setFile
(
fileMatch
.
resource
());
return
()
=>
label
.
dispose
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录