@opensumi/ide-task 2.12.1-next-079c1930

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/lib/browser/index.d.ts +6 -0
  2. package/lib/browser/index.d.ts.map +1 -0
  3. package/lib/browser/index.js +41 -0
  4. package/lib/browser/index.js.map +1 -0
  5. package/lib/browser/parser.d.ts +316 -0
  6. package/lib/browser/parser.d.ts.map +1 -0
  7. package/lib/browser/parser.js +481 -0
  8. package/lib/browser/parser.js.map +1 -0
  9. package/lib/browser/problem-collector.d.ts +27 -0
  10. package/lib/browser/problem-collector.d.ts.map +1 -0
  11. package/lib/browser/problem-collector.js +61 -0
  12. package/lib/browser/problem-collector.js.map +1 -0
  13. package/lib/browser/problem-line-matcher.d.ts +92 -0
  14. package/lib/browser/problem-line-matcher.d.ts.map +1 -0
  15. package/lib/browser/problem-line-matcher.js +378 -0
  16. package/lib/browser/problem-line-matcher.js.map +1 -0
  17. package/lib/browser/task-config.d.ts +385 -0
  18. package/lib/browser/task-config.d.ts.map +1 -0
  19. package/lib/browser/task-config.js +1427 -0
  20. package/lib/browser/task-config.js.map +1 -0
  21. package/lib/browser/task-preferences.contribution.d.ts +6 -0
  22. package/lib/browser/task-preferences.contribution.d.ts.map +1 -0
  23. package/lib/browser/task-preferences.contribution.js +17 -0
  24. package/lib/browser/task-preferences.contribution.js.map +1 -0
  25. package/lib/browser/task-preferences.d.ts +3 -0
  26. package/lib/browser/task-preferences.d.ts.map +1 -0
  27. package/lib/browser/task-preferences.js +15 -0
  28. package/lib/browser/task-preferences.js.map +1 -0
  29. package/lib/browser/task-preferences.provider.d.ts +6 -0
  30. package/lib/browser/task-preferences.provider.d.ts.map +1 -0
  31. package/lib/browser/task-preferences.provider.js +29 -0
  32. package/lib/browser/task-preferences.provider.js.map +1 -0
  33. package/lib/browser/task.contribution.d.ts +8 -0
  34. package/lib/browser/task.contribution.d.ts.map +1 -0
  35. package/lib/browser/task.contribution.js +35 -0
  36. package/lib/browser/task.contribution.js.map +1 -0
  37. package/lib/browser/task.schema.d.ts +4 -0
  38. package/lib/browser/task.schema.d.ts.map +1 -0
  39. package/lib/browser/task.schema.js +294 -0
  40. package/lib/browser/task.schema.js.map +1 -0
  41. package/lib/browser/task.service.d.ts +43 -0
  42. package/lib/browser/task.service.d.ts.map +1 -0
  43. package/lib/browser/task.service.js +354 -0
  44. package/lib/browser/task.service.js.map +1 -0
  45. package/lib/browser/terminal-task-system.d.ts +80 -0
  46. package/lib/browser/terminal-task-system.d.ts.map +1 -0
  47. package/lib/browser/terminal-task-system.js +391 -0
  48. package/lib/browser/terminal-task-system.js.map +1 -0
  49. package/lib/common/index.d.ts +130 -0
  50. package/lib/common/index.d.ts.map +1 -0
  51. package/lib/common/index.js +7 -0
  52. package/lib/common/index.js.map +1 -0
  53. package/lib/common/task.d.ts +572 -0
  54. package/lib/common/task.d.ts.map +1 -0
  55. package/lib/common/task.js +523 -0
  56. package/lib/common/task.js.map +1 -0
  57. package/lib/index.d.ts +3 -0
  58. package/lib/index.d.ts.map +1 -0
  59. package/lib/index.js +6 -0
  60. package/lib/index.js.map +1 -0
  61. package/lib/node/index.d.ts +6 -0
  62. package/lib/node/index.d.ts.map +1 -0
  63. package/lib/node/index.js +17 -0
  64. package/lib/node/index.js.map +1 -0
  65. package/package.json +33 -0
@@ -0,0 +1,92 @@
1
+ /********************************************************************************
2
+ * Copyright (C) 2019 Ericsson and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ import { ProblemLocationKind, ProblemPattern, ProblemMatcher, ProblemMatch } from '@opensumi/ide-core-common';
17
+ export interface ProblemData {
18
+ kind?: ProblemLocationKind;
19
+ file?: string;
20
+ location?: string;
21
+ line?: string;
22
+ character?: string;
23
+ endLine?: string;
24
+ endCharacter?: string;
25
+ message?: string;
26
+ severity?: string;
27
+ code?: string;
28
+ }
29
+ export declare abstract class AbstractLineMatcher {
30
+ protected matcher: ProblemMatcher;
31
+ protected patterns: ProblemPattern[];
32
+ protected activePatternIndex: number;
33
+ protected activePattern: ProblemPattern | undefined;
34
+ protected cachedProblemData: ProblemData;
35
+ constructor(matcher: ProblemMatcher);
36
+ /**
37
+ * Finds the problem identified by this line matcher.
38
+ *
39
+ * @param line the line of text to find the problem from
40
+ * @return the identified problem. If the problem is not found, `undefined` is returned.
41
+ */
42
+ abstract match(line: string): ProblemMatch | undefined;
43
+ /**
44
+ * Number of problem patterns that the line matcher uses.
45
+ */
46
+ get patternCount(): number;
47
+ protected getEmptyProblemData(): ProblemData;
48
+ protected fillProblemData(data: ProblemData | null, pattern: ProblemPattern, matches: RegExpExecArray): data is ProblemData;
49
+ private appendProperty;
50
+ private fillProperty;
51
+ protected getMarkerMatch(data: ProblemData): ProblemMatch | undefined;
52
+ private getLocation;
53
+ private parseLocationInfo;
54
+ private createRange;
55
+ private getZeroBasedRangeIndex;
56
+ private getSeverity;
57
+ private getResource;
58
+ protected resetActivePatternIndex(defaultIndex?: number): void;
59
+ protected nextProblemPattern(): void;
60
+ protected doOneLineMatch(line: string): boolean;
61
+ protected isUsingTheLastPattern(): boolean;
62
+ protected isLastPatternLoop(): boolean;
63
+ protected resetCachedProblemData(): void;
64
+ }
65
+ export declare class StartStopLineMatcher extends AbstractLineMatcher {
66
+ protected matcher: ProblemMatcher;
67
+ constructor(matcher: ProblemMatcher);
68
+ /**
69
+ * Finds the problem identified by this line matcher.
70
+ *
71
+ * @param line the line of text to find the problem from
72
+ * @return the identified problem. If the problem is not found, `undefined` is returned.
73
+ */
74
+ match(line: string): ProblemMatch | undefined;
75
+ }
76
+ export declare class WatchModeLineMatcher extends StartStopLineMatcher {
77
+ protected matcher: ProblemMatcher;
78
+ private beginsPattern;
79
+ private endsPattern;
80
+ activeOnStart: boolean;
81
+ constructor(matcher: ProblemMatcher);
82
+ /**
83
+ * Finds the problem identified by this line matcher.
84
+ *
85
+ * @param line the line of text to find the problem from
86
+ * @return the identified problem. If the problem is not found, `undefined` is returned.
87
+ */
88
+ match(line: string): ProblemMatch | undefined;
89
+ matchBegin(line: string): boolean;
90
+ matchEnd(line: string): boolean;
91
+ }
92
+ //# sourceMappingURL=problem-line-matcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"problem-line-matcher.d.ts","sourceRoot":"","sources":["../../src/browser/problem-line-matcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAGlF,OAAO,EAAa,mBAAmB,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAsE,MAAM,2BAA2B,CAAC;AAK7L,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,8BAAsB,mBAAmB;IAQrC,SAAS,CAAC,OAAO,EAAE,cAAc;IANnC,SAAS,CAAC,QAAQ,EAAE,cAAc,EAAE,CAAM;IAC1C,SAAS,CAAC,kBAAkB,EAAE,MAAM,CAAK;IACzC,SAAS,CAAC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,CAAC,OAAO,EAAE,cAAc;IALnC,OAAO,CAAC,aAAa,CAAkB;IACvC,OAAO,CAAC,WAAW,CAAkB;IACrC,aAAa,EAAE,OAAO,CAAS;gBAGnB,OAAO,EAAE,cAAc;IASnC;;;;;OAKG;IACH,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAuB7C,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAWjC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;CAShC"}
@@ -0,0 +1,378 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (C) 2019 Ericsson and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the Eclipse Public License v. 2.0 which is available at
7
+ * http://www.eclipse.org/legal/epl-2.0.
8
+ *
9
+ * This Source Code may also be made available under the following Secondary
10
+ * Licenses when the conditions for such availability set forth in the Eclipse
11
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ * with the GNU Classpath Exception which is available at
13
+ * https://www.gnu.org/software/classpath/license.html.
14
+ *
15
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ ********************************************************************************/
17
+ // Some code copued and modified from https://github.com/eclipse-theia/theia/tree/v1.14.0/packages/task/src/node/task-abstract-line-matcher.ts
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.WatchModeLineMatcher = exports.StartStopLineMatcher = exports.AbstractLineMatcher = void 0;
20
+ const ide_core_common_1 = require("@opensumi/ide-core-common");
21
+ const endOfLine = ide_core_common_1.isWindows ? '\r\n' : '\n';
22
+ class AbstractLineMatcher {
23
+ constructor(matcher) {
24
+ this.matcher = matcher;
25
+ this.patterns = [];
26
+ this.activePatternIndex = 0;
27
+ if (Array.isArray(matcher.pattern)) {
28
+ this.patterns = matcher.pattern;
29
+ }
30
+ else {
31
+ this.patterns = [matcher.pattern];
32
+ }
33
+ this.cachedProblemData = this.getEmptyProblemData();
34
+ if (this.patterns.slice(0, this.patternCount - 1).some((p) => !!p.loop)) {
35
+ // tslint:disable-next-line:no-console
36
+ console.error('Problem Matcher: Only the last pattern can loop');
37
+ }
38
+ }
39
+ /**
40
+ * Number of problem patterns that the line matcher uses.
41
+ */
42
+ get patternCount() {
43
+ return this.patterns.length;
44
+ }
45
+ getEmptyProblemData() {
46
+ // eslint-disable-next-line no-null/no-null
47
+ return Object.create(null);
48
+ }
49
+ fillProblemData(data, pattern, matches) {
50
+ if (data) {
51
+ this.fillProperty(data, 'file', pattern, matches, true);
52
+ this.appendProperty(data, 'message', pattern, matches, true);
53
+ this.fillProperty(data, 'code', pattern, matches, true);
54
+ this.fillProperty(data, 'severity', pattern, matches, true);
55
+ this.fillProperty(data, 'location', pattern, matches, true);
56
+ this.fillProperty(data, 'line', pattern, matches);
57
+ this.fillProperty(data, 'character', pattern, matches);
58
+ this.fillProperty(data, 'endLine', pattern, matches);
59
+ this.fillProperty(data, 'endCharacter', pattern, matches);
60
+ return true;
61
+ }
62
+ return false;
63
+ }
64
+ appendProperty(data, property, pattern, matches, trim = false) {
65
+ const patternProperty = pattern[property];
66
+ if (data[property] === undefined) {
67
+ this.fillProperty(data, property, pattern, matches, trim);
68
+ }
69
+ else if (patternProperty !== undefined && patternProperty < matches.length) {
70
+ let value = matches[patternProperty];
71
+ if (trim) {
72
+ value = value.trim();
73
+ }
74
+ data[property] += endOfLine + value;
75
+ }
76
+ }
77
+ fillProperty(data, property, pattern, matches, trim = false) {
78
+ const patternAtProperty = pattern[property];
79
+ if (data[property] === undefined && patternAtProperty !== undefined && patternAtProperty < matches.length) {
80
+ let value = matches[patternAtProperty];
81
+ if (value !== undefined) {
82
+ if (trim) {
83
+ value = value.trim();
84
+ }
85
+ data[property] = value;
86
+ }
87
+ }
88
+ }
89
+ getMarkerMatch(data) {
90
+ try {
91
+ const location = this.getLocation(data);
92
+ if (data.file && location && data.message) {
93
+ const marker = {
94
+ severity: this.getSeverity(data),
95
+ range: location,
96
+ message: data.message,
97
+ };
98
+ if (data.code !== undefined) {
99
+ marker.code = data.code;
100
+ }
101
+ if (this.matcher.source !== undefined) {
102
+ marker.source = this.matcher.source;
103
+ }
104
+ return {
105
+ description: this.matcher,
106
+ resource: this.getResource(data.file, this.matcher),
107
+ marker,
108
+ };
109
+ }
110
+ return {
111
+ description: this.matcher,
112
+ };
113
+ }
114
+ catch (err) {
115
+ // tslint:disable-next-line:no-console
116
+ console.error(`Failed to convert problem data into match: ${JSON.stringify(data)}`);
117
+ }
118
+ return undefined;
119
+ }
120
+ getLocation(data) {
121
+ if (data.kind === ide_core_common_1.ProblemLocationKind.File) {
122
+ return this.createRange(0, 0, 0, 0);
123
+ }
124
+ if (data.location) {
125
+ return this.parseLocationInfo(data.location);
126
+ }
127
+ if (!data.line) {
128
+ // eslint-disable-next-line no-null/no-null
129
+ return null;
130
+ }
131
+ const startLine = parseInt(data.line, 10);
132
+ const startColumn = data.character ? parseInt(data.character, 10) : undefined;
133
+ const endLine = data.endLine ? parseInt(data.endLine, 10) : undefined;
134
+ const endColumn = data.endCharacter ? parseInt(data.endCharacter, 10) : undefined;
135
+ return this.createRange(startLine, startColumn, endLine, endColumn);
136
+ }
137
+ parseLocationInfo(value) {
138
+ if (!value || !value.match(/(\d+|\d+,\d+|\d+,\d+,\d+,\d+)/)) {
139
+ // eslint-disable-next-line no-null/no-null
140
+ return null;
141
+ }
142
+ const parts = value.split(',');
143
+ const startLine = parseInt(parts[0], 10);
144
+ const startColumn = parts.length > 1 ? parseInt(parts[1], 10) : undefined;
145
+ if (parts.length > 3) {
146
+ return this.createRange(startLine, startColumn, parseInt(parts[2], 10), parseInt(parts[3], 10));
147
+ }
148
+ else {
149
+ return this.createRange(startLine, startColumn, undefined, undefined);
150
+ }
151
+ }
152
+ createRange(startLine, startColumn, endLine, endColumn) {
153
+ let range;
154
+ if (startColumn !== undefined) {
155
+ if (endColumn !== undefined) {
156
+ range = { start: { line: startLine, character: startColumn }, end: { line: endLine || startLine, character: endColumn } };
157
+ }
158
+ else {
159
+ range = { start: { line: startLine, character: startColumn }, end: { line: startLine, character: startColumn } };
160
+ }
161
+ }
162
+ else {
163
+ range = { start: { line: startLine, character: 1 }, end: { line: startLine, character: Number.MAX_VALUE } };
164
+ }
165
+ // range indexes should be zero-based
166
+ return {
167
+ start: { line: this.getZeroBasedRangeIndex(range.start.line), character: this.getZeroBasedRangeIndex(range.start.character) },
168
+ end: { line: this.getZeroBasedRangeIndex(range.end.line), character: this.getZeroBasedRangeIndex(range.end.character) },
169
+ };
170
+ }
171
+ getZeroBasedRangeIndex(ind) {
172
+ return ind === 0 ? ind : ind - 1;
173
+ }
174
+ getSeverity(data) {
175
+ // eslint-disable-next-line no-null/no-null
176
+ let result = null;
177
+ if (data.severity) {
178
+ const value = data.severity;
179
+ if (value) {
180
+ result = ide_core_common_1.Severity.fromValue(value);
181
+ if (result === ide_core_common_1.Severity.Ignore) {
182
+ if (value === 'E') {
183
+ result = ide_core_common_1.Severity.Error;
184
+ }
185
+ else if (value === 'W') {
186
+ result = ide_core_common_1.Severity.Warning;
187
+ }
188
+ else if (value === 'I') {
189
+ result = ide_core_common_1.Severity.Info;
190
+ }
191
+ else if (value.toLowerCase() === 'hint') {
192
+ result = ide_core_common_1.Severity.Info;
193
+ }
194
+ else if (value.toLowerCase() === 'note') {
195
+ result = ide_core_common_1.Severity.Info;
196
+ }
197
+ }
198
+ }
199
+ }
200
+ // eslint-disable-next-line no-null/no-null
201
+ if (result === null || result === ide_core_common_1.Severity.Ignore) {
202
+ result = ide_core_common_1.Severity.fromValue(this.matcher.severity) || ide_core_common_1.Severity.Error;
203
+ }
204
+ return ide_core_common_1.Severity.toDiagnosticSeverity(result);
205
+ }
206
+ getResource(filename, matcher) {
207
+ const kind = matcher.fileLocation;
208
+ let fullPath;
209
+ if (kind === ide_core_common_1.FileLocationKind.Absolute) {
210
+ fullPath = filename;
211
+ }
212
+ else if ((kind === ide_core_common_1.FileLocationKind.Relative) && matcher.filePrefix) {
213
+ let relativeFileName = filename.replace(/\\/g, '/');
214
+ if (relativeFileName.startsWith('./')) {
215
+ relativeFileName = relativeFileName.slice(2);
216
+ }
217
+ fullPath = new ide_core_common_1.URI(matcher.filePrefix).resolve(relativeFileName).path.toString();
218
+ }
219
+ if (fullPath === undefined) {
220
+ throw new Error('FileLocationKind is not actionable. Does the matcher have a filePrefix? This should never happen.');
221
+ }
222
+ fullPath = fullPath.replace(/\\/g, '/');
223
+ if (fullPath[0] !== '/') {
224
+ fullPath = '/' + fullPath;
225
+ }
226
+ if (matcher.uriProvider !== undefined) {
227
+ return matcher.uriProvider(fullPath);
228
+ }
229
+ else {
230
+ return ide_core_common_1.URI.file(fullPath);
231
+ }
232
+ }
233
+ resetActivePatternIndex(defaultIndex) {
234
+ if (defaultIndex === undefined) {
235
+ defaultIndex = 0;
236
+ }
237
+ this.activePatternIndex = defaultIndex;
238
+ this.activePattern = this.patterns[defaultIndex];
239
+ }
240
+ nextProblemPattern() {
241
+ this.activePatternIndex++;
242
+ if (this.activePatternIndex > this.patternCount - 1) {
243
+ this.resetActivePatternIndex();
244
+ }
245
+ else {
246
+ this.activePattern = this.patterns[this.activePatternIndex];
247
+ }
248
+ }
249
+ doOneLineMatch(line) {
250
+ if (this.activePattern) {
251
+ const regexp = new RegExp(this.activePattern.regexp);
252
+ const regexMatches = regexp.exec(line);
253
+ if (regexMatches) {
254
+ if (this.activePattern.kind !== undefined && this.cachedProblemData.kind !== undefined) {
255
+ this.cachedProblemData.kind = this.activePattern.kind;
256
+ }
257
+ return this.fillProblemData(this.cachedProblemData, this.activePattern, regexMatches);
258
+ }
259
+ }
260
+ return false;
261
+ }
262
+ // check if active pattern is the last pattern
263
+ isUsingTheLastPattern() {
264
+ return this.patternCount > 0 && this.activePatternIndex === this.patternCount - 1;
265
+ }
266
+ isLastPatternLoop() {
267
+ return this.patternCount > 0 && !!this.patterns[this.patternCount - 1].loop;
268
+ }
269
+ resetCachedProblemData() {
270
+ this.cachedProblemData = this.getEmptyProblemData();
271
+ }
272
+ }
273
+ exports.AbstractLineMatcher = AbstractLineMatcher;
274
+ class StartStopLineMatcher extends AbstractLineMatcher {
275
+ constructor(matcher) {
276
+ super(matcher);
277
+ this.matcher = matcher;
278
+ }
279
+ /**
280
+ * Finds the problem identified by this line matcher.
281
+ *
282
+ * @param line the line of text to find the problem from
283
+ * @return the identified problem. If the problem is not found, `undefined` is returned.
284
+ */
285
+ match(line) {
286
+ if (!this.activePattern) {
287
+ this.resetActivePatternIndex();
288
+ }
289
+ if (this.activePattern) {
290
+ const originalProblemData = Object.assign(this.getEmptyProblemData(), this.cachedProblemData);
291
+ const foundMatch = this.doOneLineMatch(line);
292
+ if (foundMatch) {
293
+ if (this.isUsingTheLastPattern()) {
294
+ const matchResult = this.getMarkerMatch(this.cachedProblemData);
295
+ if (this.isLastPatternLoop()) {
296
+ this.cachedProblemData = originalProblemData;
297
+ }
298
+ else {
299
+ this.resetCachedProblemData();
300
+ this.resetActivePatternIndex();
301
+ }
302
+ return matchResult;
303
+ }
304
+ else {
305
+ this.nextProblemPattern();
306
+ }
307
+ }
308
+ else {
309
+ this.resetCachedProblemData();
310
+ if (this.activePatternIndex !== 0) { // if no match, use the first pattern to parse the same line
311
+ this.resetActivePatternIndex();
312
+ return this.match(line);
313
+ }
314
+ }
315
+ }
316
+ return undefined;
317
+ }
318
+ }
319
+ exports.StartStopLineMatcher = StartStopLineMatcher;
320
+ class WatchModeLineMatcher extends StartStopLineMatcher {
321
+ constructor(matcher) {
322
+ super(matcher);
323
+ this.matcher = matcher;
324
+ this.activeOnStart = false;
325
+ this.beginsPattern = matcher.watching.beginsPattern;
326
+ this.endsPattern = matcher.watching.endsPattern;
327
+ this.activeOnStart = matcher.watching.activeOnStart === true;
328
+ this.resetActivePatternIndex(this.activeOnStart ? 0 : -1);
329
+ }
330
+ /**
331
+ * Finds the problem identified by this line matcher.
332
+ *
333
+ * @param line the line of text to find the problem from
334
+ * @return the identified problem. If the problem is not found, `undefined` is returned.
335
+ */
336
+ match(line) {
337
+ if (this.activeOnStart) {
338
+ this.activeOnStart = false;
339
+ this.resetActivePatternIndex(0);
340
+ this.resetCachedProblemData();
341
+ return super.match(line);
342
+ }
343
+ if (this.matchBegin(line)) {
344
+ const beginsPatternMatch = this.getMarkerMatch(this.cachedProblemData);
345
+ this.resetCachedProblemData();
346
+ return beginsPatternMatch;
347
+ }
348
+ if (this.matchEnd(line)) {
349
+ this.resetCachedProblemData();
350
+ return undefined;
351
+ }
352
+ if (this.activePattern) {
353
+ return super.match(line);
354
+ }
355
+ return undefined;
356
+ }
357
+ matchBegin(line) {
358
+ const beginRegexp = new RegExp(this.beginsPattern.regexp);
359
+ const regexMatches = beginRegexp.exec(line);
360
+ if (regexMatches) {
361
+ this.fillProblemData(this.cachedProblemData, this.beginsPattern, regexMatches);
362
+ this.resetActivePatternIndex(0);
363
+ return true;
364
+ }
365
+ return false;
366
+ }
367
+ matchEnd(line) {
368
+ const endRegexp = new RegExp(this.endsPattern.regexp);
369
+ const match = endRegexp.exec(line);
370
+ if (match) {
371
+ this.resetActivePatternIndex(-1);
372
+ return true;
373
+ }
374
+ return false;
375
+ }
376
+ }
377
+ exports.WatchModeLineMatcher = WatchModeLineMatcher;
378
+ //# sourceMappingURL=problem-line-matcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"problem-line-matcher.js","sourceRoot":"","sources":["../../src/browser/problem-line-matcher.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;AAClF,8IAA8I;;;AAE9I,+DAA6L;AAG7L,MAAM,SAAS,GAAW,2BAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AAepD,MAAsB,mBAAmB;IAOvC,YACY,OAAuB;QAAvB,YAAO,GAAP,OAAO,CAAgB;QANzB,aAAQ,GAAqB,EAAE,CAAC;QAChC,uBAAkB,GAAW,CAAC,CAAC;QAOvC,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAA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