Skip to content

Commit

Permalink
formatting changes according to PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
filipw committed Oct 2, 2017
1 parent 6f1b4e2 commit 95e4d45
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/features/definitionMetadataDocumentProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ export default class DefinitionMetadataDocumentProvider implements TextDocumentC
return uri;
}

public getExistingMetadataResponseUri(sourceName:string) : Uri {
public getExistingMetadataResponseUri(sourceName: string) : Uri {
return this.createUri(sourceName);
}

public register() : void {
this._registration = workspace.registerTextDocumentContentProvider(this.scheme, this);
}

public provideTextDocumentContent(uri : Uri) : string {
public provideTextDocumentContent(uri: Uri) : string {
return this._documents.get(uri.toString()).Source;
}

private createUri(sourceName:string) : Uri {
private createUri(sourceName: string) : Uri {
return Uri.parse(this.scheme + "://" +
sourceName.replace(/\\/g, "/").replace(/(.*)\/(.*)/g, "$1/[metadata] $2"));
}
Expand Down
2 changes: 1 addition & 1 deletion src/features/definitionProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default class CSharpDefinitionProvider extends AbstractSupport implements

// if it is part of an already used metadata file, retrieve its uri instead of going to the physical file
if (gotoDefinitionResponse.FileName.startsWith("$metadata$")) {
let uri = this._definitionMetadataDocumentProvider.getExistingMetadataResponseUri(gotoDefinitionResponse.FileName);
const uri = this._definitionMetadataDocumentProvider.getExistingMetadataResponseUri(gotoDefinitionResponse.FileName);
return toLocationFromUri(uri, gotoDefinitionResponse);
}

Expand Down
2 changes: 1 addition & 1 deletion src/omnisharp/typeConvertion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function toLocation(location: protocol.ResourceLocation | protocol.QuickF
return toLocationFromUri(fileName, location);
}

export function toLocationFromUri(uri:vscode.Uri, location: protocol.ResourceLocation | protocol.QuickFix): vscode.Location {
export function toLocationFromUri(uri: vscode.Uri, location: protocol.ResourceLocation | protocol.QuickFix): vscode.Location {
const position = new vscode.Position(location.Line - 1, location.Column - 1);

const endLine = (<protocol.QuickFix>location).EndLine;
Expand Down

0 comments on commit 95e4d45

Please sign in to comment.