mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-05-23 13:26:32 +00:00
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
import { inject, injectable } from 'inversify';
|
|
import { KeybindingRegistry } from '@theia/core/lib/browser';
|
|
import { ProblemStat } from '@theia/markers/lib/browser/problem/problem-manager';
|
|
import { FrontendApplication } from '@theia/core/lib/browser/frontend-application';
|
|
import { ProblemContribution as TheiaProblemContribution } from '@theia/markers/lib/browser/problem/problem-contribution';
|
|
import { EditorMode } from '../../editor-mode';
|
|
|
|
@injectable()
|
|
export class ProblemContribution extends TheiaProblemContribution {
|
|
|
|
@inject(EditorMode)
|
|
protected readonly editorMode: EditorMode;
|
|
|
|
async initializeLayout(app: FrontendApplication): Promise<void> {
|
|
if (this.editorMode.proMode) {
|
|
return super.initializeLayout(app);
|
|
}
|
|
}
|
|
|
|
protected setStatusBarElement(problemStat: ProblemStat): void {
|
|
if (this.editorMode.proMode) {
|
|
super.setStatusBarElement(problemStat);
|
|
}
|
|
}
|
|
|
|
registerKeybindings(keybindings: KeybindingRegistry): void {
|
|
if (this.toggleCommand) {
|
|
keybindings.registerKeybinding({
|
|
command: this.toggleCommand.id,
|
|
keybinding: 'ctrlcmd+alt+shift+m'
|
|
});
|
|
}
|
|
}
|
|
|
|
}
|