Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
c7b1f298
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,体验更适合开发者的 AI 搜索 >>
提交
c7b1f298
编写于
12月 18, 2019
作者:
S
Sandeep Somavarapu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
move markers panel
上级
3cac7982
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
36 addition
and
31 deletion
+36
-31
src/vs/workbench/contrib/markers/browser/markers.contribution.ts
...workbench/contrib/markers/browser/markers.contribution.ts
+35
-13
src/vs/workbench/contrib/markers/browser/markersPanel.ts
src/vs/workbench/contrib/markers/browser/markersPanel.ts
+1
-18
未找到文件。
src/vs/workbench/contrib/markers/browser/markers.contribution.ts
浏览文件 @
c7b1f298
...
...
@@ -12,9 +12,9 @@ import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/co
import
{
KeyCode
,
KeyMod
}
from
'
vs/base/common/keyCodes
'
;
import
{
localize
}
from
'
vs/nls
'
;
import
{
Marker
,
RelatedInformation
}
from
'
vs/workbench/contrib/markers/browser/markersModel
'
;
import
{
Markers
Panel
,
Markers
View
,
getMarkersView
}
from
'
vs/workbench/contrib/markers/browser/markersPanel
'
;
import
{
MarkersView
,
getMarkersView
}
from
'
vs/workbench/contrib/markers/browser/markersPanel
'
;
import
{
MenuId
,
MenuRegistry
,
SyncActionDescriptor
,
registerAction
}
from
'
vs/platform/actions/common/actions
'
;
import
{
PanelRegistry
,
Extensions
as
PanelExtensions
,
PanelDescriptor
}
from
'
vs/workbench/browser/panel
'
;
import
{
PanelRegistry
,
Extensions
as
PanelExtensions
,
PanelDescriptor
,
PaneCompositePanel
}
from
'
vs/workbench/browser/panel
'
;
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
ToggleMarkersPanelAction
,
ShowProblemsPanelAction
}
from
'
vs/workbench/contrib/markers/browser/markersPanelActions
'
;
import
Constants
from
'
vs/workbench/contrib/markers/browser/constants
'
;
...
...
@@ -30,6 +30,14 @@ import { IStatusbarEntryAccessor, IStatusbarService, StatusbarAlignment, IStatus
import
{
IMarkerService
,
MarkerStatistics
}
from
'
vs/platform/markers/common/markers
'
;
import
{
CommandsRegistry
}
from
'
vs/platform/commands/common/commands
'
;
import
{
ViewContainer
,
IViewContainersRegistry
,
Extensions
as
ViewContainerExtensions
,
ViewContainerLocation
,
IViewsRegistry
}
from
'
vs/workbench/common/views
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IStorageService
}
from
'
vs/platform/storage/common/storage
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IThemeService
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
IContextMenuService
}
from
'
vs/platform/contextview/browser/contextView
'
;
import
{
IExtensionService
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
ViewPaneContainer
}
from
'
vs/workbench/browser/parts/views/viewPaneContainer
'
;
registerSingleton
(
IMarkersWorkbenchService
,
MarkersWorkbenchService
,
false
);
...
...
@@ -92,7 +100,29 @@ Registry.as<IConfigurationRegistry>(Extensions.Configuration).registerConfigurat
});
// markers view container
const
VIEW_CONTAINER
:
ViewContainer
=
Registry
.
as
<
IViewContainersRegistry
>
(
ViewContainerExtensions
.
ViewContainersRegistry
).
registerViewContainer
(
Constants
.
MARKERS_PANEL_ID
,
ViewContainerLocation
.
Panel
);
Registry
.
as
<
IViewsRegistry
>
(
ViewContainerExtensions
.
ViewsRegistry
).
registerViews
([{
id
:
Constants
.
MARKERS_VIEW_ID
,
name
:
Messages
.
MARKERS_PANEL_TITLE_PROBLEMS
,
canToggleVisibility
:
false
,
ctorDescriptor
:
{
ctor
:
MarkersView
},
}],
VIEW_CONTAINER
);
// markers panel
class
MarkersPanel
extends
PaneCompositePanel
{
constructor
(
@
ITelemetryService
telemetryService
:
ITelemetryService
,
@
IStorageService
storageService
:
IStorageService
,
@
IInstantiationService
instantiationService
:
IInstantiationService
,
@
IThemeService
themeService
:
IThemeService
,
@
IContextMenuService
contextMenuService
:
IContextMenuService
,
@
IExtensionService
extensionService
:
IExtensionService
,
@
IWorkspaceContextService
contextService
:
IWorkspaceContextService
)
{
super
(
Constants
.
MARKERS_PANEL_ID
,
instantiationService
.
createInstance
(
ViewPaneContainer
,
Constants
.
MARKERS_PANEL_ID
,
Constants
.
MARKERS_PANEL_STORAGE_ID
,
{
showHeaderInTitleWhenSingleView
:
true
,
donotShowViewTitleWhenSingleView
:
true
}),
telemetryService
,
storageService
,
instantiationService
,
themeService
,
contextMenuService
,
extensionService
,
contextService
);
}
}
Registry
.
as
<
PanelRegistry
>
(
PanelExtensions
.
Panels
).
registerPanel
(
PanelDescriptor
.
create
(
MarkersPanel
,
Constants
.
MARKERS_PANEL_ID
,
...
...
@@ -102,14 +132,6 @@ Registry.as<PanelRegistry>(PanelExtensions.Panels).registerPanel(PanelDescriptor
ToggleMarkersPanelAction
.
ID
));
const
VIEW_CONTAINER
:
ViewContainer
=
Registry
.
as
<
IViewContainersRegistry
>
(
ViewContainerExtensions
.
ViewContainersRegistry
).
registerViewContainer
(
Constants
.
MARKERS_PANEL_ID
,
ViewContainerLocation
.
Panel
);
Registry
.
as
<
IViewsRegistry
>
(
ViewContainerExtensions
.
ViewsRegistry
).
registerViews
([{
id
:
Constants
.
MARKERS_VIEW_ID
,
name
:
Messages
.
MARKERS_PANEL_TITLE_PROBLEMS
,
canToggleVisibility
:
false
,
ctorDescriptor
:
{
ctor
:
MarkersView
},
}],
VIEW_CONTAINER
);
// workbench
const
workbenchRegistry
=
Registry
.
as
<
IWorkbenchContributionsRegistry
>
(
WorkbenchExtensions
.
Workbench
);
workbenchRegistry
.
registerWorkbenchContribution
(
ActivityUpdater
,
LifecyclePhase
.
Restored
);
...
...
@@ -251,9 +273,9 @@ async function copyRelatedInformationMessage(panelService: IPanelService, clipbo
}
function
focusProblemsView
(
panelService
:
IPanelService
)
{
const
activePanel
=
panelService
.
getActivePanel
(
);
if
(
activePanel
instanceof
MarkersPanel
)
{
activePanel
.
focus
();
const
markersView
=
getMarkersView
(
panelService
);
if
(
markersView
)
{
markersView
.
focus
();
}
}
...
...
src/vs/workbench/contrib/markers/browser/markersPanel.ts
浏览文件 @
c7b1f298
...
...
@@ -48,8 +48,7 @@ import { IAccessibilityService } from 'vs/platform/accessibility/common/accessib
import
{
PANEL_BACKGROUND
}
from
'
vs/workbench/common/theme
'
;
import
{
KeyCode
}
from
'
vs/base/common/keyCodes
'
;
import
{
editorLightBulbForeground
,
editorLightBulbAutoFixForeground
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
IExtensionService
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
import
{
ViewPaneContainer
,
ViewPane
,
IViewPaneOptions
}
from
'
vs/workbench/browser/parts/views/viewPaneContainer
'
;
import
{
ViewPane
,
IViewPaneOptions
}
from
'
vs/workbench/browser/parts/views/viewPaneContainer
'
;
import
{
IPanelService
}
from
'
vs/workbench/services/panel/common/panelService
'
;
export
function
getMarkersView
(
panelService
:
IPanelService
):
MarkersView
|
undefined
{
...
...
@@ -72,22 +71,6 @@ function createResourceMarkersIterator(resourceMarkers: ResourceMarkers): Iterat
}
export
class
MarkersPanel
extends
PaneCompositePanel
{
constructor
(
@
ITelemetryService
telemetryService
:
ITelemetryService
,
@
IStorageService
storageService
:
IStorageService
,
@
IInstantiationService
instantiationService
:
IInstantiationService
,
@
IThemeService
themeService
:
IThemeService
,
@
IContextMenuService
contextMenuService
:
IContextMenuService
,
@
IExtensionService
extensionService
:
IExtensionService
,
@
IWorkspaceContextService
contextService
:
IWorkspaceContextService
)
{
super
(
Constants
.
MARKERS_PANEL_ID
,
instantiationService
.
createInstance
(
ViewPaneContainer
,
Constants
.
MARKERS_PANEL_ID
,
Constants
.
MARKERS_PANEL_STORAGE_ID
,
{
showHeaderInTitleWhenSingleView
:
true
,
donotShowViewTitleWhenSingleView
:
true
}),
telemetryService
,
storageService
,
instantiationService
,
themeService
,
contextMenuService
,
extensionService
,
contextService
);
}
}
export
class
MarkersView
extends
ViewPane
implements
IMarkerFilterController
{
private
lastSelectedRelativeTop
:
number
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录