Brought back the menu.

With a restricted set of items.

Signed-off-by: jbicker <jan.bicker@typefox.io>
This commit is contained in:
jbicker
2019-07-12 10:40:41 +02:00
parent 35086ca1a1
commit 2a0273c771
11 changed files with 162 additions and 38 deletions

View File

@@ -3,6 +3,8 @@ import { FrontendApplicationContribution } from '@theia/core/lib/browser/fronten
import { AbstractViewContribution } from '@theia/core/lib/browser/shell/view-contribution';
import { ListWidget } from './list-widget';
import { LibraryListWidget } from './library-list-widget';
import { MenuModelRegistry } from '@theia/core';
import { ArduinoMenus } from '../arduino-frontend-contribution';
@injectable()
export abstract class ListWidgetFrontendContribution extends AbstractViewContribution<ListWidget> implements FrontendApplicationContribution {
@@ -29,4 +31,13 @@ export class LibraryListWidgetFrontendContribution extends ListWidgetFrontendCon
});
}
registerMenus(menus: MenuModelRegistry): void {
if (this.toggleCommand) {
menus.registerMenuAction(ArduinoMenus.SKETCH, {
commandId: this.toggleCommand.id,
label: 'Manage Libraries...'
});
}
}
}