Add test for find references

This commit is contained in:
Mohamed Hegazy
2015-02-14 21:49:10 -08:00
parent 9867e062a2
commit 11e246036b
4 changed files with 23 additions and 1 deletions

View File

@@ -301,7 +301,7 @@ module ts.server {
return {
fileName: entry.file,
textSpan: ts.createTextSpanFromBounds(start, end),
isWriteAccess: false,
isWriteAccess: entry.isWriteAccess,
};
});
}

View File

@@ -409,6 +409,7 @@ module ts.server {
start: start,
lineText: lineText,
end: compilerService.host.positionToLineCol(ref.fileName, ts.textSpanEnd(ref.textSpan)),
isWriteAccess: ref.isWriteAccess
};
}).sort(compareFileStart);
return {

View File

@@ -127,6 +127,9 @@ declare module ServerProtocol {
loaded the referencing files).
*/
lineText: string;
/** True if reference is a write location, false otherwise. */
isWriteAccess: boolean;
}
/** The body of a "references" response message. */