Vscode: Expose ActivityBar as part of Extensions api

Created on 29 Jun 2016  路  11Comments  路  Source: microsoft/vscode

Currently I don't believe there is anyway in an extension to add an item to the activity bar and set the viewlets it will load etc...

Make an api available
e.g.
vscode.workbench.ActivityBar.addItem(ActivityBarItem: item)

Also a way of opening to a ActivityBarItem inside of a command(on context menu item click command)
e.g.

vscode.workbench.ActivityBar.getItem(string: name) : ActivityBarItem
vscode.workbench.ActivityBar.focusedItem : ActivityBarItem
vscode.workbench.ActivityBar.focusItem(string: name)
vscode.workbench.ActivityBar.focusItem(ActivityBarItem: activityBarItem)
*duplicate api feature-request

Most helpful comment

@MeirionHughes
It does. You can create your own Viewlet (Activity bar button + sidebar).

All 11 comments

Has any version plan?

Closing this in favor of #12163, the initial version of this will likely land in v1.7. FYI @octref

does #12163 expose activity bar so you can add custom buttons?

@MeirionHughes
It does. You can create your own Viewlet (Activity bar button + sidebar).

The activity bar buttons will be bound to viewlets only, not for arbitrary commands.

It's a good news.

Okay, I can work with that. :P

@MeirionHughes have you been able to add an item to the Activity bar? If so could you post a snippet? I'd really like to use it for an extension I have in mind and I can't figure it out myself.

@capaj Nope... good luck though. 馃弮

@capaj the custom explorer work is currently a proposed API, see https://github.com/Microsoft/vscode/blob/master/src/vs/vscode.proposed.d.ts#L24

I believe you can't publish extensions that use proposed APIs, it's just a trail now as they're likely to change.

@Tyriar I'l try to hack it for now through the DOM :speak_no_evil: for now

Was this page helpful?
0 / 5 - 0 ratings