Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
6e868d65
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,发现更多精彩内容 >>
提交
6e868d65
编写于
10月 20, 2016
作者:
P
Pine Wu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add refresh button to toolBar
上级
267aab6b
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
43 addition
and
9 deletion
+43
-9
src/vs/workbench/parts/explorers/browser/treeExplorerActions.ts
.../workbench/parts/explorers/browser/treeExplorerActions.ts
+18
-0
src/vs/workbench/parts/explorers/browser/treeExplorerViewlet.contribution.ts
...rts/explorers/browser/treeExplorerViewlet.contribution.ts
+2
-0
src/vs/workbench/parts/explorers/browser/treeExplorerViewlet.ts
.../workbench/parts/explorers/browser/treeExplorerViewlet.ts
+7
-0
src/vs/workbench/parts/explorers/browser/views/treeExplorerView.ts
...rkbench/parts/explorers/browser/views/treeExplorerView.ts
+1
-9
src/vs/workbench/parts/explorers/media/Refresh.svg
src/vs/workbench/parts/explorers/media/Refresh.svg
+1
-0
src/vs/workbench/parts/explorers/media/Refresh_inverse.svg
src/vs/workbench/parts/explorers/media/Refresh_inverse.svg
+1
-0
src/vs/workbench/parts/explorers/media/treeExplorer.contribution.css
...bench/parts/explorers/media/treeExplorer.contribution.css
+13
-0
未找到文件。
src/vs/workbench/parts/explorers/browser/treeExplorerActions.ts
0 → 100644
浏览文件 @
6e868d65
/*---------------------------------------------------------------------------------------------
* 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
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
*
as
nls
from
'
vs/nls
'
;
import
{
Action
}
from
'
vs/base/common/actions
'
;
export
class
RefreshViewExplorerAction
extends
Action
{
constructor
()
{
super
(
'
workbench.action.customTreeExplorer.refresh
'
,
nls
.
localize
(
'
refresh
'
,
"
Refresh
"
),
'
customTreeExplorer-action toggle
'
,
true
,
()
=>
{
return
TPromise
.
as
(
null
);
});
}
}
\ No newline at end of file
src/vs/workbench/parts/explorers/browser/treeExplorerViewlet.contribution.ts
浏览文件 @
6e868d65
...
...
@@ -4,6 +4,8 @@
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
'
vs/css!../media/treeExplorer.contribution
'
;
import
{
ITreeExplorerViewletService
,
TreeExplorerViewletService
}
from
'
vs/workbench/parts/explorers/browser/treeExplorerViewletService
'
;
import
{
registerSingleton
}
from
'
vs/platform/instantiation/common/extensions
'
;
...
...
src/vs/workbench/parts/explorers/browser/treeExplorerViewlet.ts
浏览文件 @
6e868d65
...
...
@@ -7,6 +7,7 @@
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
Builder
,
Dimension
}
from
'
vs/base/browser/builder
'
;
import
{
Orientation
}
from
'
vs/base/browser/ui/splitview/splitview
'
;
import
{
IAction
}
from
'
vs/base/common/actions
'
;
import
{
IViewletView
,
Viewlet
}
from
'
vs/workbench/browser/viewlet
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
...
...
@@ -14,6 +15,7 @@ import { TreeExplorerView } from 'vs/workbench/parts/explorers/browser/views/tre
import
{
TreeExplorerViewletState
}
from
'
vs/workbench/parts/explorers/browser/views/treeExplorerViewer
'
;
import
{
IActivityService
}
from
'
vs/workbench/services/activity/common/activityService
'
;
import
{
VIEWLET_ID_ROOT
}
from
'
vs/workbench/parts/explorers/common/treeExplorer
'
;
import
{
RefreshViewExplorerAction
}
from
'
vs/workbench/parts/explorers/browser/treeExplorerActions
'
;
export
class
TreeExplorerViewlet
extends
Viewlet
{
private
static
_idCounter
=
1
;
...
...
@@ -64,6 +66,11 @@ export class TreeExplorerViewlet extends Viewlet {
});
}
getActions
():
IAction
[]
{
const
refresh
=
this
.
instantiationService
.
createInstance
(
RefreshViewExplorerAction
);
return
[
refresh
];
}
private
addTreeView
(
treeNodeProviderId
:
string
):
void
{
// Hide header (root node) by default
const
headerSize
=
0
;
...
...
src/vs/workbench/parts/explorers/browser/views/treeExplorerView.ts
浏览文件 @
6e868d65
...
...
@@ -10,7 +10,7 @@ import * as DOM from 'vs/base/browser/dom';
import
{
Builder
,
$
}
from
'
vs/base/browser/builder
'
;
import
{
IWorkspace
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
CollapsibleViewletView
}
from
'
vs/workbench/browser/viewlet
'
;
import
{
IActionRunner
,
IAction
}
from
'
vs/base/common/actions
'
;
import
{
IActionRunner
}
from
'
vs/base/common/actions
'
;
import
{
IMessageService
}
from
'
vs/platform/message/common/message
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
IContextMenuService
}
from
'
vs/platform/contextview/browser/contextView
'
;
...
...
@@ -54,10 +54,6 @@ export class TreeExplorerView extends CollapsibleViewletView {
this
.
create
();
}
renderHeader
(
container
:
HTMLElement
):
void
{
}
renderBody
(
container
:
HTMLElement
):
void
{
this
.
treeContainer
=
super
.
renderViewTree
(
container
);
DOM
.
addClass
(
this
.
treeContainer
,
'
tree-explorer-viewlet-tree-view
'
);
...
...
@@ -65,10 +61,6 @@ export class TreeExplorerView extends CollapsibleViewletView {
this
.
tree
=
this
.
createViewer
(
$
(
this
.
treeContainer
));
}
getActions
():
IAction
[]
{
return
[];
}
createViewer
(
container
:
Builder
):
ITree
{
const
dataSource
=
this
.
instantiationService
.
createInstance
(
TreeDataSource
,
this
.
treeNodeProviderIdName
);
const
renderer
=
this
.
instantiationService
.
createInstance
(
TreeRenderer
,
this
.
viewletState
,
this
.
actionRunner
,
container
.
getHTMLElement
());
...
...
src/vs/workbench/parts/explorers/media/Refresh.svg
0 → 100644
浏览文件 @
6e868d65
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
><path
d=
"M13.451 5.609l-.579-.939-1.068.812-.076.094c-.335.415-.927 1.341-1.124 2.876l-.021.165.033.163.071.345c0 1.654-1.346 3-3 3-.795 0-1.545-.311-2.107-.868-.563-.567-.873-1.317-.873-2.111 0-1.431 1.007-2.632 2.351-2.929v2.926s2.528-2.087 2.984-2.461h.012l3.061-2.582-4.919-4.1h-1.137v2.404c-3.429.318-6.121 3.211-6.121 6.721 0 1.809.707 3.508 1.986 4.782 1.277 1.282 2.976 1.988 4.784 1.988 3.722 0 6.75-3.028 6.75-6.75 0-1.245-.349-2.468-1.007-3.536z"
fill=
"#F6F6F6"
/><path
d=
"M12.6 6.134l-.094.071c-.269.333-.746 1.096-.91 2.375.057.277.092.495.092.545 0 2.206-1.794 4-4 4-1.098 0-2.093-.445-2.817-1.164-.718-.724-1.163-1.718-1.163-2.815 0-2.206 1.794-4 4-4l.351.025v1.85s1.626-1.342 1.631-1.339l1.869-1.577-3.5-2.917v2.218l-.371-.03c-3.176 0-5.75 2.574-5.75 5.75 0 1.593.648 3.034 1.695 4.076 1.042 1.046 2.482 1.694 4.076 1.694 3.176 0 5.75-2.574 5.75-5.75-.001-1.106-.318-2.135-.859-3.012z"
fill=
"#424242"
/></svg>
\ No newline at end of file
src/vs/workbench/parts/explorers/media/Refresh_inverse.svg
0 → 100644
浏览文件 @
6e868d65
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
><path
d=
"M13.451 5.609l-.579-.939-1.068.812-.076.094c-.335.415-.927 1.341-1.124 2.876l-.021.165.033.163.071.345c0 1.654-1.346 3-3 3-.795 0-1.545-.311-2.107-.868-.563-.567-.873-1.317-.873-2.111 0-1.431 1.007-2.632 2.351-2.929v2.926s2.528-2.087 2.984-2.461h.012l3.061-2.582-4.919-4.1h-1.137v2.404c-3.429.318-6.121 3.211-6.121 6.721 0 1.809.707 3.508 1.986 4.782 1.277 1.282 2.976 1.988 4.784 1.988 3.722 0 6.75-3.028 6.75-6.75 0-1.245-.349-2.468-1.007-3.536z"
fill=
"#2D2D30"
/><path
d=
"M12.6 6.134l-.094.071c-.269.333-.746 1.096-.91 2.375.057.277.092.495.092.545 0 2.206-1.794 4-4 4-1.098 0-2.093-.445-2.817-1.164-.718-.724-1.163-1.718-1.163-2.815 0-2.206 1.794-4 4-4l.351.025v1.85s1.626-1.342 1.631-1.339l1.869-1.577-3.5-2.917v2.218l-.371-.03c-3.176 0-5.75 2.574-5.75 5.75 0 1.593.648 3.034 1.695 4.076 1.042 1.046 2.482 1.694 4.076 1.694 3.176 0 5.75-2.574 5.75-5.75-.001-1.106-.318-2.135-.859-3.012z"
fill=
"#C5C5C5"
/></svg>
\ No newline at end of file
src/vs/workbench/parts/explorers/media/treeExplorer.contribution.css
0 → 100644
浏览文件 @
6e868d65
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.monaco-workbench
.customTreeExplorer-action.toggle
{
background
:
url('Refresh.svg')
center
center
no-repeat
;
}
.vs-dark
.monaco-workbench
.customTreeExplorer-action.toggle
,
.hc-black
.monaco-workbench
.customTreeExplorer-action.toggle
{
background
:
url('Refresh_inverse.svg')
center
center
no-repeat
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录