Added toolbar to top panel.

Signed-off-by: jbicker <jan.bicker@typefox.io>
This commit is contained in:
jbicker
2019-06-13 16:45:36 +02:00
parent 4c3becd3e8
commit 6a956afbcd
5 changed files with 98 additions and 12 deletions

View File

@@ -0,0 +1,22 @@
import { FrontendApplicationContribution, FrontendApplication } from "@theia/core/lib/browser";
import { injectable, inject } from "inversify";
import { ArduinoToolbar } from "./arduino-toolbar";
import { TabBarToolbarRegistry, TabBarToolbarFactory, TabBarToolbar } from "@theia/core/lib/browser/shell/tab-bar-toolbar";
@injectable()
export class ArduinoToolbarContribution implements FrontendApplicationContribution {
protected toolbarWidget: ArduinoToolbar;
constructor(
@inject(TabBarToolbarRegistry) protected tabBarToolBarRegistry: TabBarToolbarRegistry,
@inject(TabBarToolbarFactory) protected tabBarToolBarFactory: () => TabBarToolbar) {
this.toolbarWidget = new ArduinoToolbar(this.tabBarToolBarRegistry, this.tabBarToolBarFactory);
}
onStart(app: FrontendApplication) {
app.shell.addWidget(this.toolbarWidget, {
area: 'top'
})
}
}