Initialize remote IDE scaffold
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import { CommonMenus } from '@theia/core/lib/browser/common-menus.js';
|
||||
import { CommandContribution, CommandRegistry } from '@theia/core/lib/common/command.js';
|
||||
import { MenuContribution, MenuModelRegistry } from '@theia/core/lib/common/menu/menu-model-registry.js';
|
||||
import { MessageService } from '@theia/core/lib/common/message-service.js';
|
||||
import { ContainerModule, inject, injectable } from '@theia/core/shared/inversify/index.js';
|
||||
|
||||
export const GitZoneWelcomeCommand = {
|
||||
id: 'gitzone.product.welcome',
|
||||
label: 'Git.Zone: Welcome',
|
||||
};
|
||||
|
||||
@injectable()
|
||||
export class GitZoneProductContribution implements CommandContribution, MenuContribution {
|
||||
@inject(MessageService)
|
||||
protected readonly messages!: MessageService;
|
||||
|
||||
registerCommands(registry: CommandRegistry): void {
|
||||
registry.registerCommand(GitZoneWelcomeCommand, {
|
||||
execute: () => this.messages.info('Git.Zone IDE is connected to a remote-first Theia workspace.'),
|
||||
});
|
||||
}
|
||||
|
||||
registerMenus(menus: MenuModelRegistry): void {
|
||||
menus.registerMenuAction(CommonMenus.HELP, {
|
||||
commandId: GitZoneWelcomeCommand.id,
|
||||
label: GitZoneWelcomeCommand.label,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default new ContainerModule((bind) => {
|
||||
bind(GitZoneProductContribution).toSelf().inSingletonScope();
|
||||
bind(CommandContribution).toService(GitZoneProductContribution);
|
||||
bind(MenuContribution).toService(GitZoneProductContribution);
|
||||
});
|
||||
Reference in New Issue
Block a user