mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-21 15:49:15 +01:00
inline outputworker
This commit is contained in:
@@ -1,146 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import {TPromise} from 'vs/base/common/winjs.base';
|
||||
import {IMarkerService} from 'vs/platform/markers/common/markers';
|
||||
import {IResourceService} from 'vs/editor/common/services/resourceService';
|
||||
import {AbstractModeWorker} from 'vs/editor/common/modes/abstractModeWorker';
|
||||
import URI from 'vs/base/common/uri';
|
||||
import strings = require('vs/base/common/strings');
|
||||
import arrays = require('vs/base/common/arrays');
|
||||
import paths = require('vs/base/common/paths');
|
||||
import {ILink, IMode, IWorkerParticipant} from 'vs/editor/common/modes';
|
||||
import {Range} from 'vs/editor/common/core/range';
|
||||
import {IWorkspaceContextService, IWorkspace} from 'vs/platform/workspace/common/workspace';
|
||||
|
||||
/**
|
||||
* A base class of text editor worker that helps with detecting links in the text that point to files in the workspace.
|
||||
*/
|
||||
export class TextEditorWorker extends AbstractModeWorker {
|
||||
private _contextService: IWorkspaceContextService;
|
||||
private patterns: RegExp[];
|
||||
|
||||
constructor(mode: IMode, participants: IWorkerParticipant[], @IResourceService resourceService: IResourceService,
|
||||
@IMarkerService markerService: IMarkerService, @IWorkspaceContextService contextService:IWorkspaceContextService) {
|
||||
super(mode, participants, resourceService, markerService);
|
||||
|
||||
this._contextService = contextService;
|
||||
|
||||
let workspace = this._contextService.getWorkspace();
|
||||
this.patterns = workspace ? TextEditorWorker.createPatterns(workspace) : [];
|
||||
}
|
||||
|
||||
public get contextService(): IWorkspaceContextService {
|
||||
return this._contextService;
|
||||
}
|
||||
|
||||
public computeLinks(resource: URI): TPromise<ILink[]> {
|
||||
return super.computeLinks(resource).then((links) => {
|
||||
if (!this.patterns.length) {
|
||||
return links;
|
||||
}
|
||||
|
||||
let model = this.resourceService.get(resource);
|
||||
|
||||
for (let i = 1, lineCount = model.getLineCount(); i <= lineCount; i++) {
|
||||
links.push(...TextEditorWorker.detectLinks(model.getLineContent(i), i, this.patterns, this._contextService));
|
||||
}
|
||||
|
||||
return links;
|
||||
});
|
||||
}
|
||||
|
||||
public static createPatterns(workspace: IWorkspace): RegExp[] {
|
||||
let patterns: RegExp[] = [];
|
||||
|
||||
let workspaceRootVariants = arrays.distinct([
|
||||
paths.normalize(workspace.resource.fsPath, true),
|
||||
paths.normalize(workspace.resource.fsPath, false)
|
||||
]);
|
||||
|
||||
workspaceRootVariants.forEach((workspaceRoot) => {
|
||||
|
||||
// Example: C:\Users\someone\AppData\Local\Temp\_monacodata_9888\workspaces\express\server.js on line 8, column 13
|
||||
patterns.push(new RegExp(strings.escapeRegExpCharacters(workspaceRoot) + '(\\S*) on line ((\\d+)(, column (\\d+))?)', 'gi'));
|
||||
|
||||
// Example: C:\Users\someone\AppData\Local\Temp\_monacodata_9888\workspaces\express\server.js:line 8, column 13
|
||||
patterns.push(new RegExp(strings.escapeRegExpCharacters(workspaceRoot) + '(\\S*):line ((\\d+)(, column (\\d+))?)', 'gi'));
|
||||
|
||||
// Example: C:\Users\someone\AppData\Local\Temp\_monacodata_9888\workspaces\mankala\Features.ts(45): error
|
||||
// Example: C:\Users\someone\AppData\Local\Temp\_monacodata_9888\workspaces\mankala\Features.ts (45): error
|
||||
// Example: C:\Users\someone\AppData\Local\Temp\_monacodata_9888\workspaces\mankala\Features.ts(45,18): error
|
||||
// Example: C:\Users\someone\AppData\Local\Temp\_monacodata_9888\workspaces\mankala\Features.ts (45,18): error
|
||||
patterns.push(new RegExp(strings.escapeRegExpCharacters(workspaceRoot) + '([^\\s\\(\\)]*)(\\s?\\((\\d+)(,(\\d+))?)\\)', 'gi'));
|
||||
|
||||
// Example: at C:\Users\someone\AppData\Local\Temp\_monacodata_9888\workspaces\mankala\Game.ts
|
||||
// Example: at C:\Users\someone\AppData\Local\Temp\_monacodata_9888\workspaces\mankala\Game.ts:336
|
||||
// Example: at C:\Users\someone\AppData\Local\Temp\_monacodata_9888\workspaces\mankala\Game.ts:336:9
|
||||
patterns.push(new RegExp(strings.escapeRegExpCharacters(workspaceRoot) + '([^:\\s\\(\\)<>\'\"\\[\\]]*)(:(\\d+))?(:(\\d+))?', 'gi'));
|
||||
});
|
||||
|
||||
return patterns;
|
||||
}
|
||||
|
||||
/**
|
||||
* Detect links. Made public static to allow for tests.
|
||||
*/
|
||||
public static detectLinks(line: string, lineIndex: number, patterns: RegExp[], contextService: IWorkspaceContextService): ILink[] {
|
||||
let links: ILink[] = [];
|
||||
|
||||
patterns.forEach((pattern) => {
|
||||
pattern.lastIndex = 0; // the holy grail of software development
|
||||
|
||||
let match: RegExpExecArray;
|
||||
let offset = 0;
|
||||
while ((match = pattern.exec(line)) !== null) {
|
||||
|
||||
// Convert the relative path information to a resource that we can use in links
|
||||
let workspaceRelativePath = strings.replaceAll(strings.rtrim(match[1], '.'), '\\', '/'); // remove trailing "." that likely indicate end of sentence
|
||||
let resource:string;
|
||||
try {
|
||||
resource = contextService.toResource(workspaceRelativePath).toString();
|
||||
} catch (error) {
|
||||
continue; // we might find an invalid URI and then we dont want to loose all other links
|
||||
}
|
||||
|
||||
// Append line/col information to URI if matching
|
||||
if (match[3]) {
|
||||
let lineNumber = match[3];
|
||||
|
||||
if (match[5]) {
|
||||
let columnNumber = match[5];
|
||||
resource = strings.format('{0}#{1},{2}', resource, lineNumber, columnNumber);
|
||||
} else {
|
||||
resource = strings.format('{0}#{1}', resource, lineNumber);
|
||||
}
|
||||
}
|
||||
|
||||
let fullMatch = strings.rtrim(match[0], '.'); // remove trailing "." that likely indicate end of sentence
|
||||
|
||||
let index = line.indexOf(fullMatch, offset);
|
||||
offset += index + fullMatch.length;
|
||||
|
||||
var linkRange = {
|
||||
startColumn: index + 1,
|
||||
startLineNumber: lineIndex,
|
||||
endColumn: index + 1 + fullMatch.length,
|
||||
endLineNumber: lineIndex
|
||||
};
|
||||
|
||||
if (links.some((link) => Range.areIntersectingOrTouching(link.range, linkRange))) {
|
||||
return; // Do not detect duplicate links
|
||||
}
|
||||
|
||||
links.push({
|
||||
range: linkRange,
|
||||
url: resource
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return links;
|
||||
}
|
||||
}
|
||||
@@ -4,8 +4,143 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import {TextEditorWorker} from 'vs/workbench/common/textEditorWorker';
|
||||
import {TPromise} from 'vs/base/common/winjs.base';
|
||||
import {IMarkerService} from 'vs/platform/markers/common/markers';
|
||||
import {IResourceService} from 'vs/editor/common/services/resourceService';
|
||||
import {AbstractModeWorker} from 'vs/editor/common/modes/abstractModeWorker';
|
||||
import URI from 'vs/base/common/uri';
|
||||
import strings = require('vs/base/common/strings');
|
||||
import arrays = require('vs/base/common/arrays');
|
||||
import paths = require('vs/base/common/paths');
|
||||
import {ILink, IMode, IWorkerParticipant} from 'vs/editor/common/modes';
|
||||
import {Range} from 'vs/editor/common/core/range';
|
||||
import {IWorkspaceContextService, IWorkspace} from 'vs/platform/workspace/common/workspace';
|
||||
|
||||
export class OutputWorker extends TextEditorWorker {
|
||||
/**
|
||||
* A base class of text editor worker that helps with detecting links in the text that point to files in the workspace.
|
||||
*/
|
||||
export class OutputWorker extends AbstractModeWorker {
|
||||
private _contextService: IWorkspaceContextService;
|
||||
private patterns: RegExp[];
|
||||
|
||||
constructor(mode: IMode, participants: IWorkerParticipant[], @IResourceService resourceService: IResourceService,
|
||||
@IMarkerService markerService: IMarkerService, @IWorkspaceContextService contextService:IWorkspaceContextService) {
|
||||
super(mode, participants, resourceService, markerService);
|
||||
|
||||
this._contextService = contextService;
|
||||
|
||||
let workspace = this._contextService.getWorkspace();
|
||||
this.patterns = workspace ? OutputWorker.createPatterns(workspace) : [];
|
||||
}
|
||||
|
||||
public get contextService(): IWorkspaceContextService {
|
||||
return this._contextService;
|
||||
}
|
||||
|
||||
public computeLinks(resource: URI): TPromise<ILink[]> {
|
||||
return super.computeLinks(resource).then((links) => {
|
||||
if (!this.patterns.length) {
|
||||
return links;
|
||||
}
|
||||
|
||||
let model = this.resourceService.get(resource);
|
||||
|
||||
for (let i = 1, lineCount = model.getLineCount(); i <= lineCount; i++) {
|
||||
links.push(...OutputWorker.detectLinks(model.getLineContent(i), i, this.patterns, this._contextService));
|
||||
}
|
||||
|
||||
return links;
|
||||
});
|
||||
}
|
||||
|
||||
public static createPatterns(workspace: IWorkspace): RegExp[] {
|
||||
let patterns: RegExp[] = [];
|
||||
|
||||
let workspaceRootVariants = arrays.distinct([
|
||||
paths.normalize(workspace.resource.fsPath, true),
|
||||
paths.normalize(workspace.resource.fsPath, false)
|
||||
]);
|
||||
|
||||
workspaceRootVariants.forEach((workspaceRoot) => {
|
||||
|
||||
// Example: C:\Users\someone\AppData\Local\Temp\_monacodata_9888\workspaces\express\server.js on line 8, column 13
|
||||
patterns.push(new RegExp(strings.escapeRegExpCharacters(workspaceRoot) + '(\\S*) on line ((\\d+)(, column (\\d+))?)', 'gi'));
|
||||
|
||||
// Example: C:\Users\someone\AppData\Local\Temp\_monacodata_9888\workspaces\express\server.js:line 8, column 13
|
||||
patterns.push(new RegExp(strings.escapeRegExpCharacters(workspaceRoot) + '(\\S*):line ((\\d+)(, column (\\d+))?)', 'gi'));
|
||||
|
||||
// Example: C:\Users\someone\AppData\Local\Temp\_monacodata_9888\workspaces\mankala\Features.ts(45): error
|
||||
// Example: C:\Users\someone\AppData\Local\Temp\_monacodata_9888\workspaces\mankala\Features.ts (45): error
|
||||
// Example: C:\Users\someone\AppData\Local\Temp\_monacodata_9888\workspaces\mankala\Features.ts(45,18): error
|
||||
// Example: C:\Users\someone\AppData\Local\Temp\_monacodata_9888\workspaces\mankala\Features.ts (45,18): error
|
||||
patterns.push(new RegExp(strings.escapeRegExpCharacters(workspaceRoot) + '([^\\s\\(\\)]*)(\\s?\\((\\d+)(,(\\d+))?)\\)', 'gi'));
|
||||
|
||||
// Example: at C:\Users\someone\AppData\Local\Temp\_monacodata_9888\workspaces\mankala\Game.ts
|
||||
// Example: at C:\Users\someone\AppData\Local\Temp\_monacodata_9888\workspaces\mankala\Game.ts:336
|
||||
// Example: at C:\Users\someone\AppData\Local\Temp\_monacodata_9888\workspaces\mankala\Game.ts:336:9
|
||||
patterns.push(new RegExp(strings.escapeRegExpCharacters(workspaceRoot) + '([^:\\s\\(\\)<>\'\"\\[\\]]*)(:(\\d+))?(:(\\d+))?', 'gi'));
|
||||
});
|
||||
|
||||
return patterns;
|
||||
}
|
||||
|
||||
/**
|
||||
* Detect links. Made public static to allow for tests.
|
||||
*/
|
||||
public static detectLinks(line: string, lineIndex: number, patterns: RegExp[], contextService: IWorkspaceContextService): ILink[] {
|
||||
let links: ILink[] = [];
|
||||
|
||||
patterns.forEach((pattern) => {
|
||||
pattern.lastIndex = 0; // the holy grail of software development
|
||||
|
||||
let match: RegExpExecArray;
|
||||
let offset = 0;
|
||||
while ((match = pattern.exec(line)) !== null) {
|
||||
|
||||
// Convert the relative path information to a resource that we can use in links
|
||||
let workspaceRelativePath = strings.replaceAll(strings.rtrim(match[1], '.'), '\\', '/'); // remove trailing "." that likely indicate end of sentence
|
||||
let resource:string;
|
||||
try {
|
||||
resource = contextService.toResource(workspaceRelativePath).toString();
|
||||
} catch (error) {
|
||||
continue; // we might find an invalid URI and then we dont want to loose all other links
|
||||
}
|
||||
|
||||
// Append line/col information to URI if matching
|
||||
if (match[3]) {
|
||||
let lineNumber = match[3];
|
||||
|
||||
if (match[5]) {
|
||||
let columnNumber = match[5];
|
||||
resource = strings.format('{0}#{1},{2}', resource, lineNumber, columnNumber);
|
||||
} else {
|
||||
resource = strings.format('{0}#{1}', resource, lineNumber);
|
||||
}
|
||||
}
|
||||
|
||||
let fullMatch = strings.rtrim(match[0], '.'); // remove trailing "." that likely indicate end of sentence
|
||||
|
||||
let index = line.indexOf(fullMatch, offset);
|
||||
offset += index + fullMatch.length;
|
||||
|
||||
var linkRange = {
|
||||
startColumn: index + 1,
|
||||
startLineNumber: lineIndex,
|
||||
endColumn: index + 1 + fullMatch.length,
|
||||
endLineNumber: lineIndex
|
||||
};
|
||||
|
||||
if (links.some((link) => Range.areIntersectingOrTouching(link.range, linkRange))) {
|
||||
return; // Do not detect duplicate links
|
||||
}
|
||||
|
||||
links.push({
|
||||
range: linkRange,
|
||||
url: resource
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return links;
|
||||
}
|
||||
}
|
||||
+62
-62
@@ -9,7 +9,7 @@ import * as assert from 'assert';
|
||||
import {replaceAll} from 'vs/base/common/strings';
|
||||
import URI from 'vs/base/common/uri';
|
||||
import {isMacintosh, isLinux} from 'vs/base/common/platform';
|
||||
import {TextEditorWorker} from 'vs/workbench/common/textEditorWorker';
|
||||
import {OutputWorker} from 'vs/workbench/parts/output/common/outputWorker';
|
||||
import {TestContextService} from 'vs/workbench/test/browser/servicesTestUtils';
|
||||
|
||||
function toOSPath(p: string): string {
|
||||
@@ -20,10 +20,10 @@ function toOSPath(p: string): string {
|
||||
return p;
|
||||
}
|
||||
|
||||
suite('Workbench - TextEditorWorker', () => {
|
||||
suite('Workbench - OutputWorker', () => {
|
||||
|
||||
test('TextEditorWorker - Link detection', function() {
|
||||
let patternsSlash = TextEditorWorker.createPatterns({
|
||||
test('OutputWorker - Link detection', function() {
|
||||
let patternsSlash = OutputWorker.createPatterns({
|
||||
id: 'foo',
|
||||
name: 'foo',
|
||||
resource: URI.file('C:/Users/someone/AppData/Local/Temp/_monacodata_9888/workspaces/mankala'),
|
||||
@@ -31,7 +31,7 @@ suite('Workbench - TextEditorWorker', () => {
|
||||
mtime: 0
|
||||
});
|
||||
|
||||
let patternsBackSlash = TextEditorWorker.createPatterns({
|
||||
let patternsBackSlash = OutputWorker.createPatterns({
|
||||
id: 'foo',
|
||||
name: 'foo',
|
||||
resource: URI.file('C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala'),
|
||||
@@ -42,21 +42,21 @@ suite('Workbench - TextEditorWorker', () => {
|
||||
let contextService = new TestContextService();
|
||||
|
||||
let line = toOSPath('Foo bar');
|
||||
let result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
let result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 0);
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 0);
|
||||
|
||||
// Example: at C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts
|
||||
line = toOSPath(' at C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts in');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString());
|
||||
assert.equal(result[0].range.startColumn, 5);
|
||||
assert.equal(result[0].range.endColumn, 84);
|
||||
|
||||
line = toOSPath(' at C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts in');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString());
|
||||
assert.equal(result[0].range.startColumn, 5);
|
||||
@@ -64,14 +64,14 @@ suite('Workbench - TextEditorWorker', () => {
|
||||
|
||||
// Example: at C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts:336
|
||||
line = toOSPath(' at C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts:336 in');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString() + '#336');
|
||||
assert.equal(result[0].range.startColumn, 5);
|
||||
assert.equal(result[0].range.endColumn, 88);
|
||||
|
||||
line = toOSPath(' at C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts:336 in');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString() + '#336');
|
||||
assert.equal(result[0].range.startColumn, 5);
|
||||
@@ -79,26 +79,26 @@ suite('Workbench - TextEditorWorker', () => {
|
||||
|
||||
// Example: at C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts:336:9
|
||||
line = toOSPath(' at C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts:336:9 in');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString() + '#336,9');
|
||||
assert.equal(result[0].range.startColumn, 5);
|
||||
assert.equal(result[0].range.endColumn, 90);
|
||||
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString() + '#336,9');
|
||||
assert.equal(result[0].range.startColumn, 5);
|
||||
assert.equal(result[0].range.endColumn, 90);
|
||||
|
||||
line = toOSPath(' at C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts:336:9 in');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString() + '#336,9');
|
||||
assert.equal(result[0].range.startColumn, 5);
|
||||
assert.equal(result[0].range.endColumn, 90);
|
||||
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString() + '#336,9');
|
||||
assert.equal(result[0].range.startColumn, 5);
|
||||
@@ -106,7 +106,7 @@ suite('Workbench - TextEditorWorker', () => {
|
||||
|
||||
// Example: at C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts>dir
|
||||
line = toOSPath(' at C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts>dir in');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString());
|
||||
assert.equal(result[0].range.startColumn, 5);
|
||||
@@ -114,7 +114,7 @@ suite('Workbench - TextEditorWorker', () => {
|
||||
|
||||
// Example: at [C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts:336:9]
|
||||
line = toOSPath(' at C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts:336:9] in');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString() + '#336,9');
|
||||
assert.equal(result[0].range.startColumn, 5);
|
||||
@@ -122,19 +122,19 @@ suite('Workbench - TextEditorWorker', () => {
|
||||
|
||||
// Example: at [C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts]
|
||||
line = toOSPath(' at C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts] in');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString());
|
||||
|
||||
// Example: C:\Users\someone\AppData\Local\Temp\_monacodata_9888\workspaces\express\server.js on line 8
|
||||
line = toOSPath('C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts on line 8');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString() + '#8');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
assert.equal(result[0].range.endColumn, 90);
|
||||
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString() + '#8');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
@@ -142,26 +142,26 @@ suite('Workbench - TextEditorWorker', () => {
|
||||
|
||||
// Example: C:\Users\someone\AppData\Local\Temp\_monacodata_9888\workspaces\express\server.js on line 8, column 13
|
||||
line = toOSPath('C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts on line 8, column 13');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString() + '#8,13');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
assert.equal(result[0].range.endColumn, 101);
|
||||
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString() + '#8,13');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
assert.equal(result[0].range.endColumn, 101);
|
||||
|
||||
line = toOSPath('C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts on LINE 8, COLUMN 13');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString() + '#8,13');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
assert.equal(result[0].range.endColumn, 101);
|
||||
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString() + '#8,13');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
@@ -169,7 +169,7 @@ suite('Workbench - TextEditorWorker', () => {
|
||||
|
||||
// Example: C:\Users\someone\AppData\Local\Temp\_monacodata_9888\workspaces\express\server.js:line 8
|
||||
line = toOSPath('C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts:line 8');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString() + '#8');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
@@ -177,13 +177,13 @@ suite('Workbench - TextEditorWorker', () => {
|
||||
|
||||
// Example: at File.put (C:/Users/someone/AppData/Local/Temp/_monacodata_9888/workspaces/mankala/Game.ts)
|
||||
line = toOSPath(' at File.put (C:/Users/someone/AppData/Local/Temp/_monacodata_9888/workspaces/mankala/Game.ts)');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString());
|
||||
assert.equal(result[0].range.startColumn, 15);
|
||||
assert.equal(result[0].range.endColumn, 94);
|
||||
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString());
|
||||
assert.equal(result[0].range.startColumn, 15);
|
||||
@@ -191,13 +191,13 @@ suite('Workbench - TextEditorWorker', () => {
|
||||
|
||||
// Example: at File.put (C:/Users/someone/AppData/Local/Temp/_monacodata_9888/workspaces/mankala/Game.ts:278)
|
||||
line = toOSPath(' at File.put (C:/Users/someone/AppData/Local/Temp/_monacodata_9888/workspaces/mankala/Game.ts:278)');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString() + '#278');
|
||||
assert.equal(result[0].range.startColumn, 15);
|
||||
assert.equal(result[0].range.endColumn, 98);
|
||||
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString() + '#278');
|
||||
assert.equal(result[0].range.startColumn, 15);
|
||||
@@ -205,26 +205,26 @@ suite('Workbench - TextEditorWorker', () => {
|
||||
|
||||
// Example: at File.put (C:/Users/someone/AppData/Local/Temp/_monacodata_9888/workspaces/mankala/Game.ts:278:34)
|
||||
line = toOSPath(' at File.put (C:/Users/someone/AppData/Local/Temp/_monacodata_9888/workspaces/mankala/Game.ts:278:34)');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString() + '#278,34');
|
||||
assert.equal(result[0].range.startColumn, 15);
|
||||
assert.equal(result[0].range.endColumn, 101);
|
||||
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString() + '#278,34');
|
||||
assert.equal(result[0].range.startColumn, 15);
|
||||
assert.equal(result[0].range.endColumn, 101);
|
||||
|
||||
line = toOSPath(' at File.put (C:/Users/someone/AppData/Local/Temp/_monacodata_9888/workspaces/mankala/Game.ts:278:34)');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString() + '#278,34');
|
||||
assert.equal(result[0].range.startColumn, 15);
|
||||
assert.equal(result[0].range.endColumn, 101);
|
||||
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString() + '#278,34');
|
||||
assert.equal(result[0].range.startColumn, 15);
|
||||
@@ -232,13 +232,13 @@ suite('Workbench - TextEditorWorker', () => {
|
||||
|
||||
// Example: C:/Users/someone/AppData/Local/Temp/_monacodata_9888/workspaces/mankala/Features.ts(45): error
|
||||
line = toOSPath('C:/Users/someone/AppData/Local/Temp/_monacodata_9888/workspaces/mankala/lib/something/Features.ts(45): error');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
assert.equal(result[0].range.endColumn, 102);
|
||||
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
@@ -246,13 +246,13 @@ suite('Workbench - TextEditorWorker', () => {
|
||||
|
||||
// Example: C:/Users/someone/AppData/Local/Temp/_monacodata_9888/workspaces/mankala/Features.ts (45,18): error
|
||||
line = toOSPath('C:/Users/someone/AppData/Local/Temp/_monacodata_9888/workspaces/mankala/lib/something/Features.ts (45): error');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
assert.equal(result[0].range.endColumn, 103);
|
||||
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
@@ -260,26 +260,26 @@ suite('Workbench - TextEditorWorker', () => {
|
||||
|
||||
// Example: C:/Users/someone/AppData/Local/Temp/_monacodata_9888/workspaces/mankala/Features.ts(45,18): error
|
||||
line = toOSPath('C:/Users/someone/AppData/Local/Temp/_monacodata_9888/workspaces/mankala/lib/something/Features.ts(45,18): error');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45,18');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
assert.equal(result[0].range.endColumn, 105);
|
||||
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45,18');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
assert.equal(result[0].range.endColumn, 105);
|
||||
|
||||
line = toOSPath('C:/Users/someone/AppData/Local/Temp/_monacodata_9888/workspaces/mankala/lib/something/Features.ts(45,18): error');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45,18');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
assert.equal(result[0].range.endColumn, 105);
|
||||
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45,18');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
@@ -287,26 +287,26 @@ suite('Workbench - TextEditorWorker', () => {
|
||||
|
||||
// Example: C:/Users/someone/AppData/Local/Temp/_monacodata_9888/workspaces/mankala/Features.ts (45,18): error
|
||||
line = toOSPath('C:/Users/someone/AppData/Local/Temp/_monacodata_9888/workspaces/mankala/lib/something/Features.ts (45,18): error');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45,18');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
assert.equal(result[0].range.endColumn, 106);
|
||||
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45,18');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
assert.equal(result[0].range.endColumn, 106);
|
||||
|
||||
line = toOSPath('C:/Users/someone/AppData/Local/Temp/_monacodata_9888/workspaces/mankala/lib/something/Features.ts (45,18): error');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45,18');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
assert.equal(result[0].range.endColumn, 106);
|
||||
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45,18');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
@@ -314,13 +314,13 @@ suite('Workbench - TextEditorWorker', () => {
|
||||
|
||||
// Example: C:/Users/someone/AppData/Local/Temp/_monacodata_9888/workspaces/mankala/Features.ts(45): error
|
||||
line = toOSPath('C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\lib\\something\\Features.ts(45): error');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
assert.equal(result[0].range.endColumn, 102);
|
||||
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
@@ -328,13 +328,13 @@ suite('Workbench - TextEditorWorker', () => {
|
||||
|
||||
// Example: C:/Users/someone/AppData/Local/Temp/_monacodata_9888/workspaces/mankala/Features.ts (45,18): error
|
||||
line = toOSPath('C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\lib\\something\\Features.ts (45): error');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
assert.equal(result[0].range.endColumn, 103);
|
||||
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
@@ -342,26 +342,26 @@ suite('Workbench - TextEditorWorker', () => {
|
||||
|
||||
// Example: C:/Users/someone/AppData/Local/Temp/_monacodata_9888/workspaces/mankala/Features.ts(45,18): error
|
||||
line = toOSPath('C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\lib\\something\\Features.ts(45,18): error');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45,18');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
assert.equal(result[0].range.endColumn, 105);
|
||||
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45,18');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
assert.equal(result[0].range.endColumn, 105);
|
||||
|
||||
line = toOSPath('C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\lib\\something\\Features.ts(45,18): error');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45,18');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
assert.equal(result[0].range.endColumn, 105);
|
||||
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45,18');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
@@ -369,26 +369,26 @@ suite('Workbench - TextEditorWorker', () => {
|
||||
|
||||
// Example: C:/Users/someone/AppData/Local/Temp/_monacodata_9888/workspaces/mankala/Features.ts (45,18): error
|
||||
line = toOSPath('C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\lib\\something\\Features.ts (45,18): error');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45,18');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
assert.equal(result[0].range.endColumn, 106);
|
||||
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45,18');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
assert.equal(result[0].range.endColumn, 106);
|
||||
|
||||
line = toOSPath('C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\lib\\something\\Features.ts (45,18): error');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45,18');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
assert.equal(result[0].range.endColumn, 106);
|
||||
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsBackSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/lib/something/Features.ts').toString() + '#45,18');
|
||||
assert.equal(result[0].range.startColumn, 1);
|
||||
@@ -396,7 +396,7 @@ suite('Workbench - TextEditorWorker', () => {
|
||||
|
||||
// Example: at C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts.
|
||||
line = toOSPath(' at C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts. in');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString());
|
||||
assert.equal(result[0].range.startColumn, 5);
|
||||
@@ -404,17 +404,17 @@ suite('Workbench - TextEditorWorker', () => {
|
||||
|
||||
// Example: at C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game
|
||||
line = toOSPath(' at C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game in');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
|
||||
// Example: at C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game\\
|
||||
line = toOSPath(' at C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game\\ in');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
|
||||
// Example: at "C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts"
|
||||
line = toOSPath(' at "C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts" in');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString());
|
||||
assert.equal(result[0].range.startColumn, 6);
|
||||
@@ -422,7 +422,7 @@ suite('Workbench - TextEditorWorker', () => {
|
||||
|
||||
// Example: at 'C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts'
|
||||
line = toOSPath(' at \'C:\\Users\\someone\\AppData\\Local\\Temp\\_monacodata_9888\\workspaces\\mankala\\Game.ts\' in');
|
||||
result = TextEditorWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
result = OutputWorker.detectLinks(line, 1, patternsSlash, contextService);
|
||||
assert.equal(result.length, 1);
|
||||
assert.equal(result[0].url, contextService.toResource('/Game.ts').toString());
|
||||
assert.equal(result[0].range.startColumn, 6);
|
||||
Reference in New Issue
Block a user