Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
b8953b71
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,发现更多精彩内容 >>
提交
b8953b71
编写于
12月 08, 2015
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "add an extensions action in the activity bar"
This reverts commit
9958eab8
.
上级
a1f3a671
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
13 addition
and
67 deletion
+13
-67
src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts
...ts/extensions/electron-browser/extensions.contribution.ts
+7
-36
src/vs/workbench/parts/extensions/electron-browser/extensions.css
...orkbench/parts/extensions/electron-browser/extensions.css
+5
-6
src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts
...ch/parts/extensions/electron-browser/extensionsActions.ts
+0
-23
src/vs/workbench/parts/extensions/electron-browser/extensionsQuickOpen.ts
.../parts/extensions/electron-browser/extensionsQuickOpen.ts
+1
-1
src/vs/workbench/parts/extensions/electron-browser/media/extensions-global-action.svg
...sions/electron-browser/media/extensions-global-action.svg
+0
-1
未找到文件。
src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts
浏览文件 @
b8953b71
...
...
@@ -3,19 +3,14 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
actions
=
require
(
'
vs/base/common/actions
'
);
import
toolbar
=
require
(
'
vs/base/browser/ui/toolbar/toolbar
'
);
import
actionbar
=
require
(
'
vs/base/browser/ui/actionbar/actionbar
'
);
import
platform
=
require
(
'
vs/platform/platform
'
);
import
{
registerSingleton
}
from
'
vs/platform/instantiation/common/extensions
'
;
import
actionbarregistry
=
require
(
'
vs/workbench/browser/actionBarRegistry
'
);
import
statusbar
=
require
(
'
vs/workbench/browser/parts/statusbar/statusbar
'
);
import
{
ExtensionsStatusbarItem
}
from
'
vs/workbench/parts/extensions/electron-browser/extensionsWidgets
'
;
import
{
IGalleryService
}
from
'
vs/workbench/parts/extensions/common/extensions
'
;
import
{
GlobalExtensionsAction
}
from
'
./extensionsActions
'
;
import
{
GalleryService
}
from
'
vs/workbench/parts/extensions/node/vsoGalleryService
'
;
import
{
IWorkbenchContributionsRegistry
,
Extensions
as
WorkbenchExtensions
}
from
'
vs/workbench/common/contributions
'
;
import
{
ExtensionsWorkbenchExtension
}
from
'
vs/workbench/parts/extensions/electron-browser/extensionsWorkbenchExtension
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
// Register Gallery Service
registerSingleton
(
IGalleryService
,
GalleryService
);
...
...
@@ -25,33 +20,9 @@ registerSingleton(IGalleryService, GalleryService);
ExtensionsWorkbenchExtension
);
class
GlobalExtensionsActionContributor
extends
actionbarregistry
.
ActionBarContributor
{
constructor
(
@
IInstantiationService
private
instantiationService
:
IInstantiationService
)
{
super
();
}
public
hasActions
(
context
:
any
):
boolean
{
return
context
===
toolbar
.
CONTEXT
;
}
public
getActions
(
context
:
any
):
actions
.
IAction
[]
{
return
[
this
.
instantiationService
.
createInstance
(
GlobalExtensionsAction
,
GlobalExtensionsAction
.
ID
,
GlobalExtensionsAction
.
LABEL
)
];
}
// public getActionItem(context: any, action: actions.Action): actionbar.BaseActionItem {
// if (action.id === GlobalExtensionsAction.ID) {
// return this.instantiationService.createInstance(GlobalExtensionsActionItem, action);
// }
// return null;
// }
}
// Register Global Extensions Action
let
actionBarRegistry
=
<
actionbarregistry
.
IActionBarRegistry
>
platform
.
Registry
.
as
(
actionbarregistry
.
Extensions
.
Actionbar
);
actionBarRegistry
.
registerActionBarContributor
(
actionbarregistry
.
Scope
.
GLOBAL
,
GlobalExtensionsActionContributor
);
// Register Statusbar item
(
<
statusbar
.
IStatusbarRegistry
>
platform
.
Registry
.
as
(
statusbar
.
Extensions
.
Statusbar
)).
registerStatusbarItem
(
new
statusbar
.
StatusbarItemDescriptor
(
ExtensionsStatusbarItem
,
statusbar
.
StatusbarAlignment
.
LEFT
,
150
/* Very High Priority */
));
\ No newline at end of file
src/vs/workbench/parts/extensions/electron-browser/
media/
extensions.css
→
src/vs/workbench/parts/extensions/electron-browser/extensions.css
浏览文件 @
b8953b71
...
...
@@ -3,12 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/* Activity Bar */
.monaco-workbench
>
.activitybar
.monaco-action-bar
.action-label.extensions
{
/*TODO@Isidor inline icon needed */
background-image
:
url('extensions-global-action.svg')
}
.quick-open-widget
.extension
{
padding
:
0
14px
0
0
;
height
:
48px
;
...
...
@@ -126,3 +120,8 @@
-o-transform
:
none
;
transform
:
none
;
}
/* Status bar */
.monaco-shell
.extensions-statusbar
{
cursor
:
pointer
;
}
src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts
浏览文件 @
b8953b71
...
...
@@ -6,7 +6,6 @@
import
nls
=
require
(
'
vs/nls
'
);
import
{
Promise
}
from
'
vs/base/common/winjs.base
'
;
import
{
Action
}
from
'
vs/base/common/actions
'
;
import
{
ActivityActionItem
}
from
'
vs/workbench/browser/parts/activityBar/activityAction
'
;
import
{
IExtensionsService
}
from
'
vs/workbench/parts/extensions/common/extensions
'
;
import
{
IQuickOpenService
}
from
'
vs/workbench/services/quickopen/browser/quickOpenService
'
;
...
...
@@ -78,25 +77,3 @@ export class ListOutdatedExtensionsAction extends Action {
return
true
;
}
}
export
class
GlobalExtensionsAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.globalExtensions
'
;
static
LABEL
=
nls
.
localize
(
'
extensions
'
,
"
Extensions
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IExtensionsService
private
extensionsService
:
IExtensionsService
,
@
IQuickOpenService
private
quickOpenService
:
IQuickOpenService
)
{
super
(
id
,
label
,
'
extensions
'
,
true
);
}
public
run
():
Promise
{
return
this
.
quickOpenService
.
show
(
'
ext install
'
);
}
protected
isEnabled
():
boolean
{
return
true
;
}
}
src/vs/workbench/parts/extensions/electron-browser/extensionsQuickOpen.ts
浏览文件 @
b8953b71
...
...
@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
'
vs/css!./
media/
extensions
'
;
import
'
vs/css!./extensions
'
;
import
nls
=
require
(
'
vs/nls
'
);
import
{
IDisposable
,
disposeAll
}
from
'
vs/base/common/lifecycle
'
;
...
...
src/vs/workbench/parts/extensions/electron-browser/media/extensions-global-action.svg
已删除
100644 → 0
浏览文件 @
a1f3a671
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"32"
height=
"32"
><path
d=
"M18.461 10.959h-2.538l2.538 2.539h-4.23c-2.337 0-4.23 1.893-4.23 4.23 0 2.336 1.894 4.23 4.23 4.23v-1.691c-1.402 0-2.539-1.139-2.539-2.539 0-1.402 1.137-2.539 2.539-2.539h4.23l-2.538 2.539h2.538l3.385-3.385-3.385-3.384zm-2.461-8.918c-7.72 0-14 6.271-14 13.979 0 7.709 6.28 13.98 14 13.98s14-6.271 14-13.979c0-7.709-6.28-13.98-14-13.98zm0 25.959c-6.617 0-12-5.374-12-11.979s5.383-11.98 12-11.98 12 5.374 12 11.979-5.383 11.98-12 11.98z"
fill=
"#fff"
/></svg>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录