Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
943b7823
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,发现更多精彩内容 >>
提交
943b7823
编写于
6月 06, 2019
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
paper cut - offer a menu to control visibility of status bar entries
上级
bd39f3d7
变更
18
展开全部
隐藏空白更改
内联
并排
Showing
18 changed file
with
435 addition
and
184 deletion
+435
-184
src/vs/platform/statusbar/common/statusbar.ts
src/vs/platform/statusbar/common/statusbar.ts
+12
-1
src/vs/workbench/api/browser/mainThreadStatusBar.ts
src/vs/workbench/api/browser/mainThreadStatusBar.ts
+15
-4
src/vs/workbench/api/common/extHost.protocol.ts
src/vs/workbench/api/common/extHost.protocol.ts
+1
-1
src/vs/workbench/api/common/extHostStatusBar.ts
src/vs/workbench/api/common/extHostStatusBar.ts
+7
-7
src/vs/workbench/api/node/extHost.api.impl.ts
src/vs/workbench/api/node/extHost.api.impl.ts
+1
-1
src/vs/workbench/browser/parts/editor/editor.contribution.ts
src/vs/workbench/browser/parts/editor/editor.contribution.ts
+12
-2
src/vs/workbench/browser/parts/notifications/notificationsStatus.ts
...kbench/browser/parts/notifications/notificationsStatus.ts
+5
-1
src/vs/workbench/browser/parts/statusbar/statusbar.ts
src/vs/workbench/browser/parts/statusbar/statusbar.ts
+18
-16
src/vs/workbench/browser/parts/statusbar/statusbarPart.ts
src/vs/workbench/browser/parts/statusbar/statusbarPart.ts
+355
-121
src/vs/workbench/contrib/debug/browser/debugStatus.ts
src/vs/workbench/contrib/debug/browser/debugStatus.ts
+1
-0
src/vs/workbench/contrib/extensions/electron-browser/extensionProfileService.ts
...ib/extensions/electron-browser/extensionProfileService.ts
+1
-0
src/vs/workbench/contrib/feedback/electron-browser/feedback.contribution.ts
...ontrib/feedback/electron-browser/feedback.contribution.ts
+1
-0
src/vs/workbench/contrib/feedback/electron-browser/feedbackStatusbarItem.ts
...ontrib/feedback/electron-browser/feedbackStatusbarItem.ts
+1
-30
src/vs/workbench/contrib/markers/browser/markers.contribution.ts
...workbench/contrib/markers/browser/markers.contribution.ts
+1
-0
src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts
...ch/contrib/remote/electron-browser/remote.contribution.ts
+1
-0
src/vs/workbench/contrib/scm/browser/scmActivity.ts
src/vs/workbench/contrib/scm/browser/scmActivity.ts
+1
-0
src/vs/workbench/contrib/tasks/electron-browser/task.contribution.ts
...bench/contrib/tasks/electron-browser/task.contribution.ts
+1
-0
src/vs/workbench/services/progress/browser/progressService.ts
...vs/workbench/services/progress/browser/progressService.ts
+1
-0
未找到文件。
src/vs/platform/statusbar/common/statusbar.ts
浏览文件 @
943b7823
...
...
@@ -11,7 +11,13 @@ import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions';
export
const
IStatusbarService
=
createDecorator
<
IStatusbarService
>
(
'
statusbarService
'
);
export
const
enum
StatusbarAlignment
{
LEFT
,
RIGHT
LEFT
,
RIGHT
}
export
interface
IStatusbarEntryCategory
{
id
:
string
;
label
:
string
;
}
/**
...
...
@@ -19,6 +25,11 @@ export const enum StatusbarAlignment {
*/
export
interface
IStatusbarEntry
{
/**
* The category of the entry is needed to allow users to hide entries via settings.
*/
readonly
category
:
IStatusbarEntryCategory
;
/**
* The text to show for the entry. You can embed icons in the text by leveraging the syntax:
*
...
...
src/vs/workbench/api/browser/mainThreadStatusBar.ts
浏览文件 @
943b7823
...
...
@@ -3,12 +3,13 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
IStatusbarService
,
StatusbarAlignment
as
MainThreadStatusBarAlignment
,
IStatusbarEntryAccessor
}
from
'
vs/platform/statusbar/common/statusbar
'
;
import
{
IStatusbarService
,
StatusbarAlignment
as
MainThreadStatusBarAlignment
,
IStatusbarEntryAccessor
,
IStatusbarEntry
}
from
'
vs/platform/statusbar/common/statusbar
'
;
import
{
MainThreadStatusBarShape
,
MainContext
,
IExtHostContext
}
from
'
../common/extHost.protocol
'
;
import
{
ThemeColor
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
extHostNamedCustomer
}
from
'
vs/workbench/api/common/extHostCustomers
'
;
import
{
ExtensionIdentifier
}
from
'
vs/platform/extensions/common/extensions
'
;
import
{
IExtensionDescription
}
from
'
vs/platform/extensions/common/extensions
'
;
import
{
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
localize
}
from
'
vs/nls
'
;
@
extHostNamedCustomer
(
MainContext
.
MainThreadStatusBar
)
export
class
MainThreadStatusBar
implements
MainThreadStatusBarShape
{
...
...
@@ -25,8 +26,18 @@ export class MainThreadStatusBar implements MainThreadStatusBarShape {
this
.
entries
.
clear
();
}
$setEntry
(
id
:
number
,
extensionId
:
ExtensionIdentifier
,
text
:
string
,
tooltip
:
string
,
command
:
string
,
color
:
string
|
ThemeColor
,
alignment
:
MainThreadStatusBarAlignment
,
priority
:
number
):
void
{
const
entry
=
{
text
,
tooltip
,
command
,
color
,
extensionId
};
$setEntry
(
id
:
number
,
extension
:
IExtensionDescription
,
text
:
string
,
tooltip
:
string
,
command
:
string
,
color
:
string
|
ThemeColor
,
alignment
:
MainThreadStatusBarAlignment
,
priority
:
number
):
void
{
const
entry
:
IStatusbarEntry
=
{
category
:
{
id
:
extension
.
identifier
.
value
,
label
:
localize
(
'
extensionLabel
'
,
"
{0} (Extension)
"
,
extension
.
displayName
||
extension
.
name
)
},
text
,
tooltip
,
command
,
color
,
extensionId
:
extension
.
identifier
};
// Reset existing entry if alignment or priority changed
let
existingEntry
=
this
.
entries
.
get
(
id
);
...
...
src/vs/workbench/api/common/extHost.protocol.ts
浏览文件 @
943b7823
...
...
@@ -495,7 +495,7 @@ export interface MainThreadQuickOpenShape extends IDisposable {
}
export
interface
MainThreadStatusBarShape
extends
IDisposable
{
$setEntry
(
id
:
number
,
extension
Id
:
ExtensionIdentifier
|
undefined
,
text
:
string
,
tooltip
:
string
,
command
:
string
,
color
:
string
|
ThemeColor
,
alignment
:
statusbar
.
StatusbarAlignment
,
priority
:
number
|
undefined
):
void
;
$setEntry
(
id
:
number
,
extension
:
IExtensionDescription
|
undefined
,
text
:
string
,
tooltip
:
string
,
command
:
string
,
color
:
string
|
ThemeColor
,
alignment
:
statusbar
.
StatusbarAlignment
,
priority
:
number
|
undefined
):
void
;
$dispose
(
id
:
number
):
void
;
}
...
...
src/vs/workbench/api/common/extHostStatusBar.ts
浏览文件 @
943b7823
...
...
@@ -7,7 +7,7 @@ import { StatusbarAlignment as MainThreadStatusBarAlignment } from 'vs/platform/
import
{
StatusBarAlignment
as
ExtHostStatusBarAlignment
,
Disposable
,
ThemeColor
}
from
'
./extHostTypes
'
;
import
{
StatusBarItem
,
StatusBarAlignment
}
from
'
vscode
'
;
import
{
MainContext
,
MainThreadStatusBarShape
,
IMainContext
}
from
'
./extHost.protocol
'
;
import
{
ExtensionIdentifier
}
from
'
vs/platform/extensions/common/extensions
'
;
import
{
IExtensionDescription
}
from
'
vs/platform/extensions/common/extensions
'
;
export
class
ExtHostStatusBarEntry
implements
StatusBarItem
{
private
static
ID_GEN
=
0
;
...
...
@@ -26,14 +26,14 @@ export class ExtHostStatusBarEntry implements StatusBarItem {
private
_timeoutHandle
:
any
;
private
_proxy
:
MainThreadStatusBarShape
;
private
_extension
Id
?:
ExtensionIdentifier
;
private
_extension
?:
IExtensionDescription
;
constructor
(
proxy
:
MainThreadStatusBarShape
,
extension
Id
:
ExtensionIdentifier
|
undefined
,
alignment
:
ExtHostStatusBarAlignment
=
ExtHostStatusBarAlignment
.
Left
,
priority
?:
number
)
{
constructor
(
proxy
:
MainThreadStatusBarShape
,
extension
:
IExtensionDescription
|
undefined
,
alignment
:
ExtHostStatusBarAlignment
=
ExtHostStatusBarAlignment
.
Left
,
priority
?:
number
)
{
this
.
_id
=
ExtHostStatusBarEntry
.
ID_GEN
++
;
this
.
_proxy
=
proxy
;
this
.
_alignment
=
alignment
;
this
.
_priority
=
priority
;
this
.
_extension
Id
=
extensionId
;
this
.
_extension
=
extension
;
}
public
get
id
():
number
{
...
...
@@ -107,7 +107,7 @@ export class ExtHostStatusBarEntry implements StatusBarItem {
this
.
_timeoutHandle
=
undefined
;
// Set to status bar
this
.
_proxy
.
$setEntry
(
this
.
id
,
this
.
_extension
Id
,
this
.
text
,
this
.
tooltip
,
this
.
command
,
this
.
color
,
this
.
_proxy
.
$setEntry
(
this
.
id
,
this
.
_extension
,
this
.
text
,
this
.
tooltip
,
this
.
command
,
this
.
color
,
this
.
_alignment
===
ExtHostStatusBarAlignment
.
Left
?
MainThreadStatusBarAlignment
.
LEFT
:
MainThreadStatusBarAlignment
.
RIGHT
,
this
.
_priority
);
},
0
);
...
...
@@ -167,8 +167,8 @@ export class ExtHostStatusBar {
this
.
_statusMessage
=
new
StatusBarMessage
(
this
);
}
createStatusBarEntry
(
extension
Id
:
ExtensionIdentifier
|
undefined
,
alignment
?:
ExtHostStatusBarAlignment
,
priority
?:
number
):
StatusBarItem
{
return
new
ExtHostStatusBarEntry
(
this
.
_proxy
,
extension
Id
,
alignment
,
priority
);
createStatusBarEntry
(
extension
:
IExtensionDescription
|
undefined
,
alignment
?:
ExtHostStatusBarAlignment
,
priority
?:
number
):
StatusBarItem
{
return
new
ExtHostStatusBarEntry
(
this
.
_proxy
,
extension
,
alignment
,
priority
);
}
setStatusBarMessage
(
text
:
string
,
timeoutOrThenable
?:
number
|
Thenable
<
any
>
):
Disposable
{
...
...
src/vs/workbench/api/node/extHost.api.impl.ts
浏览文件 @
943b7823
...
...
@@ -466,7 +466,7 @@ export function createApiFactory(
return
extHostDialogs
.
showSaveDialog
(
options
);
},
createStatusBarItem
(
position
?:
vscode
.
StatusBarAlignment
,
priority
?:
number
):
vscode
.
StatusBarItem
{
return
extHostStatusBar
.
createStatusBarEntry
(
extension
.
identifier
,
<
number
>
position
,
priority
);
return
extHostStatusBar
.
createStatusBarEntry
(
extension
,
<
number
>
position
,
priority
);
},
setStatusBarMessage
(
text
:
string
,
timeoutOrThenable
?:
number
|
Thenable
<
any
>
):
vscode
.
Disposable
{
return
extHostStatusBar
.
setStatusBarMessage
(
text
,
timeoutOrThenable
);
...
...
src/vs/workbench/browser/parts/editor/editor.contribution.ts
浏览文件 @
943b7823
...
...
@@ -221,10 +221,20 @@ registerEditorContribution(OpenWorkspaceButtonContribution);
// Register Editor Status
const
statusBar
=
Registry
.
as
<
IStatusbarRegistry
>
(
StatusExtensions
.
Statusbar
);
statusBar
.
registerStatusbarItem
(
new
StatusbarItemDescriptor
(
EditorStatus
,
StatusbarAlignment
.
RIGHT
,
100
/* towards the left of the right hand side */
));
statusBar
.
registerStatusbarItem
(
new
StatusbarItemDescriptor
(
EditorStatus
,
{
id
:
'
status.editor
'
,
label
:
nls
.
localize
(
'
status.editor
'
,
"
Editor Status
"
)
},
StatusbarAlignment
.
RIGHT
,
100
/* towards the left of the right hand side */
));
// Register Zoom Status
statusBar
.
registerStatusbarItem
(
new
StatusbarItemDescriptor
(
ZoomStatusbarItem
,
StatusbarAlignment
.
RIGHT
,
101
/* to the left of editor status (100) */
));
statusBar
.
registerStatusbarItem
(
new
StatusbarItemDescriptor
(
ZoomStatusbarItem
,
{
id
:
'
status.imageZoom
'
,
label
:
nls
.
localize
(
'
status.imageZoom
'
,
"
Image Zoom
"
)
},
StatusbarAlignment
.
RIGHT
,
101
/* to the left of editor status (100) */
)
);
// Register Status Actions
const
registry
=
Registry
.
as
<
IWorkbenchActionRegistry
>
(
ActionExtensions
.
WorkbenchActions
);
...
...
src/vs/workbench/browser/parts/notifications/notificationsStatus.ts
浏览文件 @
943b7823
...
...
@@ -58,6 +58,7 @@ export class NotificationsStatus extends Disposable {
private
updateNotificationsCenterStatusItem
():
void
{
const
statusProperties
:
IStatusbarEntry
=
{
category
:
{
id
:
'
status.notifications
'
,
label
:
localize
(
'
status.notifications
'
,
"
Notifictions
"
)
},
text
:
this
.
currentNotifications
.
size
===
0
?
'
$(bell)
'
:
`$(bell)
${
this
.
currentNotifications
.
size
}
`
,
command
:
this
.
isNotificationsCenterVisible
?
HIDE_NOTIFICATIONS_CENTER
:
SHOW_NOTIFICATIONS_CENTER
,
tooltip
:
this
.
getTooltip
(),
...
...
@@ -137,7 +138,10 @@ export class NotificationsStatus extends Disposable {
// Create new
let
statusMessageEntry
:
IStatusbarEntryAccessor
;
let
showHandle
:
any
=
setTimeout
(()
=>
{
statusMessageEntry
=
this
.
statusbarService
.
addEntry
({
text
:
message
},
StatusbarAlignment
.
LEFT
,
-
Number
.
MAX_VALUE
/* far right on left hand side */
);
statusMessageEntry
=
this
.
statusbarService
.
addEntry
({
category
:
{
id
:
'
status.message
'
,
label
:
localize
(
'
status.message
'
,
"
Status Message
"
)
},
text
:
message
},
StatusbarAlignment
.
LEFT
,
-
Number
.
MAX_VALUE
/* far right on left hand side */
);
showHandle
=
null
;
},
showAfter
);
...
...
src/vs/workbench/browser/parts/statusbar/statusbar.ts
浏览文件 @
943b7823
...
...
@@ -5,7 +5,7 @@
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
IDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
StatusbarAlignment
}
from
'
vs/platform/statusbar/common/statusbar
'
;
import
{
StatusbarAlignment
,
IStatusbarEntryCategory
}
from
'
vs/platform/statusbar/common/statusbar
'
;
import
{
SyncDescriptor0
,
createSyncDescriptor
}
from
'
vs/platform/instantiation/common/descriptors
'
;
import
{
IConstructorSignature0
}
from
'
vs/platform/instantiation/common/instantiation
'
;
...
...
@@ -14,11 +14,18 @@ export interface IStatusbarItem {
}
export
class
StatusbarItemDescriptor
{
syncDescriptor
:
SyncDescriptor0
<
IStatusbarItem
>
;
alignment
:
StatusbarAlignment
;
priority
:
number
;
constructor
(
ctor
:
IConstructorSignature0
<
IStatusbarItem
>
,
alignment
?:
StatusbarAlignment
,
priority
?:
number
)
{
readonly
syncDescriptor
:
SyncDescriptor0
<
IStatusbarItem
>
;
readonly
category
:
IStatusbarEntryCategory
;
readonly
alignment
:
StatusbarAlignment
;
readonly
priority
:
number
;
constructor
(
ctor
:
IConstructorSignature0
<
IStatusbarItem
>
,
category
:
IStatusbarEntryCategory
,
alignment
?:
StatusbarAlignment
,
priority
?:
number
)
{
this
.
category
=
category
;
this
.
syncDescriptor
=
createSyncDescriptor
(
ctor
);
this
.
alignment
=
alignment
||
StatusbarAlignment
.
LEFT
;
this
.
priority
=
priority
||
0
;
...
...
@@ -26,21 +33,16 @@ export class StatusbarItemDescriptor {
}
export
interface
IStatusbarRegistry
{
readonly
items
:
StatusbarItemDescriptor
[];
registerStatusbarItem
(
descriptor
:
StatusbarItemDescriptor
):
void
;
items
:
StatusbarItemDescriptor
[];
}
class
StatusbarRegistry
implements
IStatusbarRegistry
{
private
_items
:
StatusbarItemDescriptor
[];
constructor
()
{
this
.
_items
=
[];
}
get
items
():
StatusbarItemDescriptor
[]
{
return
this
.
_items
;
}
private
readonly
_items
:
StatusbarItemDescriptor
[]
=
[];
get
items
():
StatusbarItemDescriptor
[]
{
return
this
.
_items
;
}
registerStatusbarItem
(
descriptor
:
StatusbarItemDescriptor
):
void
{
this
.
_items
.
push
(
descriptor
);
...
...
src/vs/workbench/browser/parts/statusbar/statusbarPart.ts
浏览文件 @
943b7823
此差异已折叠。
点击以展开。
src/vs/workbench/contrib/debug/browser/debugStatus.ts
浏览文件 @
943b7823
...
...
@@ -65,6 +65,7 @@ export class DebugStatusContribution implements IWorkbenchContribution {
private
get
entry
():
IStatusbarEntry
{
return
{
category
:
{
id
:
'
status.debug
'
,
label
:
nls
.
localize
(
'
status.debug
'
,
"
Debug Configuration
"
)
},
text
:
this
.
getText
(),
tooltip
:
nls
.
localize
(
'
selectAndStartDebug
'
,
"
Select and start debug configuration
"
),
command
:
'
workbench.action.debug.selectandstart
'
...
...
src/vs/workbench/contrib/extensions/electron-browser/extensionProfileService.ts
浏览文件 @
943b7823
...
...
@@ -84,6 +84,7 @@ export class ExtensionHostProfileService extends Disposable implements IExtensio
if
(
visible
)
{
const
indicator
:
IStatusbarEntry
=
{
category
:
{
id
:
'
status.profiler
'
,
label
:
nls
.
localize
(
'
status.profiler
'
,
"
Extension Profiler
"
)
},
text
:
nls
.
localize
(
'
profilingExtensionHost
'
,
"
$(sync~spin) Profiling Extension Host
"
),
tooltip
:
nls
.
localize
(
'
selectAndStartDebug
'
,
"
Click to stop profiling.
"
),
command
:
'
workbench.action.extensionHostProfilder.stop
'
...
...
src/vs/workbench/contrib/feedback/electron-browser/feedback.contribution.ts
浏览文件 @
943b7823
...
...
@@ -13,6 +13,7 @@ import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'v
// Register Statusbar item
Registry
.
as
<
IStatusbarRegistry
>
(
Extensions
.
Statusbar
).
registerStatusbarItem
(
new
StatusbarItemDescriptor
(
FeedbackStatusbarItem
,
{
id
:
'
status.feedback
'
,
label
:
localize
(
'
status.feedback
'
,
"
Send Feedback
"
)
},
StatusbarAlignment
.
RIGHT
,
-
100
/* towards the end of the right hand side */
));
...
...
src/vs/workbench/contrib/feedback/electron-browser/feedbackStatusbarItem.ts
浏览文件 @
943b7823
...
...
@@ -6,7 +6,7 @@
import
{
IDisposable
,
dispose
,
Disposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
IStatusbarItem
}
from
'
vs/workbench/browser/parts/statusbar/statusbar
'
;
import
{
FeedbackDropdown
,
IFeedback
,
IFeedbackDelegate
,
FEEDBACK_VISIBLE_CONFIG
}
from
'
vs/workbench/contrib/feedback/electron-browser/feedback
'
;
import
{
IContextViewService
,
IContextMenuService
}
from
'
vs/platform/contextview/browser/contextView
'
;
import
{
IContextViewService
}
from
'
vs/platform/contextview/browser/contextView
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
product
from
'
vs/platform/product/node/product
'
;
import
{
Themable
,
STATUS_BAR_ITEM_HOVER_BACKGROUND
}
from
'
vs/workbench/common/theme
'
;
...
...
@@ -14,8 +14,6 @@ import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector }
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IConfigurationChangeEvent
,
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
clearNode
,
EventHelper
,
addClass
,
removeClass
,
addDisposableListener
}
from
'
vs/base/browser/dom
'
;
import
{
localize
}
from
'
vs/nls
'
;
import
{
Action
}
from
'
vs/base/common/actions
'
;
class
TwitterFeedbackService
implements
IFeedbackDelegate
{
...
...
@@ -54,13 +52,11 @@ export class FeedbackStatusbarItem extends Themable implements IStatusbarItem {
private
dropdown
:
FeedbackDropdown
|
undefined
;
private
enabled
:
boolean
;
private
container
:
HTMLElement
;
private
hideAction
:
HideAction
;
constructor
(
@
IInstantiationService
private
readonly
instantiationService
:
IInstantiationService
,
@
IContextViewService
private
readonly
contextViewService
:
IContextViewService
,
@
IWorkspaceContextService
private
readonly
contextService
:
IWorkspaceContextService
,
@
IContextMenuService
private
readonly
contextMenuService
:
IContextMenuService
,
@
IConfigurationService
private
readonly
configurationService
:
IConfigurationService
,
@
IThemeService
themeService
:
IThemeService
)
{
...
...
@@ -68,8 +64,6 @@ export class FeedbackStatusbarItem extends Themable implements IStatusbarItem {
this
.
enabled
=
this
.
configurationService
.
getValue
(
FEEDBACK_VISIBLE_CONFIG
);
this
.
hideAction
=
this
.
_register
(
this
.
instantiationService
.
createInstance
(
HideAction
));
this
.
registerListeners
();
}
...
...
@@ -95,16 +89,6 @@ export class FeedbackStatusbarItem extends Themable implements IStatusbarItem {
}
},
true
));
// Offer context menu to hide status bar entry
this
.
_register
(
addDisposableListener
(
this
.
container
,
'
contextmenu
'
,
e
=>
{
EventHelper
.
stop
(
e
,
true
);
this
.
contextMenuService
.
showContextMenu
({
getAnchor
:
()
=>
this
.
container
,
getActions
:
()
=>
[
this
.
hideAction
]
});
}));
return
this
.
update
();
}
...
...
@@ -143,19 +127,6 @@ export class FeedbackStatusbarItem extends Themable implements IStatusbarItem {
}
}
class
HideAction
extends
Action
{
constructor
(
@
IConfigurationService
private
readonly
configurationService
:
IConfigurationService
)
{
super
(
'
feedback.hide
'
,
localize
(
'
hide
'
,
"
Hide
"
));
}
run
(
extensionId
:
string
):
Promise
<
any
>
{
return
this
.
configurationService
.
updateValue
(
FEEDBACK_VISIBLE_CONFIG
,
false
);
}
}
registerThemingParticipant
((
theme
:
ITheme
,
collector
:
ICssStyleCollector
)
=>
{
const
statusBarItemHoverBackground
=
theme
.
getColor
(
STATUS_BAR_ITEM_HOVER_BACKGROUND
);
if
(
statusBarItemHoverBackground
)
{
...
...
src/vs/workbench/contrib/markers/browser/markers.contribution.ts
浏览文件 @
943b7823
...
...
@@ -286,6 +286,7 @@ class MarkersStatusBarContributions extends Disposable implements IWorkbenchCont
private
getMarkersItem
():
IStatusbarEntry
{
const
markersStatistics
=
this
.
markerService
.
getStatistics
();
return
{
category
:
{
id
:
'
status.problems
'
,
label
:
localize
(
'
status.problems
'
,
"
Problems
"
)
},
text
:
this
.
getMarkersText
(
markersStatistics
),
tooltip
:
this
.
getMarkersTooltip
(
markersStatistics
),
command
:
'
workbench.actions.view.toggleProblems
'
...
...
src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts
浏览文件 @
943b7823
...
...
@@ -138,6 +138,7 @@ export class RemoteWindowActiveIndicator extends Disposable implements IWorkbenc
private
renderWindowIndicator
(
text
:
string
,
tooltip
?:
string
,
command
?:
string
):
void
{
const
properties
:
IStatusbarEntry
=
{
category
:
{
id
:
'
status.host
'
,
label
:
nls
.
localize
(
'
status.host
'
,
"
Remote Host
"
)
},
backgroundColor
:
themeColorFromId
(
STATUS_BAR_HOST_NAME_BACKGROUND
),
color
:
themeColorFromId
(
STATUS_BAR_HOST_NAME_FOREGROUND
),
text
,
tooltip
,
command
};
if
(
this
.
windowIndicatorEntry
)
{
...
...
src/vs/workbench/contrib/scm/browser/scmActivity.ts
浏览文件 @
943b7823
...
...
@@ -190,6 +190,7 @@ export class StatusBarController implements IWorkbenchContribution {
const
disposables
=
new
DisposableStore
();
for
(
const
c
of
commands
)
{
disposables
.
add
(
this
.
statusbarService
.
addEntry
({
category
:
{
id
:
'
status.scm
'
,
label
:
localize
(
'
status.scm
'
,
"
Source Control
"
)
},
text
:
c
.
title
,
tooltip
:
`
${
label
}
-
${
c
.
tooltip
}
`
,
command
:
c
.
id
,
...
...
src/vs/workbench/contrib/tasks/electron-browser/task.contribution.ts
浏览文件 @
943b7823
...
...
@@ -182,6 +182,7 @@ export class TaskStatusBarContributions extends Disposable implements IWorkbench
}
}
else
{
const
itemProps
:
IStatusbarEntry
=
{
category
:
{
id
:
'
status.runningTasks
'
,
label
:
nls
.
localize
(
'
status.runningTasks
'
,
"
Running Tasks
"
)
},
text
:
`$(tools)
${
tasks
.
length
}
`
,
tooltip
:
nls
.
localize
(
'
runningTasks
'
,
"
Show Running Tasks
"
),
command
:
'
workbench.action.tasks.showTasks
'
,
...
...
src/vs/workbench/services/progress/browser/progressService.ts
浏览文件 @
943b7823
...
...
@@ -129,6 +129,7 @@ export class ProgressService implements IProgressService {
}
this
.
_globalStatusEntry
=
this
.
_statusbarService
.
addEntry
({
category
:
{
id
:
'
status.progress
'
,
label
:
localize
(
'
status.progress
'
,
"
Progress Message
"
)
},
text
:
`$(sync~spin)
${
text
}
`
,
tooltip
:
title
},
StatusbarAlignment
.
LEFT
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录