Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
10e17cef
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,发现更多精彩内容 >>
提交
10e17cef
编写于
9月 04, 2017
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove unused service, #28726
上级
c00bdb74
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
7 addition
and
33 deletion
+7
-33
src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts
...editor/contrib/referenceSearch/browser/referenceSearch.ts
+4
-5
src/vs/editor/contrib/referenceSearch/browser/referencesController.ts
...r/contrib/referenceSearch/browser/referencesController.ts
+0
-2
src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts
...ditor/contrib/referenceSearch/browser/referencesWidget.ts
+1
-4
src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.ts
src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.ts
+2
-22
未找到文件。
src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts
浏览文件 @
10e17cef
...
...
@@ -9,7 +9,6 @@ import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
import
URI
from
'
vs/base/common/uri
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
IEditorService
}
from
'
vs/platform/editor/common/editor
'
;
import
{
optional
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
CommandsRegistry
,
ICommandHandler
}
from
'
vs/platform/commands/common/commands
'
;
import
{
IContextKeyService
,
ContextKeyExpr
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
KeybindingsRegistry
}
from
'
vs/platform/keybinding/common/keybindingsRegistry
'
;
...
...
@@ -18,12 +17,13 @@ import { Range } from 'vs/editor/common/core/range';
import
*
as
editorCommon
from
'
vs/editor/common/editorCommon
'
;
import
{
editorAction
,
ServicesAccessor
,
EditorAction
,
CommonEditorRegistry
,
commonEditorContribution
}
from
'
vs/editor/common/editorCommonExtensions
'
;
import
{
Location
,
ReferenceProviderRegistry
}
from
'
vs/editor/common/modes
'
;
import
{
IPeekViewService
,
PeekContext
,
getOuterEditor
}
from
'
vs/editor/contrib/zoneWidget/browser/peekViewWidget
'
;
import
{
PeekContext
,
getOuterEditor
}
from
'
vs/editor/contrib/zoneWidget/browser/peekViewWidget
'
;
import
{
ReferencesController
,
RequestOptions
,
ctxReferenceSearchVisible
}
from
'
./referencesController
'
;
import
{
ReferencesModel
}
from
'
./referencesModel
'
;
import
{
asWinJsPromise
}
from
'
vs/base/common/async
'
;
import
{
onUnexpectedExternalError
}
from
'
vs/base/common/errors
'
;
import
{
EditorContextKeys
}
from
'
vs/editor/common/editorContextKeys
'
;
import
{
EmbeddedCodeEditorWidget
}
from
'
vs/editor/browser/widget/embeddedCodeEditorWidget
'
;
const
defaultReferenceSearchOptions
:
RequestOptions
=
{
getMetaTitle
(
model
)
{
...
...
@@ -38,10 +38,9 @@ export class ReferenceController implements editorCommon.IEditorContribution {
constructor
(
editor
:
editorCommon
.
ICommonCodeEditor
,
@
IContextKeyService
contextKeyService
:
IContextKeyService
,
@
optional
(
IPeekViewService
)
peekViewService
:
IPeekViewService
@
IContextKeyService
contextKeyService
:
IContextKeyService
)
{
if
(
peekViewService
)
{
if
(
editor
instanceof
EmbeddedCodeEditorWidget
)
{
PeekContext
.
inPeekEditor
.
bindTo
(
contextKeyService
);
}
}
...
...
src/vs/editor/contrib/referenceSearch/browser/referencesController.ts
浏览文件 @
10e17cef
...
...
@@ -21,7 +21,6 @@ import { IStorageService } from 'vs/platform/storage/common/storage';
import
*
as
editorCommon
from
'
vs/editor/common/editorCommon
'
;
import
{
ICodeEditor
}
from
'
vs/editor/browser/editorBrowser
'
;
import
{
editorContribution
}
from
'
vs/editor/browser/editorBrowserExtensions
'
;
import
{
IPeekViewService
}
from
'
vs/editor/contrib/zoneWidget/browser/peekViewWidget
'
;
import
{
ReferencesModel
,
OneReference
}
from
'
./referencesModel
'
;
import
{
ReferenceWidget
,
LayoutData
}
from
'
./referencesWidget
'
;
import
{
Range
}
from
'
vs/editor/common/core/range
'
;
...
...
@@ -67,7 +66,6 @@ export class ReferencesController implements editorCommon.IEditorContribution {
@
IStorageService
private
_storageService
:
IStorageService
,
@
IThemeService
private
_themeService
:
IThemeService
,
@
IConfigurationService
private
_configurationService
:
IConfigurationService
,
@
optional
(
IPeekViewService
)
private
_peekViewService
:
IPeekViewService
,
@
optional
(
IEnvironmentService
)
private
_environmentService
:
IEnvironmentService
)
{
this
.
_editor
=
editor
;
...
...
src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts
浏览文件 @
10e17cef
...
...
@@ -26,14 +26,13 @@ import * as tree from 'vs/base/parts/tree/browser/tree';
import
{
DefaultController
}
from
'
vs/base/parts/tree/browser/treeDefaults
'
;
import
{
Tree
}
from
'
vs/base/parts/tree/browser/treeImpl
'
;
import
{
IInstantiationService
,
optional
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
ServiceCollection
}
from
'
vs/platform/instantiation/common/serviceCollection
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
Range
,
IRange
}
from
'
vs/editor/common/core/range
'
;
import
*
as
editorCommon
from
'
vs/editor/common/editorCommon
'
;
import
{
Model
}
from
'
vs/editor/common/model/model
'
;
import
{
ICodeEditor
}
from
'
vs/editor/browser/editorBrowser
'
;
import
{
EmbeddedCodeEditorWidget
}
from
'
vs/editor/browser/widget/embeddedCodeEditorWidget
'
;
import
{
PeekViewWidget
,
IPeekViewService
}
from
'
vs/editor/contrib/zoneWidget/browser/peekViewWidget
'
;
import
{
PeekViewWidget
}
from
'
vs/editor/contrib/zoneWidget/browser/peekViewWidget
'
;
import
{
FileReferences
,
OneReference
,
ReferencesModel
}
from
'
./referencesModel
'
;
import
{
ITextModelService
,
ITextEditorModel
}
from
'
vs/editor/common/services/resolverService
'
;
import
{
registerColor
,
activeContrastBorder
,
contrastBorder
}
from
'
vs/platform/theme/common/colorRegistry
'
;
...
...
@@ -584,8 +583,6 @@ export class ReferenceWidget extends PeekViewWidget {
this
.
_applyTheme
(
_themeService
.
getTheme
());
this
.
_callOnDispose
.
push
(
_themeService
.
onThemeChange
(
this
.
_applyTheme
.
bind
(
this
)));
this
.
_instantiationService
=
this
.
_instantiationService
.
createChild
(
new
ServiceCollection
([
IPeekViewService
,
this
]));
this
.
create
();
}
...
...
src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.ts
浏览文件 @
10e17cef
...
...
@@ -14,7 +14,7 @@ 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
{
ServicesAccessor
,
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
ServicesAccessor
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
ICommonCodeEditor
}
from
'
vs/editor/common/editorCommon
'
;
import
{
ICodeEditorService
}
from
'
vs/editor/common/services/codeEditorService
'
;
import
{
ICodeEditor
}
from
'
vs/editor/browser/editorBrowser
'
;
...
...
@@ -23,20 +23,11 @@ import { EmbeddedCodeEditorWidget } from 'vs/editor/browser/widget/embeddedCodeE
import
{
ContextKeyExpr
,
RawContextKey
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
Color
}
from
'
vs/base/common/color
'
;
export
var
IPeekViewService
=
createDecorator
<
IPeekViewService
>
(
'
peekViewService
'
);
export
namespace
PeekContext
{
export
const
inPeekEditor
=
new
RawContextKey
<
boolean
>
(
'
inReferenceSearchEditor
'
,
true
);
export
const
notInPeekEditor
:
ContextKeyExpr
=
inPeekEditor
.
toNegated
();
}
export
const
NOT_INNER_EDITOR_CONTEXT_KEY
=
new
RawContextKey
<
boolean
>
(
'
inReferenceSearchEditor
'
,
true
);
export
interface
IPeekViewService
{
_serviceBrand
:
any
;
isActive
:
boolean
;
}
export
function
getOuterEditor
(
accessor
:
ServicesAccessor
):
ICommonCodeEditor
{
let
editor
=
accessor
.
get
(
ICodeEditorService
).
getFocusedCodeEditor
();
if
(
editor
instanceof
EmbeddedCodeEditorWidget
)
{
...
...
@@ -60,12 +51,11 @@ const defaultOptions: IPeekViewOptions = {
secondaryHeadingColor
:
Color
.
fromHex
(
'
#6c6c6cb3
'
)
};
export
abstract
class
PeekViewWidget
extends
ZoneWidget
implements
IPeekViewService
{
export
abstract
class
PeekViewWidget
extends
ZoneWidget
{
public
_serviceBrand
:
any
;
private
_onDidClose
=
new
Emitter
<
PeekViewWidget
>
();
private
_isActive
=
false
;
protected
_headElement
:
HTMLDivElement
;
protected
_primaryHeading
:
HTMLElement
;
...
...
@@ -80,7 +70,6 @@ export abstract class PeekViewWidget extends ZoneWidget implements IPeekViewServ
}
public
dispose
():
void
{
this
.
_isActive
=
false
;
super
.
dispose
();
this
.
_onDidClose
.
fire
(
this
);
}
...
...
@@ -89,15 +78,6 @@ export abstract class PeekViewWidget extends ZoneWidget implements IPeekViewServ
return
this
.
_onDidClose
.
event
;
}
public
get
isActive
():
boolean
{
return
this
.
_isActive
;
}
public
show
(
where
:
any
,
heightInLines
:
number
):
void
{
this
.
_isActive
=
true
;
super
.
show
(
where
,
heightInLines
);
}
public
style
(
styles
:
IPeekViewStyles
):
void
{
let
options
=
<
IPeekViewOptions
>
this
.
options
;
if
(
styles
.
headerBackgroundColor
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录