Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
56125761
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,发现更多精彩内容 >>
提交
56125761
编写于
7月 25, 2017
作者:
S
Sandeep Somavarapu
提交者:
GitHub
7月 25, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #30367 from BugraC/25974
Added Enabled View to Extension Viewlet
上级
6e58c166
f8d258f5
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
47 addition
and
4 deletion
+47
-4
src/vs/workbench/parts/extensions/browser/extensionsActions.ts
...s/workbench/parts/extensions/browser/extensionsActions.ts
+24
-0
src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts
...ts/extensions/electron-browser/extensions.contribution.ts
+4
-1
src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts
...ch/parts/extensions/electron-browser/extensionsViewlet.ts
+2
-1
src/vs/workbench/parts/extensions/electron-browser/extensionsViews.ts
...ench/parts/extensions/electron-browser/extensionsViews.ts
+17
-2
未找到文件。
src/vs/workbench/parts/extensions/browser/extensionsActions.ts
浏览文件 @
56125761
...
@@ -892,6 +892,30 @@ export class InstallExtensionsAction extends OpenExtensionsViewletAction {
...
@@ -892,6 +892,30 @@ export class InstallExtensionsAction extends OpenExtensionsViewletAction {
static
LABEL
=
localize
(
'
installExtensions
'
,
"
Install Extensions
"
);
static
LABEL
=
localize
(
'
installExtensions
'
,
"
Install Extensions
"
);
}
}
export
class
ShowEnabledExtensionsAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.showEnabledExtensions
'
;
static
LABEL
=
localize
(
'
showEnabledExtensions
'
,
'
Show Enabled Extensions
'
);
constructor
(
id
:
string
,
label
:
string
,
@
IViewletService
private
viewletService
:
IViewletService
,
@
IExtensionsWorkbenchService
private
extensionsWorkbenchService
:
IExtensionsWorkbenchService
)
{
super
(
id
,
label
,
'
clear-extensions
'
,
true
);
}
run
():
TPromise
<
void
>
{
return
this
.
viewletService
.
openViewlet
(
VIEWLET_ID
,
true
)
.
then
(
viewlet
=>
viewlet
as
IExtensionsViewlet
)
.
then
(
viewlet
=>
{
viewlet
.
search
(
'
@enabled
'
);
viewlet
.
focus
();
});
}
}
export
class
ShowInstalledExtensionsAction
extends
Action
{
export
class
ShowInstalledExtensionsAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.showInstalledExtensions
'
;
static
ID
=
'
workbench.extensions.action.showInstalledExtensions
'
;
...
...
src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts
浏览文件 @
56125761
...
@@ -23,7 +23,7 @@ import { VIEWLET_ID, IExtensionsWorkbenchService } from '../common/extensions';
...
@@ -23,7 +23,7 @@ import { VIEWLET_ID, IExtensionsWorkbenchService } from '../common/extensions';
import
{
ExtensionsWorkbenchService
}
from
'
vs/workbench/parts/extensions/node/extensionsWorkbenchService
'
;
import
{
ExtensionsWorkbenchService
}
from
'
vs/workbench/parts/extensions/node/extensionsWorkbenchService
'
;
import
{
import
{
OpenExtensionsViewletAction
,
InstallExtensionsAction
,
ShowOutdatedExtensionsAction
,
ShowRecommendedExtensionsAction
,
ShowRecommendedKeymapExtensionsAction
,
ShowWorkspaceRecommendedExtensionsAction
,
ShowPopularExtensionsAction
,
OpenExtensionsViewletAction
,
InstallExtensionsAction
,
ShowOutdatedExtensionsAction
,
ShowRecommendedExtensionsAction
,
ShowRecommendedKeymapExtensionsAction
,
ShowWorkspaceRecommendedExtensionsAction
,
ShowPopularExtensionsAction
,
ShowInstalledExtensionsAction
,
ShowDisabledExtensionsAction
,
UpdateAllAction
,
ConfigureWorkspaceRecommendedExtensionsAction
,
Show
EnabledExtensionsAction
,
Show
InstalledExtensionsAction
,
ShowDisabledExtensionsAction
,
UpdateAllAction
,
ConfigureWorkspaceRecommendedExtensionsAction
,
EnableAllAction
,
EnableAllWorkpsaceAction
,
DisableAllAction
,
DisableAllWorkpsaceAction
,
CheckForUpdatesAction
,
ShowLanguageExtensionsAction
,
EnableAutoUpdateAction
,
DisableAutoUpdateAction
EnableAllAction
,
EnableAllWorkpsaceAction
,
DisableAllAction
,
DisableAllWorkpsaceAction
,
CheckForUpdatesAction
,
ShowLanguageExtensionsAction
,
EnableAutoUpdateAction
,
DisableAutoUpdateAction
}
from
'
vs/workbench/parts/extensions/browser/extensionsActions
'
;
}
from
'
vs/workbench/parts/extensions/browser/extensionsActions
'
;
import
{
OpenExtensionsFolderAction
,
InstallVSIXAction
}
from
'
vs/workbench/parts/extensions/electron-browser/extensionsActions
'
;
import
{
OpenExtensionsFolderAction
,
InstallVSIXAction
}
from
'
vs/workbench/parts/extensions/electron-browser/extensionsActions
'
;
...
@@ -127,6 +127,9 @@ actionRegistry.registerWorkbenchAction(workspaceRecommendationsActionDescriptor,
...
@@ -127,6 +127,9 @@ actionRegistry.registerWorkbenchAction(workspaceRecommendationsActionDescriptor,
const
popularActionDescriptor
=
new
SyncActionDescriptor
(
ShowPopularExtensionsAction
,
ShowPopularExtensionsAction
.
ID
,
ShowPopularExtensionsAction
.
LABEL
);
const
popularActionDescriptor
=
new
SyncActionDescriptor
(
ShowPopularExtensionsAction
,
ShowPopularExtensionsAction
.
ID
,
ShowPopularExtensionsAction
.
LABEL
);
actionRegistry
.
registerWorkbenchAction
(
popularActionDescriptor
,
'
Extensions: Show Popular Extensions
'
,
ExtensionsLabel
);
actionRegistry
.
registerWorkbenchAction
(
popularActionDescriptor
,
'
Extensions: Show Popular Extensions
'
,
ExtensionsLabel
);
const
enabledActionDescriptor
=
new
SyncActionDescriptor
(
ShowEnabledExtensionsAction
,
ShowEnabledExtensionsAction
.
ID
,
ShowEnabledExtensionsAction
.
LABEL
);
actionRegistry
.
registerWorkbenchAction
(
enabledActionDescriptor
,
'
Extensions: Show Enabled Extensions
'
,
ExtensionsLabel
);
const
installedActionDescriptor
=
new
SyncActionDescriptor
(
ShowInstalledExtensionsAction
,
ShowInstalledExtensionsAction
.
ID
,
ShowInstalledExtensionsAction
.
LABEL
);
const
installedActionDescriptor
=
new
SyncActionDescriptor
(
ShowInstalledExtensionsAction
,
ShowInstalledExtensionsAction
.
ID
,
ShowInstalledExtensionsAction
.
LABEL
);
actionRegistry
.
registerWorkbenchAction
(
installedActionDescriptor
,
'
Extensions: Show Installed Extensions
'
,
ExtensionsLabel
);
actionRegistry
.
registerWorkbenchAction
(
installedActionDescriptor
,
'
Extensions: Show Installed Extensions
'
,
ExtensionsLabel
);
...
...
src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts
浏览文件 @
56125761
...
@@ -27,7 +27,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
...
@@ -27,7 +27,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import
{
IExtensionService
}
from
'
vs/platform/extensions/common/extensions
'
;
import
{
IExtensionService
}
from
'
vs/platform/extensions/common/extensions
'
;
import
{
IExtensionsWorkbenchService
,
IExtensionsViewlet
,
VIEWLET_ID
,
ExtensionState
}
from
'
../common/extensions
'
;
import
{
IExtensionsWorkbenchService
,
IExtensionsViewlet
,
VIEWLET_ID
,
ExtensionState
}
from
'
../common/extensions
'
;
import
{
import
{
ShowInstalledExtensionsAction
,
ShowRecommendedExtensionsAction
,
ShowWorkspaceRecommendedExtensionsAction
,
ShowPopularExtensionsAction
,
ShowDisabledExtensionsAction
,
Show
EnabledExtensionsAction
,
Show
InstalledExtensionsAction
,
ShowRecommendedExtensionsAction
,
ShowWorkspaceRecommendedExtensionsAction
,
ShowPopularExtensionsAction
,
ShowDisabledExtensionsAction
,
ShowOutdatedExtensionsAction
,
ClearExtensionsInputAction
,
ChangeSortAction
,
UpdateAllAction
,
CheckForUpdatesAction
,
DisableAllAction
,
EnableAllAction
,
ShowOutdatedExtensionsAction
,
ClearExtensionsInputAction
,
ChangeSortAction
,
UpdateAllAction
,
CheckForUpdatesAction
,
DisableAllAction
,
EnableAllAction
,
EnableAutoUpdateAction
,
DisableAutoUpdateAction
EnableAutoUpdateAction
,
DisableAutoUpdateAction
}
from
'
vs/workbench/parts/extensions/browser/extensionsActions
'
;
}
from
'
vs/workbench/parts/extensions/browser/extensionsActions
'
;
...
@@ -264,6 +264,7 @@ export class ExtensionsViewlet extends ComposedViewsViewlet implements IExtensio
...
@@ -264,6 +264,7 @@ export class ExtensionsViewlet extends ComposedViewsViewlet implements IExtensio
getSecondaryActions
():
IAction
[]
{
getSecondaryActions
():
IAction
[]
{
if
(
!
this
.
secondaryActions
)
{
if
(
!
this
.
secondaryActions
)
{
this
.
secondaryActions
=
[
this
.
secondaryActions
=
[
this
.
instantiationService
.
createInstance
(
ShowEnabledExtensionsAction
,
ShowEnabledExtensionsAction
.
ID
,
ShowEnabledExtensionsAction
.
LABEL
),
this
.
instantiationService
.
createInstance
(
ShowInstalledExtensionsAction
,
ShowInstalledExtensionsAction
.
ID
,
ShowInstalledExtensionsAction
.
LABEL
),
this
.
instantiationService
.
createInstance
(
ShowInstalledExtensionsAction
,
ShowInstalledExtensionsAction
.
ID
,
ShowInstalledExtensionsAction
.
LABEL
),
this
.
instantiationService
.
createInstance
(
ShowOutdatedExtensionsAction
,
ShowOutdatedExtensionsAction
.
ID
,
ShowOutdatedExtensionsAction
.
LABEL
),
this
.
instantiationService
.
createInstance
(
ShowOutdatedExtensionsAction
,
ShowOutdatedExtensionsAction
.
ID
,
ShowOutdatedExtensionsAction
.
LABEL
),
this
.
instantiationService
.
createInstance
(
ShowDisabledExtensionsAction
,
ShowDisabledExtensionsAction
.
ID
,
ShowDisabledExtensionsAction
.
LABEL
),
this
.
instantiationService
.
createInstance
(
ShowDisabledExtensionsAction
,
ShowDisabledExtensionsAction
.
ID
,
ShowDisabledExtensionsAction
.
LABEL
),
...
...
src/vs/workbench/parts/extensions/electron-browser/extensionsViews.ts
浏览文件 @
56125761
...
@@ -202,8 +202,8 @@ export class ExtensionsListView extends CollapsibleView {
...
@@ -202,8 +202,8 @@ export class ExtensionsListView extends CollapsibleView {
return
new
PagedModel
(
result
);
return
new
PagedModel
(
result
);
}
}
if
(
/
@disabled
/i
.
test
(
value
))
{
if
(
/
(
@disabled|@enabled:false
)
/i
.
test
(
value
))
{
value
=
value
.
replace
(
/
@disabled
/g
,
''
).
trim
().
toLowerCase
();
value
=
value
.
replace
(
/
(
@disabled|@enabled:false
)
/g
,
''
).
trim
().
toLowerCase
();
const
local
=
await
this
.
extensionsWorkbenchService
.
queryLocal
();
const
local
=
await
this
.
extensionsWorkbenchService
.
queryLocal
();
const
runningExtensions
=
await
this
.
extensionService
.
getExtensions
();
const
runningExtensions
=
await
this
.
extensionService
.
getExtensions
();
...
@@ -215,6 +215,21 @@ export class ExtensionsListView extends CollapsibleView {
...
@@ -215,6 +215,21 @@ export class ExtensionsListView extends CollapsibleView {
return
new
PagedModel
(
result
);
return
new
PagedModel
(
result
);
}
}
if
(
/@enabled
(
:true
)?
/i
.
test
(
value
))
{
value
=
value
?
value
.
replace
(
/@enabled
(
:true
)?
/g
,
''
).
trim
().
toLowerCase
()
:
''
;
const
local
=
await
this
.
extensionsWorkbenchService
.
queryLocal
();
const
result
=
local
.
sort
((
e1
,
e2
)
=>
e1
.
displayName
.
localeCompare
(
e2
.
displayName
))
.
filter
(
e
=>
e
.
type
===
LocalExtensionType
.
User
&&
!
(
e
.
disabledForWorkspace
||
e
.
disabledGlobally
)
&&
e
.
name
.
toLowerCase
().
indexOf
(
value
)
>
-
1
);
return
new
PagedModel
(
result
);
}
if
(
ExtensionsListView
.
isWorkspaceRecommendedExtensionsQuery
(
query
.
value
))
{
if
(
ExtensionsListView
.
isWorkspaceRecommendedExtensionsQuery
(
query
.
value
))
{
return
this
.
getWorkspaceRecommendationsModel
(
query
,
options
);
return
this
.
getWorkspaceRecommendationsModel
(
query
,
options
);
}
else
if
(
ExtensionsListView
.
isKeymapsRecommendedExtensionsQuery
(
query
.
value
))
{
}
else
if
(
ExtensionsListView
.
isKeymapsRecommendedExtensionsQuery
(
query
.
value
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录