Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
dc92aa11
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
dc92aa11
编写于
5月 02, 2016
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debt - zone widget isn't event emitter anymore, code style alignments
上级
141a0eda
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
234 addition
and
231 deletion
+234
-231
src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts
...editor/contrib/referenceSearch/browser/referenceSearch.ts
+54
-54
src/vs/editor/contrib/referenceSearch/browser/referenceSearchWidget.ts
.../contrib/referenceSearch/browser/referenceSearchWidget.ts
+139
-137
src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.ts
src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.ts
+39
-36
src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts
src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts
+2
-4
未找到文件。
src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts
浏览文件 @
dc92aa11
...
...
@@ -28,7 +28,7 @@ import {CommonEditorRegistry, ContextKey, EditorActionDescriptor} from 'vs/edito
import
{
IReference
,
ReferenceSearchRegistry
}
from
'
vs/editor/common/modes
'
;
import
{
ICodeEditor
}
from
'
vs/editor/browser/editorBrowser
'
;
import
{
EditorBrowserRegistry
}
from
'
vs/editor/browser/editorBrowserExtensions
'
;
import
{
Events
,
IPeekViewService
,
getOuterEditor
}
from
'
vs/editor/contrib/zoneWidget/browser/peekViewWidget
'
;
import
{
IPeekViewService
,
getOuterEditor
}
from
'
vs/editor/contrib/zoneWidget/browser/peekViewWidget
'
;
import
{
findReferences
}
from
'
../common/referenceSearch
'
;
import
{
EventType
,
ReferencesModel
}
from
'
./referenceSearchModel
'
;
import
{
ReferenceWidget
}
from
'
./referenceSearchWidget
'
;
...
...
@@ -37,12 +37,12 @@ export class FindReferencesController implements editorCommon.IEditorContributio
public
static
ID
=
'
editor.contrib.findReferencesController
'
;
private
editor
:
ICodeEditor
;
private
widget
:
ReferenceWidget
;
private
requestIdPool
:
number
;
private
callOnClear
:
Function
[];
private
model
:
ReferencesModel
;
private
modelRevealing
:
boolean
;
private
_
editor
:
ICodeEditor
;
private
_
widget
:
ReferenceWidget
;
private
_
requestIdPool
:
number
;
private
_
callOnClear
:
Function
[];
private
_
model
:
ReferencesModel
;
private
_
modelRevealing
:
boolean
;
private
editorService
:
IEditorService
;
private
telemetryService
:
ITelemetryService
;
...
...
@@ -68,8 +68,8 @@ export class FindReferencesController implements editorCommon.IEditorContributio
@
IWorkspaceContextService
contextService
:
IWorkspaceContextService
,
@
optional
(
IPeekViewService
)
peekViewService
:
IPeekViewService
)
{
this
.
requestIdPool
=
0
;
this
.
callOnClear
=
[];
this
.
_
requestIdPool
=
0
;
this
.
_
callOnClear
=
[];
this
.
editorService
=
editorService
;
this
.
telemetryService
=
telemetryService
;
this
.
messageService
=
messageService
;
...
...
@@ -77,8 +77,8 @@ export class FindReferencesController implements editorCommon.IEditorContributio
this
.
peekViewService
=
peekViewService
;
this
.
contextService
=
contextService
;
this
.
keybindingService
=
keybindingService
;
this
.
modelRevealing
=
false
;
this
.
editor
=
editor
;
this
.
_
modelRevealing
=
false
;
this
.
_
editor
=
editor
;
this
.
_referenceSearchVisible
=
keybindingService
.
createKey
(
CONTEXT_REFERENCE_SEARCH_VISIBLE
,
false
);
}
...
...
@@ -87,11 +87,11 @@ export class FindReferencesController implements editorCommon.IEditorContributio
}
public
dispose
():
void
{
if
(
this
.
widget
)
{
this
.
widget
.
dispose
();
this
.
widget
=
null
;
if
(
this
.
_
widget
)
{
this
.
_
widget
.
dispose
();
this
.
_
widget
=
null
;
}
this
.
editor
=
null
;
this
.
_
editor
=
null
;
}
public
isInPeekView
()
:
boolean
{
...
...
@@ -103,7 +103,7 @@ export class FindReferencesController implements editorCommon.IEditorContributio
}
public
processRequest
(
range
:
editorCommon
.
IEditorRange
,
referencesPromise
:
TPromise
<
IReference
[]
>
,
metaTitleFn
:(
references
:
IReference
[])
=>
string
)
:
ReferenceWidget
{
var
widgetPosition
=
!
this
.
widget
?
null
:
this
.
widget
.
position
;
var
widgetPosition
=
!
this
.
_widget
?
null
:
this
.
_
widget
.
position
;
// clean up from previous invocation
var
widgetClosed
=
this
.
clear
();
...
...
@@ -116,22 +116,22 @@ export class FindReferencesController implements editorCommon.IEditorContributio
this
.
_referenceSearchVisible
.
set
(
true
);
// close the widget on model/mode changes
this
.
callOnClear
.
push
(
this
.
editor
.
addListener
(
editorCommon
.
EventType
.
ModelModeChanged
,
()
=>
{
this
.
clear
();
}));
this
.
callOnClear
.
push
(
this
.
editor
.
addListener
(
editorCommon
.
EventType
.
ModelChanged
,
()
=>
{
if
(
!
this
.
modelRevealing
)
{
this
.
_callOnClear
.
push
(
this
.
_
editor
.
addListener
(
editorCommon
.
EventType
.
ModelModeChanged
,
()
=>
{
this
.
clear
();
}));
this
.
_callOnClear
.
push
(
this
.
_
editor
.
addListener
(
editorCommon
.
EventType
.
ModelChanged
,
()
=>
{
if
(
!
this
.
_
modelRevealing
)
{
this
.
clear
();
}
}));
this
.
widget
=
new
ReferenceWidget
(
this
.
editorService
,
this
.
keybindingService
,
this
.
contextService
,
this
.
instantiationService
,
this
.
editor
);
this
.
widget
.
setTitle
(
nls
.
localize
(
'
labelLoading
'
,
"
Loading...
"
));
this
.
widget
.
show
(
range
,
18
);
this
.
callOnClear
.
push
(
this
.
widget
.
addListener
(
Events
.
Closed
,
()
=>
{
this
.
widget
=
null
;
this
.
_widget
=
new
ReferenceWidget
(
this
.
editorService
,
this
.
keybindingService
,
this
.
contextService
,
this
.
instantiationService
,
this
.
_
editor
);
this
.
_
widget
.
setTitle
(
nls
.
localize
(
'
labelLoading
'
,
"
Loading...
"
));
this
.
_
widget
.
show
(
range
,
18
);
this
.
_callOnClear
.
push
(
this
.
_widget
.
onDidClose
(
()
=>
{
this
.
_
widget
=
null
;
referencesPromise
.
cancel
();
this
.
clear
();
}));
this
.
callOnClear
.
push
(
this
.
widget
.
addListener
(
ReferenceWidget
.
Events
.
EditorDoubleClick
,
(
event
:
any
)
=>
{
})
.
dispose
);
this
.
_callOnClear
.
push
(
this
.
_widget
.
onDidDoubleClick
(
event
=>
{
if
(
!
event
.
reference
)
{
return
;
...
...
@@ -147,9 +147,9 @@ export class FindReferencesController implements editorCommon.IEditorContributio
if
(
!
(
event
.
originalEvent
.
ctrlKey
||
event
.
originalEvent
.
metaKey
))
{
this
.
clear
();
}
}));
var
requestId
=
++
this
.
requestIdPool
,
editorModel
=
this
.
editor
.
getModel
();
})
.
dispose
);
var
requestId
=
++
this
.
_
requestIdPool
,
editorModel
=
this
.
_
editor
.
getModel
();
var
timer
=
this
.
telemetryService
.
timedPublicLog
(
'
findReferences
'
,
{
mode
:
editorModel
.
getMode
().
getId
()
...
...
@@ -158,31 +158,31 @@ export class FindReferencesController implements editorCommon.IEditorContributio
referencesPromise
.
then
((
references
:
IReference
[])
=>
{
// still current request? widget still open?
if
(
requestId
!==
this
.
requestIdPool
||
!
this
.
widget
)
{
if
(
requestId
!==
this
.
_requestIdPool
||
!
this
.
_
widget
)
{
timer
.
stop
();
return
;
}
// has a result
if
(
isFalsyOrEmpty
(
references
))
{
this
.
widget
.
showMessage
(
nls
.
localize
(
'
noResults
'
,
"
No results
"
));
this
.
_
widget
.
showMessage
(
nls
.
localize
(
'
noResults
'
,
"
No results
"
));
timer
.
stop
();
return
;
}
// create result model
this
.
model
=
new
ReferencesModel
(
references
,
this
.
editorService
);
this
.
model
.
currentReference
=
this
.
model
.
findReference
(
editorModel
.
getAssociatedResource
(),
range
.
getStartPosition
());
this
.
_
model
=
new
ReferencesModel
(
references
,
this
.
editorService
);
this
.
_model
.
currentReference
=
this
.
_
model
.
findReference
(
editorModel
.
getAssociatedResource
(),
range
.
getStartPosition
());
var
unbind
=
this
.
model
.
addListener
(
EventType
.
CurrentReferenceChanged
,
()
=>
{
var
unbind
=
this
.
_
model
.
addListener
(
EventType
.
CurrentReferenceChanged
,
()
=>
{
this
.
modelRevealing
=
true
;
this
.
_
modelRevealing
=
true
;
this
.
editorService
.
openEditor
({
resource
:
this
.
model
.
currentReference
.
resource
,
options
:
{
selection
:
this
.
model
.
currentReference
.
range
}
resource
:
this
.
_
model
.
currentReference
.
resource
,
options
:
{
selection
:
this
.
_
model
.
currentReference
.
range
}
}).
done
((
openedEditor
)
=>
{
if
(
!
openedEditor
||
openedEditor
.
getControl
()
!==
this
.
editor
)
{
if
(
!
openedEditor
||
openedEditor
.
getControl
()
!==
this
.
_
editor
)
{
// TODO@Alex TODO@Joh
// when opening the current reference we might end up
// in a different editor instance. that means we also have
...
...
@@ -193,22 +193,22 @@ export class FindReferencesController implements editorCommon.IEditorContributio
this
.
clear
();
return
;
}
this
.
modelRevealing
=
false
;
this
.
widget
.
show
(
this
.
model
.
currentReference
.
range
,
18
);
this
.
widget
.
focus
();
this
.
_
modelRevealing
=
false
;
this
.
_widget
.
show
(
this
.
_
model
.
currentReference
.
range
,
18
);
this
.
_
widget
.
focus
();
},
(
err
)
=>
{
this
.
modelRevealing
=
false
;
this
.
_
modelRevealing
=
false
;
onUnexpectedError
(
err
);
});
});
this
.
callOnClear
.
push
(
unbind
);
this
.
_
callOnClear
.
push
(
unbind
);
// show widget
this
.
_startTime
=
Date
.
now
();
if
(
this
.
widget
)
{
this
.
widget
.
setMetaTitle
(
metaTitleFn
(
references
));
this
.
widget
.
setModel
(
this
.
model
);
if
(
this
.
_
widget
)
{
this
.
_
widget
.
setMetaTitle
(
metaTitleFn
(
references
));
this
.
_widget
.
setModel
(
this
.
_
model
);
}
timer
.
stop
();
...
...
@@ -217,7 +217,7 @@ export class FindReferencesController implements editorCommon.IEditorContributio
timer
.
stop
();
});
return
this
.
widget
;
return
this
.
_
widget
;
}
private
clear
():
boolean
{
...
...
@@ -232,19 +232,19 @@ export class FindReferencesController implements editorCommon.IEditorContributio
this
.
_referenceSearchVisible
.
reset
();
cAll
(
this
.
callOnClear
);
cAll
(
this
.
_
callOnClear
);
this
.
model
=
null
;
this
.
_
model
=
null
;
var
result
=
false
;
if
(
this
.
widget
)
{
this
.
widget
.
dispose
();
this
.
widget
=
null
;
if
(
this
.
_
widget
)
{
this
.
_
widget
.
dispose
();
this
.
_
widget
=
null
;
result
=
true
;
}
this
.
editor
.
focus
();
this
.
requestIdPool
+=
1
;
// Cancel pending requests
this
.
_
editor
.
focus
();
this
.
_
requestIdPool
+=
1
;
// Cancel pending requests
return
result
;
}
...
...
src/vs/editor/contrib/referenceSearch/browser/referenceSearchWidget.ts
浏览文件 @
dc92aa11
...
...
@@ -9,6 +9,7 @@ import * as nls from 'vs/nls';
import
*
as
collections
from
'
vs/base/common/collections
'
;
import
{
onUnexpectedError
}
from
'
vs/base/common/errors
'
;
import
{
getPathLabel
}
from
'
vs/base/common/labels
'
;
import
Event
,
{
Emitter
}
from
'
vs/base/common/event
'
;
import
{
IDisposable
,
cAll
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
Schemas
}
from
'
vs/base/common/network
'
;
import
*
as
strings
from
'
vs/base/common/strings
'
;
...
...
@@ -47,25 +48,24 @@ class DecorationsManager implements IDisposable {
private
_decorationSet
=
collections
.
createStringDictionary
<
OneReference
>
();
private
_decorationIgnoreSet
=
collections
.
createStringDictionary
<
OneReference
>
();
private
callOnDispose
:
Function
[]
=
[];
private
callOnModelChange
:
Function
[]
=
[];
private
_callOnDispose
:
Function
[]
=
[];
private
_callOnModelChange
:
Function
[]
=
[];
constructor
(
private
editor
:
ICodeEditor
,
private
model
:
ReferencesModel
)
{
this
.
callOnDispose
.
push
(
this
.
editor
.
addListener
(
editorCommon
.
EventType
.
ModelChanged
,
()
=>
this
.
onModelChanged
()));
this
.
onModelChanged
();
this
.
_callOnDispose
.
push
(
this
.
editor
.
addListener
(
editorCommon
.
EventType
.
ModelChanged
,
()
=>
this
.
_
onModelChanged
()));
this
.
_
onModelChanged
();
}
public
dispose
():
void
{
this
.
callOnModelChange
=
cAll
(
this
.
callOnModelChange
);
this
.
callOnDispose
=
cAll
(
this
.
callOnDispose
);
this
.
_callOnModelChange
=
cAll
(
this
.
_
callOnModelChange
);
this
.
_callOnDispose
=
cAll
(
this
.
_
callOnDispose
);
this
.
removeDecorations
();
}
private
onModelChanged
():
void
{
private
_
onModelChanged
():
void
{
this
.
removeDecorations
();
this
.
callOnModelChange
=
cAll
(
this
.
callOnModelChange
);
this
.
_callOnModelChange
=
cAll
(
this
.
_
callOnModelChange
);
var
model
=
this
.
editor
.
getModel
();
if
(
!
model
)
{
...
...
@@ -74,14 +74,14 @@ class DecorationsManager implements IDisposable {
for
(
var
i
=
0
,
len
=
this
.
model
.
children
.
length
;
i
<
len
;
i
++
)
{
if
(
this
.
model
.
children
[
i
].
resource
.
toString
()
===
model
.
getAssociatedResource
().
toString
())
{
this
.
addDecorations
(
this
.
model
.
children
[
i
]);
this
.
_
addDecorations
(
this
.
model
.
children
[
i
]);
return
;
}
}
}
private
addDecorations
(
reference
:
FileReferences
):
void
{
this
.
callOnModelChange
.
push
(
this
.
editor
.
getModel
().
addListener
(
editorCommon
.
EventType
.
ModelDecorationsChanged
,
(
event
)
=>
this
.
onDecorationChanged
(
event
)));
private
_
addDecorations
(
reference
:
FileReferences
):
void
{
this
.
_callOnModelChange
.
push
(
this
.
editor
.
getModel
().
addListener
(
editorCommon
.
EventType
.
ModelDecorationsChanged
,
(
event
)
=>
this
.
_
onDecorationChanged
(
event
)));
this
.
editor
.
getModel
().
changeDecorations
((
accessor
)
=>
{
var
newDecorations
:
editorCommon
.
IModelDeltaDecoration
[]
=
[];
...
...
@@ -107,7 +107,7 @@ class DecorationsManager implements IDisposable {
});
}
private
onDecorationChanged
(
event
:
any
):
void
{
private
_
onDecorationChanged
(
event
:
any
):
void
{
var
addedOrChangedDecorations
=
<
any
[]
>
event
.
addedOrChangedDecorations
,
toRemove
:
string
[]
=
[];
...
...
@@ -212,7 +212,7 @@ class Controller extends DefaultController {
if
(
element
instanceof
FileReferences
)
{
event
.
preventDefault
();
event
.
stopPropagation
();
return
this
.
expandCollapse
(
tree
,
element
);
return
this
.
_
expandCollapse
(
tree
,
element
);
}
var
result
=
super
.
onClick
(
tree
,
element
,
event
);
...
...
@@ -237,7 +237,7 @@ class Controller extends DefaultController {
return
super
.
onClick
(
tree
,
element
,
event
);
}
private
expandCollapse
(
tree
:
tree
.
ITree
,
element
:
any
):
boolean
{
private
_
expandCollapse
(
tree
:
tree
.
ITree
,
element
:
any
):
boolean
{
if
(
tree
.
isExpanded
(
element
))
{
tree
.
collapse
(
element
).
done
(
null
,
onUnexpectedError
);
...
...
@@ -254,7 +254,7 @@ class Controller extends DefaultController {
public
onEnter
(
tree
:
tree
.
ITree
,
event
:
IKeyboardEvent
):
boolean
{
var
element
=
tree
.
getFocus
();
if
(
element
instanceof
FileReferences
)
{
return
this
.
expandCollapse
(
tree
,
element
);
return
this
.
_
expandCollapse
(
tree
,
element
);
}
var
result
=
super
.
onEnter
(
tree
,
event
);
...
...
@@ -268,41 +268,41 @@ class Controller extends DefaultController {
public
onUp
(
tree
:
tree
.
ITree
,
event
:
IKeyboardEvent
):
boolean
{
super
.
onUp
(
tree
,
event
);
this
.
fakeFocus
(
tree
,
event
);
this
.
_
fakeFocus
(
tree
,
event
);
return
true
;
}
public
onPageUp
(
tree
:
tree
.
ITree
,
event
:
IKeyboardEvent
):
boolean
{
super
.
onPageUp
(
tree
,
event
);
this
.
fakeFocus
(
tree
,
event
);
this
.
_
fakeFocus
(
tree
,
event
);
return
true
;
}
public
onLeft
(
tree
:
tree
.
ITree
,
event
:
IKeyboardEvent
):
boolean
{
super
.
onLeft
(
tree
,
event
);
this
.
fakeFocus
(
tree
,
event
);
this
.
_
fakeFocus
(
tree
,
event
);
return
true
;
}
public
onDown
(
tree
:
tree
.
ITree
,
event
:
IKeyboardEvent
):
boolean
{
super
.
onDown
(
tree
,
event
);
this
.
fakeFocus
(
tree
,
event
);
this
.
_
fakeFocus
(
tree
,
event
);
return
true
;
}
public
onPageDown
(
tree
:
tree
.
ITree
,
event
:
IKeyboardEvent
):
boolean
{
super
.
onPageDown
(
tree
,
event
);
this
.
fakeFocus
(
tree
,
event
);
this
.
_
fakeFocus
(
tree
,
event
);
return
true
;
}
public
onRight
(
tree
:
tree
.
ITree
,
event
:
IKeyboardEvent
):
boolean
{
super
.
onRight
(
tree
,
event
);
this
.
fakeFocus
(
tree
,
event
);
this
.
_
fakeFocus
(
tree
,
event
);
return
true
;
}
private
fakeFocus
(
tree
:
tree
.
ITree
,
event
:
IKeyboardEvent
):
void
{
private
_
fakeFocus
(
tree
:
tree
.
ITree
,
event
:
IKeyboardEvent
):
void
{
// focus next item
var
focus
=
tree
.
getFocus
();
tree
.
setSelection
([
focus
]);
...
...
@@ -372,89 +372,91 @@ export class ReferenceWidget extends PeekViewWidget {
public
static
INNER_EDITOR_CONTEXT_KEY
=
'
inReferenceSearchEditor
'
;
public
static
Events
=
{
EditorDoubleClick
:
'
editorDoubleClick
'
};
private
editorService
:
IEditorService
;
private
contextService
:
IWorkspaceContextService
;
private
instantiationService
:
IInstantiationService
;
private
decorationsManager
:
DecorationsManager
;
private
model
:
ReferencesModel
;
private
callOnModel
:
IDisposable
[];
private
tree
:
Tree
;
private
treeContainer
:
Builder
;
private
preview
:
ICodeEditor
;
private
previewNotAvailableMessage
:
Model
;
private
previewContainer
:
Builder
;
private
previewDecorations
:
string
[];
private
messageContainer
:
Builder
;
private
lastHeight
:
string
;
constructor
(
editorService
:
IEditorService
,
keybindingService
:
IKeybindingService
,
contextService
:
IWorkspaceContextService
,
instantiationService
:
IInstantiationService
,
editor
:
ICodeEditor
)
{
private
_editorService
:
IEditorService
;
private
_contextService
:
IWorkspaceContextService
;
private
_instantiationService
:
IInstantiationService
;
private
_decorationsManager
:
DecorationsManager
;
private
_model
:
ReferencesModel
;
private
_callOnModel
:
IDisposable
[]
=
[];
private
_onDidDoubleClick
=
new
Emitter
<
{
reference
:
URI
,
range
:
Range
,
originalEvent
:
MouseEvent
}
>
();
private
_tree
:
Tree
;
private
_treeContainer
:
Builder
;
private
_preview
:
ICodeEditor
;
private
_previewNotAvailableMessage
:
Model
;
private
_previewContainer
:
Builder
;
private
_messageContainer
:
Builder
;
private
_lastHeight
:
string
;
constructor
(
editorService
:
IEditorService
,
keybindingService
:
IKeybindingService
,
contextService
:
IWorkspaceContextService
,
instantiationService
:
IInstantiationService
,
editor
:
ICodeEditor
)
{
super
(
editor
,
keybindingService
,
ReferenceWidget
.
INNER_EDITOR_CONTEXT_KEY
,
{
frameColor
:
'
#007ACC
'
,
showFrame
:
false
,
showArrow
:
true
});
this
.
editorService
=
editorService
;
this
.
contextService
=
contextService
;
this
.
instantiationService
=
instantiationService
.
createChild
(
new
ServiceCollection
([
IPeekViewService
,
this
]));
this
.
callOnModel
=
[];
this
.
_editorService
=
editorService
;
this
.
_contextService
=
contextService
;
this
.
_instantiationService
=
instantiationService
.
createChild
(
new
ServiceCollection
([
IPeekViewService
,
this
]));
this
.
tree
=
null
;
this
.
treeContainer
=
null
;
this
.
_
tree
=
null
;
this
.
_
treeContainer
=
null
;
this
.
preview
=
null
;
this
.
previewContainer
=
null
;
this
.
previewDecorations
=
[];
this
.
_preview
=
null
;
this
.
_previewContainer
=
null
;
this
.
lastHeight
=
null
;
this
.
_
lastHeight
=
null
;
this
.
create
();
}
_onTitleClick
(
e
:
Event
):
void
{
if
(
!
this
.
preview
||
!
this
.
preview
.
getModel
())
{
get
onDidDoubleClick
():
Event
<
{
reference
:
URI
,
range
:
Range
,
originalEvent
:
MouseEvent
}
>
{
return
this
.
_onDidDoubleClick
.
event
;
}
protected
_onTitleClick
(
e
:
MouseEvent
):
void
{
if
(
!
this
.
_preview
||
!
this
.
_preview
.
getModel
())
{
return
;
}
var
model
=
this
.
preview
.
getModel
(),
lineNumber
=
this
.
preview
.
getPosition
().
lineNumber
,
var
model
=
this
.
_
preview
.
getModel
(),
lineNumber
=
this
.
_
preview
.
getPosition
().
lineNumber
,
titleRange
=
new
Range
(
lineNumber
,
1
,
lineNumber
,
model
.
getLineMaxColumn
(
lineNumber
));
this
.
emit
(
ReferenceWidget
.
Events
.
EditorDoubleClick
,
{
reference
:
this
.
getFocusedReference
(),
range
:
titleRange
,
originalEvent
:
e
});
this
.
_onDidDoubleClick
.
fire
({
reference
:
this
.
_getFocusedReference
(),
range
:
titleRange
,
originalEvent
:
e
});
}
_fillBody
(
containerElement
:
HTMLElement
):
void
{
protected
_fillBody
(
containerElement
:
HTMLElement
):
void
{
var
container
=
$
(
containerElement
);
container
.
addClass
(
'
reference-zone-widget
'
);
// message pane
container
.
div
({
'
class
'
:
'
messages
'
},
div
=>
{
this
.
messageContainer
=
div
.
hide
();
this
.
_
messageContainer
=
div
.
hide
();
});
// editor
container
.
div
({
'
class
'
:
'
preview inline
'
},
(
div
:
Builder
)
=>
{
container
.
div
({
'
class
'
:
'
preview inline
'
},
(
div
:
Builder
)
=>
{
var
options
:
editorCommon
.
IEditorOptions
=
{
var
options
:
editorCommon
.
IEditorOptions
=
{
scrollBeyondLastLine
:
false
,
scrollbar
:
DefaultConfig
.
editor
.
scrollbar
,
overviewRulerLanes
:
2
};
this
.
preview
=
this
.
instantiationService
.
createInstance
(
EmbeddedCodeEditorWidget
,
div
.
getHTMLElement
(),
options
,
this
.
editor
);
this
.
previewContainer
=
div
.
hide
();
this
.
previewNotAvailableMessage
=
new
Model
(
nls
.
localize
(
'
missingPreviewMessage
'
,
"
no preview available
"
),
Model
.
DEFAULT_CREATION_OPTIONS
,
null
);
this
.
_preview
=
this
.
_
instantiationService
.
createInstance
(
EmbeddedCodeEditorWidget
,
div
.
getHTMLElement
(),
options
,
this
.
editor
);
this
.
_
previewContainer
=
div
.
hide
();
this
.
_
previewNotAvailableMessage
=
new
Model
(
nls
.
localize
(
'
missingPreviewMessage
'
,
"
no preview available
"
),
Model
.
DEFAULT_CREATION_OPTIONS
,
null
);
});
// tree
container
.
div
({
'
class
'
:
'
ref-tree inline
'
},
(
div
:
Builder
)
=>
{
container
.
div
({
'
class
'
:
'
ref-tree inline
'
},
(
div
:
Builder
)
=>
{
var
config
=
{
dataSource
:
this
.
instantiationService
.
createInstance
(
DataSource
),
renderer
:
this
.
instantiationService
.
createInstance
(
Renderer
,
this
.
editor
),
dataSource
:
this
.
_
instantiationService
.
createInstance
(
DataSource
),
renderer
:
this
.
_
instantiationService
.
createInstance
(
Renderer
,
this
.
editor
),
//sorter: new Sorter(),
controller
:
new
Controller
()
};
...
...
@@ -464,77 +466,77 @@ export class ReferenceWidget extends PeekViewWidget {
twistiePixels
:
20
,
ariaLabel
:
nls
.
localize
(
'
treeAriaLabel
'
,
"
References
"
)
};
this
.
tree
=
new
Tree
(
div
.
getHTMLElement
(),
config
,
options
);
this
.
_
tree
=
new
Tree
(
div
.
getHTMLElement
(),
config
,
options
);
this
.
treeContainer
=
div
.
hide
();
this
.
_
treeContainer
=
div
.
hide
();
});
}
_doLayoutBody
(
heightInPixel
:
number
):
void
{
protected
_doLayoutBody
(
heightInPixel
:
number
):
void
{
super
.
_doLayoutBody
(
heightInPixel
);
var
h
=
heightInPixel
+
'
px
'
;
if
(
h
===
this
.
lastHeight
)
{
if
(
h
===
this
.
_
lastHeight
)
{
return
;
}
// set height
this
.
treeContainer
.
style
({
height
:
h
});
this
.
previewContainer
.
style
({
height
:
h
});
this
.
_
treeContainer
.
style
({
height
:
h
});
this
.
_
previewContainer
.
style
({
height
:
h
});
// forward
this
.
tree
.
layout
(
heightInPixel
);
this
.
preview
.
layout
();
this
.
_
tree
.
layout
(
heightInPixel
);
this
.
_
preview
.
layout
();
this
.
lastHeight
=
h
;
this
.
_
lastHeight
=
h
;
}
public
onWidth
(
widthInPixel
:
number
):
void
{
this
.
preview
.
layout
();
public
onWidth
(
widthInPixel
:
number
):
void
{
this
.
_
preview
.
layout
();
}
public
setModel
(
newModel
:
ReferencesModel
):
void
{
// clean up
this
.
callOnModel
=
dispose
(
this
.
callOnModel
);
this
.
model
=
newModel
;
if
(
this
.
model
)
{
this
.
_callOnModel
=
dispose
(
this
.
_
callOnModel
);
this
.
_
model
=
newModel
;
if
(
this
.
_
model
)
{
this
.
_onNewModel
();
}
}
public
showMessage
(
message
:
string
):
void
{
public
showMessage
(
message
:
string
):
void
{
this
.
setTitle
(
''
);
this
.
messageContainer
.
innerHtml
(
message
).
show
();
this
.
_
messageContainer
.
innerHtml
(
message
).
show
();
}
private
_onNewModel
():
void
{
private
_onNewModel
():
void
{
this
.
messageContainer
.
hide
();
this
.
_
messageContainer
.
hide
();
this
.
decorationsManager
=
new
DecorationsManager
(
this
.
preview
,
this
.
model
);
this
.
callOnModel
.
push
(
this
.
decorationsManager
);
this
.
_decorationsManager
=
new
DecorationsManager
(
this
.
_preview
,
this
.
_
model
);
this
.
_callOnModel
.
push
(
this
.
_
decorationsManager
);
// listen on model changes
this
.
callOnModel
.
push
(
this
.
model
.
addListener2
(
EventType
.
OnReferenceRangeChanged
,
(
reference
:
OneReference
)
=>
{
this
.
tree
.
refresh
(
reference
);
this
.
_callOnModel
.
push
(
this
.
_model
.
addListener2
(
EventType
.
OnReferenceRangeChanged
,
(
reference
:
OneReference
)
=>
{
this
.
_
tree
.
refresh
(
reference
);
}));
// listen on selection and focus
this
.
callOnModel
.
push
(
this
.
tree
.
addListener2
(
Controller
.
Events
.
FOCUSED
,
(
element
)
=>
{
this
.
_callOnModel
.
push
(
this
.
_
tree
.
addListener2
(
Controller
.
Events
.
FOCUSED
,
(
element
)
=>
{
if
(
element
instanceof
OneReference
)
{
this
.
showReferencePreview
(
element
);
this
.
_
showReferencePreview
(
element
);
}
}));
this
.
callOnModel
.
push
(
this
.
tree
.
addListener2
(
Controller
.
Events
.
SELECTED
,
(
element
:
any
)
=>
{
this
.
_callOnModel
.
push
(
this
.
_tree
.
addListener2
(
Controller
.
Events
.
SELECTED
,
(
element
:
any
)
=>
{
if
(
element
instanceof
OneReference
)
{
this
.
showReferencePreview
(
element
);
this
.
model
.
currentReference
=
element
;
this
.
_
showReferencePreview
(
element
);
this
.
_
model
.
currentReference
=
element
;
}
}));
this
.
callOnModel
.
push
(
this
.
tree
.
addListener2
(
Controller
.
Events
.
OPEN_TO_SIDE
,
(
element
:
any
)
=>
{
this
.
_callOnModel
.
push
(
this
.
_tree
.
addListener2
(
Controller
.
Events
.
OPEN_TO_SIDE
,
(
element
:
any
)
=>
{
if
(
element
instanceof
OneReference
)
{
this
.
editorService
.
openEditor
({
resource
:
(
<
OneReference
>
element
).
resource
,
this
.
_
editorService
.
openEditor
({
resource
:
(
<
OneReference
>
element
).
resource
,
options
:
{
selection
:
element
.
range
}
...
...
@@ -542,65 +544,65 @@ export class ReferenceWidget extends PeekViewWidget {
}
}));
var
input
=
this
.
model
.
children
.
length
===
1
?
<
any
>
this
.
model
.
children
[
0
]
:
<
any
>
this
.
model
;
var
input
=
this
.
_model
.
children
.
length
===
1
?
<
any
>
this
.
_model
.
children
[
0
]
:
<
any
>
this
.
_
model
;
this
.
tree
.
setInput
(
input
).
then
(()
=>
{
this
.
tree
.
setSelection
([
this
.
model
.
currentReference
]);
this
.
_
tree
.
setInput
(
input
).
then
(()
=>
{
this
.
_tree
.
setSelection
([
this
.
_
model
.
currentReference
]);
}).
done
(
null
,
onUnexpectedError
);
// listen on editor
this
.
callOnModel
.
push
(
this
.
preview
.
addListener2
(
editorCommon
.
EventType
.
MouseDown
,
(
e
:{
event
:
MouseEvent
;
target
:
IMouseTarget
;
})
=>
{
if
(
e
.
event
.
detail
===
2
)
{
this
.
emit
(
ReferenceWidget
.
Events
.
EditorDoubleClick
,
{
reference
:
this
.
getFocusedReference
(),
range
:
e
.
target
.
range
,
originalEvent
:
e
.
event
});
this
.
_callOnModel
.
push
(
this
.
_preview
.
addListener2
(
editorCommon
.
EventType
.
MouseDown
,
(
e
:
{
event
:
MouseEvent
;
target
:
IMouseTarget
;
})
=>
{
if
(
e
.
event
.
detail
===
2
)
{
this
.
_onDidDoubleClick
.
fire
({
reference
:
this
.
_
getFocusedReference
(),
range
:
e
.
target
.
range
,
originalEvent
:
e
.
event
});
}
}));
// make sure things are rendered
dom
.
addClass
(
this
.
container
,
'
results-loaded
'
);
this
.
treeContainer
.
show
();
this
.
previewContainer
.
show
();
this
.
preview
.
layout
();
this
.
tree
.
layout
();
this
.
_
treeContainer
.
show
();
this
.
_
previewContainer
.
show
();
this
.
_
preview
.
layout
();
this
.
_
tree
.
layout
();
this
.
focus
();
// preview the current reference
this
.
showReferencePreview
(
this
.
model
.
nextReference
(
this
.
model
.
currentReference
));
this
.
_showReferencePreview
(
this
.
_model
.
nextReference
(
this
.
_
model
.
currentReference
));
}
private
getFocusedReference
():
URI
{
var
element
=
this
.
tree
.
getFocus
();
if
(
element
instanceof
OneReference
)
{
return
(
<
OneReference
>
element
).
resource
;
}
else
if
(
element
instanceof
FileReferences
)
{
var
referenceFile
=
(
<
FileReferences
>
element
);
if
(
referenceFile
.
children
.
length
>
0
)
{
private
_
getFocusedReference
():
URI
{
var
element
=
this
.
_
tree
.
getFocus
();
if
(
element
instanceof
OneReference
)
{
return
(
<
OneReference
>
element
).
resource
;
}
else
if
(
element
instanceof
FileReferences
)
{
var
referenceFile
=
(
<
FileReferences
>
element
);
if
(
referenceFile
.
children
.
length
>
0
)
{
return
referenceFile
.
children
[
0
].
resource
;
}
}
return
null
;
}
public
focus
():
void
{
this
.
tree
.
DOMFocus
();
public
focus
():
void
{
this
.
_
tree
.
DOMFocus
();
}
private
showReferencePreview
(
reference
:
OneReference
):
void
{
private
_showReferencePreview
(
reference
:
OneReference
):
void
{
// show in editor
this
.
editorService
.
resolveEditorModel
({
resource
:
reference
.
resource
}).
done
((
model
)
=>
{
this
.
_
editorService
.
resolveEditorModel
({
resource
:
reference
.
resource
}).
done
((
model
)
=>
{
if
(
model
)
{
this
.
preview
.
setModel
(
model
.
textEditorModel
);
if
(
model
)
{
this
.
_
preview
.
setModel
(
model
.
textEditorModel
);
var
sel
=
Range
.
lift
(
reference
.
range
).
collapseToStart
();
this
.
preview
.
setSelection
(
sel
);
this
.
preview
.
revealRangeInCenter
(
sel
);
this
.
_
preview
.
setSelection
(
sel
);
this
.
_
preview
.
revealRangeInCenter
(
sel
);
}
else
{
this
.
preview
.
setModel
(
this
.
previewNotAvailableMessage
);
this
.
_preview
.
setModel
(
this
.
_
previewNotAvailableMessage
);
}
// Update widget header
if
(
reference
.
resource
.
scheme
!==
Schemas
.
inMemory
)
{
this
.
setTitle
(
reference
.
name
,
getPathLabel
(
reference
.
directory
,
this
.
contextService
));
if
(
reference
.
resource
.
scheme
!==
Schemas
.
inMemory
)
{
this
.
setTitle
(
reference
.
name
,
getPathLabel
(
reference
.
directory
,
this
.
_
contextService
));
}
else
{
this
.
setTitle
(
nls
.
localize
(
'
peekView.alternateTitle
'
,
"
References
"
));
}
...
...
@@ -608,17 +610,17 @@ export class ReferenceWidget extends PeekViewWidget {
},
onUnexpectedError
);
// show in tree
this
.
tree
.
reveal
(
reference
)
this
.
_
tree
.
reveal
(
reference
)
.
then
(()
=>
{
this
.
tree
.
setSelection
([
reference
]);
this
.
tree
.
setFocus
(
reference
);
this
.
_
tree
.
setSelection
([
reference
]);
this
.
_
tree
.
setFocus
(
reference
);
})
.
done
(
null
,
onUnexpectedError
);
}
public
dispose
():
void
{
this
.
setModel
(
null
);
dispose
(
<
IDisposable
[]
>
[
this
.
preview
,
this
.
previewNotAvailableMessage
,
this
.
tree
]);
dispose
(
<
IDisposable
[]
>
[
this
.
_preview
,
this
.
_previewNotAvailableMessage
,
this
.
_
tree
]);
super
.
dispose
();
}
}
src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.ts
浏览文件 @
dc92aa11
...
...
@@ -10,6 +10,7 @@ import * as nls from 'vs/nls';
import
{
Action
}
from
'
vs/base/common/actions
'
;
import
*
as
strings
from
'
vs/base/common/strings
'
;
import
{
$
}
from
'
vs/base/browser/builder
'
;
import
Event
,
{
Emitter
}
from
'
vs/base/common/event
'
;
import
*
as
dom
from
'
vs/base/browser/dom
'
;
import
{
ActionBar
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
ServiceIdentifier
,
ServicesAccessor
,
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
...
...
@@ -23,18 +24,14 @@ export var IPeekViewService = createDecorator<IPeekViewService>('peekViewService
export
interface
IPeekViewService
{
serviceId
:
ServiceIdentifier
<
any
>
;
isActive
:
boolean
;
contextKey
:
string
;
isActive
:
boolean
;
contextKey
:
string
;
getActiveWidget
():
PeekViewWidget
;
}
export
namespace
Events
{
export
var
Closed
=
'
closed
'
;
}
var
CONTEXT_OUTER_EDITOR
=
'
outerEditorId
'
;
export
function
getOuterEditor
(
accessor
:
ServicesAccessor
,
args
:
any
):
ICommonCodeEditor
{
export
function
getOuterEditor
(
accessor
:
ServicesAccessor
,
args
:
any
):
ICommonCodeEditor
{
var
outerEditorId
=
args
.
context
[
CONTEXT_OUTER_EDITOR
];
if
(
!
outerEditorId
)
{
return
null
;
...
...
@@ -43,47 +40,53 @@ export function getOuterEditor(accessor:ServicesAccessor, args: any): ICommonCod
}
export
class
PeekViewWidget
extends
ZoneWidget
implements
IPeekViewService
{
public
serviceId
=
IPeekViewService
;
public
contextKey
:
string
;
public
contextKey
:
string
;
private
_isActive
:
boolean
;
private
_onDidClose
=
new
Emitter
<
PeekViewWidget
>
();
private
_isActive
=
false
;
_headElement
:
HTMLDivElement
;
_primaryHeading
:
HTMLElement
;
_secondaryHeading
:
HTMLElement
;
_metaHeading
:
HTMLElement
;
_actionbarWidget
:
ActionBar
;
_bodyElement
:
HTMLDivElement
;
protected
_headElement
:
HTMLDivElement
;
protected
_primaryHeading
:
HTMLElement
;
protected
_secondaryHeading
:
HTMLElement
;
protected
_metaHeading
:
HTMLElement
;
protected
_actionbarWidget
:
ActionBar
;
protected
_bodyElement
:
HTMLDivElement
;
constructor
(
editor
:
ICodeEditor
,
keybindingService
:
IKeybindingService
,
contextKey
:
string
,
options
:
IOptions
=
{})
{
constructor
(
editor
:
ICodeEditor
,
keybindingService
:
IKeybindingService
,
contextKey
:
string
,
options
:
IOptions
=
{})
{
super
(
editor
,
options
);
this
.
contextKey
=
contextKey
;
keybindingService
.
createKey
(
CONTEXT_OUTER_EDITOR
,
editor
.
getId
());
}
public
dispose
():
void
{
public
dispose
():
void
{
this
.
_isActive
=
false
;
super
.
dispose
();
}
public
get
isActive
():
boolean
{
public
get
onDidClose
():
Event
<
PeekViewWidget
>
{
return
this
.
_onDidClose
.
event
;
}
public
get
isActive
():
boolean
{
return
this
.
_isActive
;
}
public
getActiveWidget
():
PeekViewWidget
{
public
getActiveWidget
():
PeekViewWidget
{
return
this
;
}
public
show
(
where
:
any
,
heightInLines
:
number
):
void
{
public
show
(
where
:
any
,
heightInLines
:
number
):
void
{
this
.
_isActive
=
true
;
super
.
show
(
where
,
heightInLines
);
}
public
fillContainer
(
container
:
HTMLElement
):
void
{
public
fillContainer
(
container
:
HTMLElement
):
void
{
$
(
container
).
addClass
(
'
peekview-widget
'
);
this
.
_headElement
=
<
HTMLDivElement
>
$
(
'
.head
'
).
getHTMLElement
();
this
.
_bodyElement
=
<
HTMLDivElement
>
$
(
'
.body
'
).
getHTMLElement
();
this
.
_headElement
=
<
HTMLDivElement
>
$
(
'
.head
'
).
getHTMLElement
();
this
.
_bodyElement
=
<
HTMLDivElement
>
$
(
'
.body
'
).
getHTMLElement
();
this
.
_fillHead
(
this
.
_headElement
);
this
.
_fillBody
(
this
.
_bodyElement
);
...
...
@@ -92,9 +95,9 @@ export class PeekViewWidget extends ZoneWidget implements IPeekViewService {
container
.
appendChild
(
this
.
_bodyElement
);
}
_fillHead
(
container
:
HTMLElement
):
void
{
protected
_fillHead
(
container
:
HTMLElement
):
void
{
var
titleElement
=
$
(
'
.peekview-title
'
).
on
(
dom
.
EventType
.
CLICK
,
(
e
)
=>
this
.
_onTitleClick
(
e
)).
on
(
dom
.
EventType
.
CLICK
,
e
=>
this
.
_onTitleClick
(
<
MouseEvent
>
e
)).
appendTo
(
this
.
_headElement
).
getHTMLElement
();
...
...
@@ -109,18 +112,18 @@ export class PeekViewWidget extends ZoneWidget implements IPeekViewService {
this
.
_actionbarWidget
.
push
(
new
Action
(
'
peekview.close
'
,
nls
.
localize
(
'
label.close
'
,
"
Close
"
),
'
close-peekview-action
'
,
true
,
()
=>
{
this
.
dispose
();
this
.
emit
(
Events
.
Closed
,
this
);
this
.
_onDidClose
.
fire
(
this
);
return
null
;
}),
{
label
:
false
,
icon
:
true
});
}
_onTitleClick
(
event
:
Event
):
void
{
protected
_onTitleClick
(
event
:
MouseEvent
):
void
{
// implement me
}
public
setTitle
(
primaryHeading
:
string
,
secondaryHeading
?:
string
):
void
{
public
setTitle
(
primaryHeading
:
string
,
secondaryHeading
?:
string
):
void
{
$
(
this
.
_primaryHeading
).
safeInnerHtml
(
primaryHeading
);
if
(
secondaryHeading
)
{
if
(
secondaryHeading
)
{
$
(
this
.
_secondaryHeading
).
safeInnerHtml
(
secondaryHeading
);
}
else
{
dom
.
clearNode
(
this
.
_secondaryHeading
);
...
...
@@ -135,16 +138,16 @@ export class PeekViewWidget extends ZoneWidget implements IPeekViewService {
}
}
_fillBody
(
container
:
HTMLElement
):
void
{
protected
_fillBody
(
container
:
HTMLElement
):
void
{
// implement me
}
public
doLayout
(
heightInPixel
:
number
):
void
{
public
doLayout
(
heightInPixel
:
number
):
void
{
if
(
heightInPixel
<
0
)
{
// Looks like the view zone got folded away!
this
.
dispose
();
this
.
emit
(
Events
.
Closed
,
this
);
this
.
_onDidClose
.
fire
(
this
);
return
;
}
...
...
@@ -155,12 +158,12 @@ export class PeekViewWidget extends ZoneWidget implements IPeekViewService {
this
.
_doLayoutBody
(
bodyHeight
);
}
_doLayoutHead
(
heightInPixel
:
number
):
void
{
protected
_doLayoutHead
(
heightInPixel
:
number
):
void
{
this
.
_headElement
.
style
.
height
=
strings
.
format
(
'
{0}px
'
,
heightInPixel
);
this
.
_headElement
.
style
.
lineHeight
=
this
.
_headElement
.
style
.
height
;
}
_doLayoutBody
(
heightInPixel
:
number
):
void
{
protected
_doLayoutBody
(
heightInPixel
:
number
):
void
{
this
.
_bodyElement
.
style
.
height
=
strings
.
format
(
'
{0}px
'
,
heightInPixel
);
}
}
src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts
浏览文件 @
dc92aa11
...
...
@@ -6,7 +6,7 @@
'
use strict
'
;
import
'
vs/css!./zoneWidget
'
;
import
{
EventEmitter
,
ListenerUnbind
}
from
'
vs/base/common/eventEmitter
'
;
import
{
ListenerUnbind
}
from
'
vs/base/common/eventEmitter
'
;
import
*
as
objects
from
'
vs/base/common/objects
'
;
import
*
as
dom
from
'
vs/base/browser/dom
'
;
import
{
EventType
,
IEditorLayoutInfo
,
IPosition
,
IRange
}
from
'
vs/editor/common/editorCommon
'
;
...
...
@@ -80,8 +80,7 @@ class OverlayWidgetDelegate implements IOverlayWidget {
}
// TODO@Joh - this is an event emitter, why?
export
class
ZoneWidget
extends
EventEmitter
{
export
class
ZoneWidget
{
private
zoneId
:
number
;
private
lastView
:
any
;
...
...
@@ -98,7 +97,6 @@ export class ZoneWidget extends EventEmitter {
private
listenersToRemove
:
ListenerUnbind
[];
constructor
(
editor
:
ICodeEditor
,
options
:
IOptions
=
{})
{
super
();
this
.
editor
=
editor
;
this
.
options
=
objects
.
mixin
(
objects
.
clone
(
defaultOptions
),
options
);
this
.
zoneId
=
-
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录