Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
be256b54
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,发现更多精彩内容 >>
提交
be256b54
编写于
4月 20, 2020
作者:
M
Martin Aeschlimann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
use Codicon.close / Codicon.closeDirty / Codicon.removeClose
上级
a756ad5e
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
30 addition
and
21 deletion
+30
-21
src/vs/editor/contrib/peekView/peekView.ts
src/vs/editor/contrib/peekView/peekView.ts
+1
-1
src/vs/editor/contrib/quickAccess/gotoSymbolQuickAccess.ts
src/vs/editor/contrib/quickAccess/gotoSymbolQuickAccess.ts
+1
-1
src/vs/workbench/browser/actions/windowActions.ts
src/vs/workbench/browser/actions/windowActions.ts
+3
-2
src/vs/workbench/browser/parts/editor/editorActions.ts
src/vs/workbench/browser/parts/editor/editorActions.ts
+4
-3
src/vs/workbench/browser/parts/editor/editorGroupView.ts
src/vs/workbench/browser/parts/editor/editorGroupView.ts
+2
-1
src/vs/workbench/browser/parts/editor/editorQuickAccess.ts
src/vs/workbench/browser/parts/editor/editorQuickAccess.ts
+2
-1
src/vs/workbench/browser/parts/notifications/notificationsActions.ts
...bench/browser/parts/notifications/notificationsActions.ts
+2
-1
src/vs/workbench/browser/parts/panel/panelActions.ts
src/vs/workbench/browser/parts/panel/panelActions.ts
+2
-1
src/vs/workbench/contrib/feedback/browser/feedback.ts
src/vs/workbench/contrib/feedback/browser/feedback.ts
+2
-1
src/vs/workbench/contrib/files/browser/fileActions.ts
src/vs/workbench/contrib/files/browser/fileActions.ts
+2
-1
src/vs/workbench/electron-browser/actions/windowActions.ts
src/vs/workbench/electron-browser/actions/windowActions.ts
+3
-2
test/automation/src/search.ts
test/automation/src/search.ts
+6
-6
未找到文件。
src/vs/editor/contrib/peekView/peekView.ts
浏览文件 @
be256b54
...
...
@@ -187,7 +187,7 @@ export abstract class PeekViewWidget extends ZoneWidget {
this
.
_actionbarWidget
=
new
ActionBar
(
actionsContainer
,
actionBarOptions
);
this
.
_disposables
.
add
(
this
.
_actionbarWidget
);
this
.
_actionbarWidget
.
push
(
new
Action
(
'
peekview.close
'
,
nls
.
localize
(
'
label.close
'
,
"
Close
"
),
'
codicon-close
'
,
true
,
()
=>
{
this
.
_actionbarWidget
.
push
(
new
Action
(
'
peekview.close
'
,
nls
.
localize
(
'
label.close
'
,
"
Close
"
),
Codicon
.
close
.
classNames
,
true
,
()
=>
{
this
.
dispose
();
return
Promise
.
resolve
();
}),
{
label
:
false
,
icon
:
true
});
...
...
src/vs/editor/contrib/quickAccess/gotoSymbolQuickAccess.ts
浏览文件 @
be256b54
...
...
@@ -304,7 +304,7 @@ export abstract class AbstractGotoSymbolQuickAccessProvider extends AbstractEdit
return
[
{
iconClass
:
openSideBySideDirection
===
'
right
'
?
'
codicon-split-horizontal
'
:
'
codicon-split-vertical
'
,
iconClass
:
openSideBySideDirection
===
'
right
'
?
Codicon
.
splitHorizontal
.
classNames
:
Codicon
.
splitVertical
.
classNames
,
tooltip
:
openSideBySideDirection
===
'
right
'
?
localize
(
'
openToSide
'
,
"
Open to the Side
"
)
:
localize
(
'
openToBottom
'
,
"
Open to the Bottom
"
)
}
];
...
...
src/vs/workbench/browser/actions/windowActions.ts
浏览文件 @
be256b54
...
...
@@ -30,6 +30,7 @@ import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
import
{
inQuickPickContext
,
getQuickNavigateHandler
}
from
'
vs/workbench/browser/quickaccess
'
;
import
{
IHostService
}
from
'
vs/workbench/services/host/browser/host
'
;
import
{
ResourceMap
}
from
'
vs/base/common/map
'
;
import
{
Codicon
}
from
'
vs/base/common/codicons
'
;
export
const
inRecentFilesPickerContextKey
=
'
inRecentFilesPicker
'
;
...
...
@@ -41,12 +42,12 @@ interface IRecentlyOpenedPick extends IQuickPickItem {
abstract
class
BaseOpenRecentAction
extends
Action
{
private
readonly
removeFromRecentlyOpened
:
IQuickInputButton
=
{
iconClass
:
'
codicon-close
'
,
iconClass
:
Codicon
.
removeClose
.
classNames
,
tooltip
:
nls
.
localize
(
'
remove
'
,
"
Remove from Recently Opened
"
)
};
private
readonly
dirtyRecentlyOpened
:
IQuickInputButton
=
{
iconClass
:
'
dirty-workspace
codicon-circle-filled
'
,
iconClass
:
'
dirty-workspace
'
+
Codicon
.
closeDirty
.
classNames
,
tooltip
:
nls
.
localize
(
'
dirtyRecentlyOpened
'
,
"
Workspace With Dirty Files
"
),
alwaysVisible
:
true
};
...
...
src/vs/workbench/browser/parts/editor/editorActions.ts
浏览文件 @
be256b54
...
...
@@ -20,6 +20,7 @@ import { IFileDialogService, ConfirmResult } from 'vs/platform/dialogs/common/di
import
{
IWorkingCopyService
}
from
'
vs/workbench/services/workingCopy/common/workingCopyService
'
;
import
{
ItemActivation
,
IQuickInputService
}
from
'
vs/platform/quickinput/common/quickInput
'
;
import
{
AllEditorsByMostRecentlyUsedQuickAccess
,
ActiveGroupEditorsByMostRecentlyUsedQuickAccess
,
AllEditorsByAppearanceQuickAccess
}
from
'
vs/workbench/browser/parts/editor/editorQuickAccess
'
;
import
{
Codicon
}
from
'
vs/base/common/codicons
'
;
export
class
ExecuteCommandAction
extends
Action
{
...
...
@@ -395,7 +396,7 @@ export class CloseEditorAction extends Action {
label
:
string
,
@
ICommandService
private
readonly
commandService
:
ICommandService
)
{
super
(
id
,
label
,
'
codicon-close
'
);
super
(
id
,
label
,
Codicon
.
close
.
classNames
);
}
run
(
context
?:
IEditorCommandsContext
):
Promise
<
void
>
{
...
...
@@ -413,7 +414,7 @@ export class CloseOneEditorAction extends Action {
label
:
string
,
@
IEditorGroupsService
private
readonly
editorGroupService
:
IEditorGroupsService
)
{
super
(
id
,
label
,
'
codicon-close
'
);
super
(
id
,
label
,
Codicon
.
close
.
classNames
);
}
async
run
(
context
?:
IEditorCommandsContext
):
Promise
<
void
>
{
...
...
@@ -609,7 +610,7 @@ export class CloseAllEditorsAction extends BaseCloseAllAction {
@
IEditorGroupsService
editorGroupService
:
IEditorGroupsService
,
@
IEditorService
editorService
:
IEditorService
)
{
super
(
id
,
label
,
'
codicon-close-all
'
,
workingCopyService
,
fileDialogService
,
editorGroupService
,
editorService
);
super
(
id
,
label
,
Codicon
.
closeAll
.
classNames
,
workingCopyService
,
fileDialogService
,
editorGroupService
,
editorService
);
}
protected
async
doCloseAll
():
Promise
<
void
>
{
...
...
src/vs/workbench/browser/parts/editor/editorGroupView.ts
浏览文件 @
be256b54
...
...
@@ -51,6 +51,7 @@ import { Schemas } from 'vs/base/common/network';
import
{
EditorActivation
,
EditorOpenContext
}
from
'
vs/platform/editor/common/editor
'
;
import
{
IDialogService
,
IFileDialogService
,
ConfirmResult
}
from
'
vs/platform/dialogs/common/dialogs
'
;
import
{
ILogService
}
from
'
vs/platform/log/common/log
'
;
import
{
Codicon
}
from
'
vs/base/common/codicons
'
;
export
class
EditorGroupView
extends
Themable
implements
IEditorGroupView
{
...
...
@@ -290,7 +291,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
const
removeGroupAction
=
this
.
_register
(
new
Action
(
CLOSE_EDITOR_GROUP_COMMAND_ID
,
localize
(
'
closeGroupAction
'
,
"
Close
"
),
'
codicon-close
'
,
Codicon
.
close
.
classNames
,
true
,
async
()
=>
this
.
accessor
.
removeGroup
(
this
)));
...
...
src/vs/workbench/browser/parts/editor/editorQuickAccess.ts
浏览文件 @
be256b54
...
...
@@ -16,6 +16,7 @@ import { getIconClasses } from 'vs/editor/common/services/getIconClasses';
import
{
prepareQuery
,
scoreItemFuzzy
,
compareItemsByFuzzyScore
,
FuzzyScorerCache
}
from
'
vs/base/common/fuzzyScorer
'
;
import
{
CancellationToken
}
from
'
vs/base/common/cancellation
'
;
import
{
IDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
Codicon
}
from
'
vs/base/common/codicons
'
;
interface
IEditorQuickPickItem
extends
IQuickPickItemWithResource
,
IPickerQuickAccessItem
{
groupId
:
GroupIdentifier
;
...
...
@@ -160,7 +161,7 @@ export abstract class BaseEditorQuickAccessProvider extends PickerQuickAccessPro
buttons
:
(()
=>
{
return
[
{
iconClass
:
isDirty
?
'
dirty-editor codicon-circle-filled
'
:
'
codicon-close
'
,
iconClass
:
isDirty
?
(
'
dirty-editor
'
+
Codicon
.
closeDirty
.
classNames
)
:
Codicon
.
close
.
classNames
,
tooltip
:
localize
(
'
closeEditor
'
,
"
Close Editor
"
),
alwaysVisible
:
isDirty
}
...
...
src/vs/workbench/browser/parts/notifications/notificationsActions.ts
浏览文件 @
be256b54
...
...
@@ -12,6 +12,7 @@ import { INotificationService } from 'vs/platform/notification/common/notificati
import
{
CLEAR_NOTIFICATION
,
EXPAND_NOTIFICATION
,
COLLAPSE_NOTIFICATION
,
CLEAR_ALL_NOTIFICATIONS
,
HIDE_NOTIFICATIONS_CENTER
}
from
'
vs/workbench/browser/parts/notifications/notificationsCommands
'
;
import
{
ICommandService
}
from
'
vs/platform/commands/common/commands
'
;
import
{
IClipboardService
}
from
'
vs/platform/clipboard/common/clipboardService
'
;
import
{
Codicon
}
from
'
vs/base/common/codicons
'
;
export
class
ClearNotificationAction
extends
Action
{
...
...
@@ -23,7 +24,7 @@ export class ClearNotificationAction extends Action {
label
:
string
,
@
ICommandService
private
readonly
commandService
:
ICommandService
)
{
super
(
id
,
label
,
'
codicon-close
'
);
super
(
id
,
label
,
Codicon
.
close
.
classNames
);
}
async
run
(
notification
:
INotificationViewItem
):
Promise
<
void
>
{
...
...
src/vs/workbench/browser/parts/panel/panelActions.ts
浏览文件 @
be256b54
...
...
@@ -18,6 +18,7 @@ import { IActivity } from 'vs/workbench/common/activity';
import
{
IEditorGroupsService
}
from
'
vs/workbench/services/editor/common/editorGroupsService
'
;
import
{
ActivePanelContext
,
PanelPositionContext
}
from
'
vs/workbench/common/panel
'
;
import
{
ContextKeyExpression
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
Codicon
}
from
'
vs/base/common/codicons
'
;
export
class
ClosePanelAction
extends
Action
{
...
...
@@ -29,7 +30,7 @@ export class ClosePanelAction extends Action {
name
:
string
,
@
IWorkbenchLayoutService
private
readonly
layoutService
:
IWorkbenchLayoutService
)
{
super
(
id
,
name
,
'
codicon-close
'
);
super
(
id
,
name
,
Codicon
.
close
.
classNames
);
}
async
run
():
Promise
<
void
>
{
...
...
src/vs/workbench/contrib/feedback/browser/feedback.ts
浏览文件 @
be256b54
...
...
@@ -23,6 +23,7 @@ import { IProductService } from 'vs/platform/product/common/productService';
import
{
IOpenerService
}
from
'
vs/platform/opener/common/opener
'
;
import
{
StandardKeyboardEvent
}
from
'
vs/base/browser/keyboardEvent
'
;
import
{
KeyCode
}
from
'
vs/base/common/keyCodes
'
;
import
{
Codicon
}
from
'
vs/base/common/codicons
'
;
export
interface
IFeedback
{
feedback
:
string
;
...
...
@@ -115,7 +116,7 @@ export class FeedbackDropdown extends Dropdown {
dom
.
append
(
this
.
feedbackForm
,
dom
.
$
(
'
h2.title
'
)).
textContent
=
nls
.
localize
(
"
label.sendASmile
"
,
"
Tweet us your feedback.
"
);
// Close Button (top right)
const
closeBtn
=
dom
.
append
(
this
.
feedbackForm
,
dom
.
$
(
'
div.cancel
.codicon.codicon-close
'
));
const
closeBtn
=
dom
.
append
(
this
.
feedbackForm
,
dom
.
$
(
'
div.cancel
'
+
Codicon
.
close
.
cssSelector
));
closeBtn
.
tabIndex
=
0
;
closeBtn
.
setAttribute
(
'
role
'
,
'
button
'
);
closeBtn
.
title
=
nls
.
localize
(
'
close
'
,
"
Close
"
);
...
...
src/vs/workbench/contrib/files/browser/fileActions.ts
浏览文件 @
be256b54
...
...
@@ -50,6 +50,7 @@ import { once } from 'vs/base/common/functional';
import
{
IEditorOptions
}
from
'
vs/platform/editor/common/editor
'
;
import
{
IEditorGroup
}
from
'
vs/workbench/services/editor/common/editorGroupsService
'
;
import
{
FileEditorInput
}
from
'
vs/workbench/contrib/files/common/editors/fileEditorInput
'
;
import
{
Codicon
}
from
'
vs/base/common/codicons
'
;
export
const
NEW_FILE_COMMAND_ID
=
'
explorer.newFile
'
;
export
const
NEW_FILE_LABEL
=
nls
.
localize
(
'
newFile
'
,
"
New File
"
);
...
...
@@ -694,7 +695,7 @@ export class CloseGroupAction extends Action {
static
readonly
LABEL
=
nls
.
localize
(
'
closeGroup
'
,
"
Close Group
"
);
constructor
(
id
:
string
,
label
:
string
,
@
ICommandService
private
readonly
commandService
:
ICommandService
)
{
super
(
id
,
label
,
'
codicon-close-all
'
);
super
(
id
,
label
,
Codicon
.
closeAll
.
classNames
);
}
run
(
context
?:
unknown
):
Promise
<
void
>
{
...
...
src/vs/workbench/electron-browser/actions/windowActions.ts
浏览文件 @
be256b54
...
...
@@ -22,6 +22,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
import
{
IElectronService
}
from
'
vs/platform/electron/node/electron
'
;
import
{
INativeWorkbenchEnvironmentService
}
from
'
vs/workbench/services/environment/electron-browser/environmentService
'
;
import
{
IWorkbenchEnvironmentService
}
from
'
vs/workbench/services/environment/common/environmentService
'
;
import
{
Codicon
}
from
'
vs/base/common/codicons
'
;
export
class
CloseCurrentWindowAction
extends
Action
{
...
...
@@ -155,12 +156,12 @@ export class ReloadWindowWithExtensionsDisabledAction extends Action {
export
abstract
class
BaseSwitchWindow
extends
Action
{
private
readonly
closeWindowAction
:
IQuickInputButton
=
{
iconClass
:
'
codicon-close
'
,
iconClass
:
Codicon
.
removeClose
.
classNames
,
tooltip
:
nls
.
localize
(
'
close
'
,
"
Close Window
"
)
};
private
readonly
closeDirtyWindowAction
:
IQuickInputButton
=
{
iconClass
:
'
dirty-window
codicon-circle-filled
'
,
iconClass
:
'
dirty-window
'
+
Codicon
.
closeDirty
,
tooltip
:
nls
.
localize
(
'
close
'
,
"
Close Window
"
),
alwaysVisible
:
true
};
...
...
test/automation/src/search.ts
浏览文件 @
be256b54
...
...
@@ -74,21 +74,21 @@ export class Search extends Viewlet {
await
retry
(
()
=>
this
.
code
.
waitAndClick
(
fileMatch
),
()
=>
this
.
code
.
waitForElement
(
`
${
fileMatch
}
.action-label.codicon.
codicon-clos
e`
,
el
=>
!!
el
&&
el
.
top
>
0
&&
el
.
left
>
0
,
10
)
()
=>
this
.
code
.
waitForElement
(
`
${
fileMatch
}
.action-label.codicon.
search-remov
e`
,
el
=>
!!
el
&&
el
.
top
>
0
&&
el
.
left
>
0
,
10
)
);
// ¯\_(ツ)_/¯
await
new
Promise
(
c
=>
setTimeout
(
c
,
500
));
await
this
.
code
.
waitAndClick
(
`
${
fileMatch
}
.action-label.codicon.
codicon-clos
e`
);
await
this
.
code
.
waitAndClick
(
`
${
fileMatch
}
.action-label.codicon.
search-remov
e`
);
await
this
.
code
.
waitForElement
(
fileMatch
,
el
=>
!
el
);
}
async
expandReplace
():
Promise
<
void
>
{
await
this
.
code
.
waitAndClick
(
`
${
VIEWLET
}
.search-widget .monaco-button.toggle-replace-button.codicon-
chevron-right
`
);
await
this
.
code
.
waitAndClick
(
`
${
VIEWLET
}
.search-widget .monaco-button.toggle-replace-button.codicon-
search-hide-replace
`
);
}
async
collapseReplace
():
Promise
<
void
>
{
await
this
.
code
.
waitAndClick
(
`
${
VIEWLET
}
.search-widget .monaco-button.toggle-replace-button.codicon-
chevron-down
`
);
await
this
.
code
.
waitAndClick
(
`
${
VIEWLET
}
.search-widget .monaco-button.toggle-replace-button.codicon-
search-show-replace
`
);
}
async
setReplaceText
(
text
:
string
):
Promise
<
void
>
{
...
...
@@ -100,12 +100,12 @@ export class Search extends Viewlet {
await
retry
(
()
=>
this
.
code
.
waitAndClick
(
fileMatch
),
()
=>
this
.
code
.
waitForElement
(
`
${
fileMatch
}
.action-label.codicon.codicon-replace-all`
,
el
=>
!!
el
&&
el
.
top
>
0
&&
el
.
left
>
0
,
10
)
()
=>
this
.
code
.
waitForElement
(
`
${
fileMatch
}
.action-label.codicon.codicon-
search-
replace-all`
,
el
=>
!!
el
&&
el
.
top
>
0
&&
el
.
left
>
0
,
10
)
);
// ¯\_(ツ)_/¯
await
new
Promise
(
c
=>
setTimeout
(
c
,
500
));
await
this
.
code
.
waitAndClick
(
`
${
fileMatch
}
.action-label.codicon.codicon-replace-all`
);
await
this
.
code
.
waitAndClick
(
`
${
fileMatch
}
.action-label.codicon.codicon-
search-
replace-all`
);
}
async
waitForResultText
(
text
:
string
):
Promise
<
void
>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录