Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
fb36c0dd
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,发现更多精彩内容 >>
未验证
提交
fb36c0dd
编写于
6月 22, 2020
作者:
A
Alex Ross
提交者:
GitHub
6月 22, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Adopt hover service in custom tree view
Part of #100741
上级
32081686
变更
9
展开全部
显示空白变更内容
内联
并排
Showing
9 changed file
with
1045 addition
and
972 deletion
+1045
-972
src/vs/vscode.proposed.d.ts
src/vs/vscode.proposed.d.ts
+7
-0
src/vs/workbench/api/browser/viewsExtensionPoint.ts
src/vs/workbench/api/browser/viewsExtensionPoint.ts
+2
-1
src/vs/workbench/api/common/extHostTreeViews.ts
src/vs/workbench/api/common/extHostTreeViews.ts
+14
-1
src/vs/workbench/api/common/extHostTypes.ts
src/vs/workbench/api/common/extHostTypes.ts
+1
-1
src/vs/workbench/browser/parts/views/treeView.ts
src/vs/workbench/browser/parts/views/treeView.ts
+6
-967
src/vs/workbench/common/views.ts
src/vs/workbench/common/views.ts
+3
-1
src/vs/workbench/contrib/userDataSync/browser/userDataSyncViews.ts
...rkbench/contrib/userDataSync/browser/userDataSyncViews.ts
+2
-1
src/vs/workbench/contrib/views/browser/media/views.css
src/vs/workbench/contrib/views/browser/media/views.css
+0
-0
src/vs/workbench/contrib/views/browser/treeView.ts
src/vs/workbench/contrib/views/browser/treeView.ts
+1010
-0
未找到文件。
src/vs/vscode.proposed.d.ts
浏览文件 @
fb36c0dd
...
...
@@ -3,6 +3,8 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
MarkdownString
}
from
'
vscode
'
;
/**
* This is the place for API experiments and proposals.
* These API are NOT stable and subject to change. They are only available in the Insiders
...
...
@@ -1154,6 +1156,11 @@ declare module 'vscode' {
*/
label
?:
string
|
TreeItemLabel
|
/* for compilation */
any
;
/**
* Content to be shown when you hover over the tree item.
*/
tooltip
?:
string
|
MarkdownString
|
/* for compilation */
any
;
/**
* Accessibility information used when screen reader interacts with this tree item.
* Generally, a TreeItem has no need to set the `role` of the accessibilityInformation;
...
...
src/vs/workbench/api/browser/viewsExtensionPoint.ts
浏览文件 @
fb36c0dd
...
...
@@ -9,7 +9,7 @@ import { IJSONSchema } from 'vs/base/common/jsonSchema';
import
*
as
resources
from
'
vs/base/common/resources
'
;
import
{
ExtensionMessageCollector
,
ExtensionsRegistry
,
IExtensionPoint
,
IExtensionPointUser
}
from
'
vs/workbench/services/extensions/common/extensionsRegistry
'
;
import
{
ViewContainer
,
IViewsRegistry
,
ITreeViewDescriptor
,
IViewContainersRegistry
,
Extensions
as
ViewContainerExtensions
,
TEST_VIEW_CONTAINER_ID
,
IViewDescriptor
,
ViewContainerLocation
}
from
'
vs/workbench/common/views
'
;
import
{
TreeViewPane
,
CustomTreeView
}
from
'
vs/workbench/browser/parts/views/treeView
'
;
import
{
TreeViewPane
}
from
'
vs/workbench/browser/parts/views/treeView
'
;
import
{
ContextKeyExpr
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
coalesce
,
}
from
'
vs/base/common/arrays
'
;
import
{
IWorkbenchContributionsRegistry
,
Extensions
as
WorkbenchExtensions
,
IWorkbenchContribution
}
from
'
vs/workbench/common/contributions
'
;
...
...
@@ -31,6 +31,7 @@ import { SyncActionDescriptor } from 'vs/platform/actions/common/actions';
import
{
ViewPaneContainer
}
from
'
vs/workbench/browser/parts/views/viewPaneContainer
'
;
import
{
SyncDescriptor
}
from
'
vs/platform/instantiation/common/descriptors
'
;
import
{
Codicon
}
from
'
vs/base/common/codicons
'
;
import
{
CustomTreeView
}
from
'
vs/workbench/contrib/views/browser/treeView
'
;
export
interface
IUserFriendlyViewsContainerDescriptor
{
id
:
string
;
...
...
src/vs/workbench/api/common/extHostTreeViews.ts
浏览文件 @
fb36c0dd
...
...
@@ -19,6 +19,8 @@ import { equals, coalesce } from 'vs/base/common/arrays';
import
{
ILogService
}
from
'
vs/platform/log/common/log
'
;
import
{
checkProposedApiEnabled
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
import
{
IExtensionDescription
}
from
'
vs/platform/extensions/common/extensions
'
;
import
{
MarkdownString
}
from
'
vs/workbench/api/common/extHostTypeConverters
'
;
import
{
IMarkdownString
}
from
'
vs/base/common/htmlContent
'
;
type
TreeItemHandle
=
string
;
...
...
@@ -486,6 +488,17 @@ class ExtHostTreeView<T> extends Disposable {
return
node
;
}
private
getTooltip
(
tooltip
?:
string
|
vscode
.
MarkdownString
):
string
|
IMarkdownString
|
undefined
{
if
(
typeof
tooltip
===
'
string
'
)
{
return
tooltip
;
}
else
if
(
tooltip
===
undefined
)
{
return
undefined
;
}
else
{
checkProposedApiEnabled
(
this
.
extension
);
return
MarkdownString
.
from
(
tooltip
);
}
}
private
createTreeNode
(
element
:
T
,
extensionTreeItem
:
vscode
.
TreeItem2
,
parent
:
TreeNode
|
Root
):
TreeNode
{
const
disposable
=
new
DisposableStore
();
const
handle
=
this
.
createHandle
(
element
,
extensionTreeItem
,
parent
);
...
...
@@ -496,7 +509,7 @@ class ExtHostTreeView<T> extends Disposable {
label
:
toTreeItemLabel
(
extensionTreeItem
.
label
,
this
.
extension
),
description
:
extensionTreeItem
.
description
,
resourceUri
:
extensionTreeItem
.
resourceUri
,
tooltip
:
t
ypeof
extensionTreeItem
.
tooltip
===
'
string
'
?
extensionTreeItem
.
tooltip
:
undefined
,
tooltip
:
t
his
.
getTooltip
(
extensionTreeItem
.
tooltip
)
,
command
:
extensionTreeItem
.
command
?
this
.
commands
.
toInternal
(
extensionTreeItem
.
command
,
disposable
)
:
undefined
,
contextValue
:
extensionTreeItem
.
contextValue
,
icon
,
...
...
src/vs/workbench/api/common/extHostTypes.ts
浏览文件 @
fb36c0dd
...
...
@@ -2101,7 +2101,7 @@ export class TreeItem {
iconPath
?:
string
|
URI
|
{
light
:
string
|
URI
;
dark
:
string
|
URI
;
};
command
?:
vscode
.
Command
;
contextValue
?:
string
;
tooltip
?:
string
;
tooltip
?:
string
|
vscode
.
MarkdownString
;
constructor
(
label
:
string
|
vscode
.
TreeItemLabel
,
collapsibleState
?:
vscode
.
TreeItemCollapsibleState
);
constructor
(
resourceUri
:
URI
,
collapsibleState
?:
vscode
.
TreeItemCollapsibleState
);
...
...
src/vs/workbench/browser/parts/views/treeView.ts
浏览文件 @
fb36c0dd
此差异已折叠。
点击以展开。
src/vs/workbench/common/views.ts
浏览文件 @
fb36c0dd
...
...
@@ -23,6 +23,7 @@ import { IProgressIndicator } from 'vs/platform/progress/common/progress';
import
Severity
from
'
vs/base/common/severity
'
;
import
{
IPaneComposite
}
from
'
vs/workbench/common/panecomposite
'
;
import
{
IAccessibilityInformation
}
from
'
vs/platform/accessibility/common/accessibility
'
;
import
{
IMarkdownString
}
from
'
vs/base/common/htmlContent
'
;
export
const
TEST_VIEW_CONTAINER_ID
=
'
workbench.view.extension.test
'
;
...
...
@@ -580,6 +581,7 @@ export interface ITreeView extends IDisposable {
setFocus
(
item
:
ITreeItem
):
void
;
show
(
container
:
any
):
void
;
}
export
interface
IRevealOptions
{
...
...
@@ -635,7 +637,7 @@ export interface ITreeItem {
resourceUri
?:
UriComponents
;
tooltip
?:
string
;
tooltip
?:
string
|
IMarkdownString
;
contextValue
?:
string
;
...
...
src/vs/workbench/contrib/userDataSync/browser/userDataSyncViews.ts
浏览文件 @
fb36c0dd
...
...
@@ -7,7 +7,7 @@ import { Registry } from 'vs/platform/registry/common/platform';
import
{
IViewsRegistry
,
Extensions
,
ITreeViewDescriptor
,
ITreeViewDataProvider
,
ITreeItem
,
TreeItemCollapsibleState
,
IViewsService
,
TreeViewItemHandleArg
,
ViewContainer
,
IViewDescriptorService
}
from
'
vs/workbench/common/views
'
;
import
{
localize
}
from
'
vs/nls
'
;
import
{
SyncDescriptor
}
from
'
vs/platform/instantiation/common/descriptors
'
;
import
{
TreeViewPane
,
TreeView
}
from
'
vs/workbench/browser/parts/views/treeView
'
;
import
{
TreeViewPane
}
from
'
vs/workbench/browser/parts/views/treeView
'
;
import
{
IInstantiationService
,
ServicesAccessor
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
ALL_SYNC_RESOURCES
,
SyncResource
,
IUserDataSyncService
,
ISyncResourceHandle
,
SyncStatus
,
IUserDataSyncResourceEnablementService
,
IUserDataAutoSyncService
}
from
'
vs/platform/userDataSync/common/userDataSync
'
;
import
{
registerAction2
,
Action2
,
MenuId
}
from
'
vs/platform/actions/common/actions
'
;
...
...
@@ -36,6 +36,7 @@ import { IUserDataSyncMachinesService, IUserDataSyncMachine } from 'vs/platform/
import
{
IQuickInputService
}
from
'
vs/platform/quickinput/common/quickInput
'
;
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
import
{
generateUuid
}
from
'
vs/base/common/uuid
'
;
import
{
TreeView
}
from
'
vs/workbench/contrib/views/browser/treeView
'
;
export
class
UserDataSyncViewPaneContainer
extends
ViewPaneContainer
{
...
...
src/vs/workbench/
browser/parts/views
/media/views.css
→
src/vs/workbench/
contrib/views/browser
/media/views.css
浏览文件 @
fb36c0dd
文件已移动
src/vs/workbench/contrib/views/browser/treeView.ts
0 → 100644
浏览文件 @
fb36c0dd
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录