Adds error messages for failed operations

Adds showHistory command support to CodeLens
Fixes and improve the showHistory explorer
Refactoring
This commit is contained in:
Eric Amodio
2016-11-10 03:22:43 -05:00
parent 562afeaaad
commit f4410be30a
25 changed files with 584 additions and 305 deletions

View File

@@ -1,5 +1,5 @@
'use strict';
import { TextEditor, TextEditorEdit, Uri } from 'vscode';
import { TextEditor, TextEditorEdit, Uri, window } from 'vscode';
import BlameAnnotationController from '../blameAnnotationController';
import { EditorCommand } from './commands';
import { Commands } from '../constants';
@@ -23,10 +23,11 @@ export default class ToggleBlameCommand extends EditorCommand {
try {
const blame = await this.git.getBlameForLine(uri.fsPath, editor.selection.active.line);
this.annotationController.toggleBlameAnnotation(editor, blame && blame.commit.sha);
return this.annotationController.toggleBlameAnnotation(editor, blame && blame.commit.sha);
}
catch (ex) {
Logger.error('[GitLens.ToggleBlameCommand]', `getBlameForLine(${editor.selection.active.line})`, ex);
return window.showErrorMessage(`Unable to show blame annotations. See output channel for more details`);
}
}
}