Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
5ece1f17
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,发现更多精彩内容 >>
提交
5ece1f17
编写于
6月 14, 2019
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixes #71142
上级
c43b97e6
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
30 addition
and
4 deletion
+30
-4
src/vs/base/browser/dom.ts
src/vs/base/browser/dom.ts
+4
-0
src/vs/base/browser/ui/tree/abstractTree.ts
src/vs/base/browser/ui/tree/abstractTree.ts
+12
-3
src/vs/base/browser/ui/tree/asyncDataTree.ts
src/vs/base/browser/ui/tree/asyncDataTree.ts
+2
-1
src/vs/base/browser/ui/tree/tree.ts
src/vs/base/browser/ui/tree/tree.ts
+7
-0
src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.ts
...kbench/contrib/callHierarchy/browser/callHierarchyPeek.ts
+5
-0
未找到文件。
src/vs/base/browser/dom.ts
浏览文件 @
5ece1f17
...
...
@@ -768,6 +768,10 @@ export function findParentWithClass(node: HTMLElement, clazz: string, stopAtClaz
return
null
;
}
export
function
hasParentWithClass
(
node
:
HTMLElement
,
clazz
:
string
,
stopAtClazzOrNode
?:
string
|
HTMLElement
):
boolean
{
return
!!
findParentWithClass
(
node
,
clazz
,
stopAtClazzOrNode
);
}
export
function
createStyleSheet
(
container
:
HTMLElement
=
document
.
getElementsByTagName
(
'
head
'
)[
0
]):
HTMLStyleElement
{
let
style
=
document
.
createElement
(
'
style
'
);
style
.
type
=
'
text/css
'
;
...
...
src/vs/base/browser/ui/tree/abstractTree.ts
浏览文件 @
5ece1f17
...
...
@@ -7,11 +7,11 @@ import 'vs/css!./media/tree';
import
{
IDisposable
,
dispose
,
Disposable
,
toDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
IListOptions
,
List
,
IListStyles
,
mightProducePrintableCharacter
,
MouseController
}
from
'
vs/base/browser/ui/list/listWidget
'
;
import
{
IListVirtualDelegate
,
IListRenderer
,
IListMouseEvent
,
IListEvent
,
IListContextMenuEvent
,
IListDragAndDrop
,
IListDragOverReaction
,
IKeyboardNavigationLabelProvider
,
IIdentityProvider
}
from
'
vs/base/browser/ui/list/list
'
;
import
{
append
,
$
,
toggleClass
,
getDomNodePagePosition
,
removeClass
,
addClass
,
hasClass
}
from
'
vs/base/browser/dom
'
;
import
{
append
,
$
,
toggleClass
,
getDomNodePagePosition
,
removeClass
,
addClass
,
hasClass
,
hasParentWithClass
}
from
'
vs/base/browser/dom
'
;
import
{
Event
,
Relay
,
Emitter
,
EventBufferer
}
from
'
vs/base/common/event
'
;
import
{
StandardKeyboardEvent
,
IKeyboardEvent
}
from
'
vs/base/browser/keyboardEvent
'
;
import
{
KeyCode
}
from
'
vs/base/common/keyCodes
'
;
import
{
ITreeModel
,
ITreeNode
,
ITreeRenderer
,
ITreeEvent
,
ITreeMouseEvent
,
ITreeContextMenuEvent
,
ITreeFilter
,
ITreeNavigator
,
ICollapseStateChangeEvent
,
ITreeDragAndDrop
,
TreeDragOverBubble
,
TreeVisibility
,
TreeFilterResult
,
ITreeModelSpliceEvent
}
from
'
vs/base/browser/ui/tree/tree
'
;
import
{
ITreeModel
,
ITreeNode
,
ITreeRenderer
,
ITreeEvent
,
ITreeMouseEvent
,
ITreeContextMenuEvent
,
ITreeFilter
,
ITreeNavigator
,
ICollapseStateChangeEvent
,
ITreeDragAndDrop
,
TreeDragOverBubble
,
TreeVisibility
,
TreeFilterResult
,
ITreeModelSpliceEvent
,
TreeMouseEventTarget
}
from
'
vs/base/browser/ui/tree/tree
'
;
import
{
ISpliceable
}
from
'
vs/base/common/sequence
'
;
import
{
IDragAndDropData
,
StaticDND
,
DragAndDropData
}
from
'
vs/base/browser/dnd
'
;
import
{
range
,
equals
,
distinctES6
}
from
'
vs/base/common/arrays
'
;
...
...
@@ -722,9 +722,18 @@ function asTreeEvent<T>(event: IListEvent<ITreeNode<T, any>>): ITreeEvent<T> {
}
function
asTreeMouseEvent
<
T
>
(
event
:
IListMouseEvent
<
ITreeNode
<
T
,
any
>>
):
ITreeMouseEvent
<
T
>
{
let
target
:
TreeMouseEventTarget
=
TreeMouseEventTarget
.
Unknown
;
if
(
hasParentWithClass
(
event
.
browserEvent
.
target
as
HTMLElement
,
'
monaco-tl-twistie
'
,
'
monaco-tl-row
'
))
{
target
=
TreeMouseEventTarget
.
Twistie
;
}
else
if
(
hasParentWithClass
(
event
.
browserEvent
.
target
as
HTMLElement
,
'
monaco-tl-contents
'
,
'
monaco-tl-row
'
))
{
target
=
TreeMouseEventTarget
.
Element
;
}
return
{
browserEvent
:
event
.
browserEvent
,
element
:
event
.
element
?
event
.
element
.
element
:
null
element
:
event
.
element
?
event
.
element
.
element
:
null
,
target
};
}
...
...
src/vs/base/browser/ui/tree/asyncDataTree.ts
浏览文件 @
5ece1f17
...
...
@@ -133,7 +133,8 @@ function asTreeEvent<TInput, T>(e: ITreeEvent<IAsyncDataTreeNode<TInput, T>>): I
function
asTreeMouseEvent
<
TInput
,
T
>
(
e
:
ITreeMouseEvent
<
IAsyncDataTreeNode
<
TInput
,
T
>>
):
ITreeMouseEvent
<
T
>
{
return
{
browserEvent
:
e
.
browserEvent
,
element
:
e
.
element
&&
e
.
element
.
element
as
T
element
:
e
.
element
&&
e
.
element
.
element
as
T
,
target
:
e
.
target
};
}
...
...
src/vs/base/browser/ui/tree/tree.ts
浏览文件 @
5ece1f17
...
...
@@ -137,9 +137,16 @@ export interface ITreeEvent<T> {
browserEvent
?:
UIEvent
;
}
export
enum
TreeMouseEventTarget
{
Unknown
,
Twistie
,
Element
}
export
interface
ITreeMouseEvent
<
T
>
{
browserEvent
:
MouseEvent
;
element
:
T
|
null
;
target
:
TreeMouseEventTarget
;
}
export
interface
ITreeContextMenuEvent
<
T
>
{
...
...
src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.ts
浏览文件 @
5ece1f17
...
...
@@ -33,6 +33,7 @@ import { IActionBarOptions, ActionsOrientation } from 'vs/base/browser/ui/action
import
{
ILabelService
}
from
'
vs/platform/label/common/label
'
;
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
import
{
Color
}
from
'
vs/base/common/color
'
;
import
{
TreeMouseEventTarget
}
from
'
vs/base/browser/ui/tree/tree
'
;
const
enum
State
{
Loading
=
'
loading
'
,
...
...
@@ -307,6 +308,10 @@ export class CallHierarchyTreePeekWidget extends PeekViewWidget {
}));
this
.
_disposables
.
add
(
this
.
_tree
.
onMouseDblClick
(
e
=>
{
if
(
e
.
target
===
TreeMouseEventTarget
.
Twistie
)
{
return
;
}
if
(
e
.
element
&&
isNonEmptyArray
(
e
.
element
.
locations
))
{
this
.
dispose
();
this
.
_editorService
.
openEditor
({
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录