Refine the output message. (#402)

travisbug
Yaohai Zheng 7 years ago committed by GitHub
parent 5a81c8883f
commit 400b918a74
  1. 4
      src/arduino/arduino.ts
  2. 4
      src/common/outputChannel.ts
  3. 21
      syntaxes/arduino.output.tmLanguage

@ -128,7 +128,7 @@ export class ArduinoApp {
args.push("--pref", `build.path=${outputPath}`);
} else {
const msg = "Output path is not specified. Unable to reuse previously compiled files. Upload could be slow. See README.";
vscode.window.showWarningMessage(msg);
arduinoChannel.warning(msg);
}
await util.spawn(this._settings.commandPath, arduinoChannel.channel, args).then(async () => {
UsbDetector.getInstance().resumeListening();
@ -170,7 +170,7 @@ export class ArduinoApp {
args.push("--pref", `build.path=${outputPath}`);
} else {
const msg = "Output path is not specified. Unable to reuse previously compiled files. Verify could be slow. See README.";
vscode.window.showWarningMessage(msg);
arduinoChannel.warning(msg);
}
arduinoChannel.show();

@ -14,6 +14,10 @@ export const arduinoChannel = {
this.channel.appendLine(`[Done] ${message}`);
},
warning(message: string) {
this.channel.appendLine(`[Warning] ${message}`);
},
error(message: string) {
this.channel.appendLine(`[Error] ${message}`);
},

@ -63,7 +63,26 @@
<key>match</key>
<string>(\[Error\])(.+)</string>
<key>name</key>
<string>arduino-output.done</string>
<string>arduino-output.errro</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>token.info-token</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>token.warning-token</string>
</dict>
</dict>
<key>match</key>
<string>(\[Warning\])(.+)</string>
<key>name</key>
<string>arduino-output.warning</string>
</dict>
</array>
</dict>

Loading…
Cancel
Save