提交 acddf84e 编写于 作者: R Ramya Rao 提交者: GitHub

Telemetry for emmet expansions (#21332)

上级 b8687874
......@@ -21,6 +21,7 @@ import * as emmet from 'emmet';
import * as path from 'path';
import * as pfs from 'vs/base/node/pfs';
import Severity from 'vs/base/common/severity';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
interface IEmmetConfiguration {
emmet: {
......@@ -274,9 +275,12 @@ export class BasicEmmetEditorAction extends EmmetEditorAction {
}
public runEmmetAction(accessor: ServicesAccessor, ctx: EmmetActionContext) {
const telemetryService = accessor.get(ITelemetryService);
try {
if (!ctx.emmet.run(this.emmetActionName, ctx.editorAccessor)) {
this.noExpansionOccurred(ctx.editor);
} else if (this.emmetActionName === 'expand_abbreviation') {
telemetryService.publicLog('emmetActionSucceeded', { action: this.emmetActionName });
}
} catch (err) {
this.noExpansionOccurred(ctx.editor);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册