How to add a right-sidebar view with theia plugin or vscode plugin

In vscode plugin, i can add views, viewsContainer in package.json to set a left-sidebar view. but in theia, there is a right-sidebar view, how i add to view to it?

You can control the positioning of your view container using defaultWidgetOptions in your view contribution:

@injectable()
export class YourContribution extends AbstractViewContribution<YourWidget> {

constructor() {
    super({
        widgetId: YourWidget.ID,
        widgetName: YourWidget.LABEL,
        defaultWidgetOptions: { area: 'right'},
        toggleCommandId: YourCommand.id
    });
}

I mean in plugin, not extension.
I know that in extension I can do this.
but how can I do this in theia plugin or vscode plugin?

@yuzai Iā€™m not aware of any option or mechanism to achieve the same behaviour in a plugin since vscode for instance does not allow views to be in the right-sidebar. You can move the view manually to the right, and it should be stored in the local-history (persisted storage), but there is nothing I can think of at the moment to achieve it programatically.

1 Like

ok, thank you.
Is there a way that I can extend the plugin api?
For example, I can export an api called addWidget, then I can use this api in plugin, addWeight(ReactNode, options)