mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-06-16 17:16:34 +00:00

* Update Theia to 1.19.0 * update CLI to 0.20.0-rc3 * Add language selector to settings * updated language server and vscode-arduino-tools * update Language Server flags * get cli port from config * force native menu on windows * pinned Language Server to rc2 * fix search icon * update CLI version
38 lines
1.2 KiB
TypeScript
38 lines
1.2 KiB
TypeScript
import { inject, injectable } from 'inversify';
|
|
import { Emitter } from '@theia/core/lib/common/event';
|
|
import { OutputContribution } from '@theia/output/lib/browser/output-contribution';
|
|
import { OutputChannelManager } from '@theia/output/lib/browser/output-channel';
|
|
import {
|
|
OutputMessage,
|
|
ProgressMessage,
|
|
ResponseServiceArduino,
|
|
} from '../common/protocol/response-service';
|
|
|
|
@injectable()
|
|
export class ResponseServiceImpl implements ResponseServiceArduino {
|
|
@inject(OutputContribution)
|
|
protected outputContribution: OutputContribution;
|
|
|
|
@inject(OutputChannelManager)
|
|
protected outputChannelManager: OutputChannelManager;
|
|
|
|
protected readonly progressDidChangeEmitter = new Emitter<ProgressMessage>();
|
|
|
|
readonly onProgressDidChange = this.progressDidChangeEmitter.event;
|
|
|
|
clearArduinoChannel(): void {
|
|
this.outputChannelManager.getChannel('Arduino').clear();
|
|
}
|
|
|
|
appendToOutput(message: OutputMessage): void {
|
|
const { chunk } = message;
|
|
const channel = this.outputChannelManager.getChannel('Arduino');
|
|
channel.show({ preserveFocus: true });
|
|
channel.append(chunk);
|
|
}
|
|
|
|
reportProgress(progress: ProgressMessage): void {
|
|
this.progressDidChangeEmitter.fire(progress);
|
|
}
|
|
}
|