Removes git-blame document scheme

Removes git-blame content provider
Fixes some CodeLens issues
Adds support for git uris in more places
Adds git content CodeLens provider
This commit is contained in:
Eric Amodio
2016-11-12 03:11:22 -05:00
parent 638a6dc838
commit a3895d27ab
12 changed files with 146 additions and 293 deletions

View File

@@ -2,22 +2,21 @@
import { ExtensionContext, extensions, languages, window, workspace } from 'vscode';
import BlameAnnotationController from './blameAnnotationController';
import BlameStatusBarController from './blameStatusBarController';
import GitContentProvider from './gitContentProvider';
import GitBlameCodeLensProvider from './gitBlameCodeLensProvider';
import GitBlameContentProvider from './gitBlameContentProvider';
import GitProvider, { Git } from './gitProvider';
import { WorkspaceState } from './constants';
import { IAdvancedConfig } from './configuration';
import { Logger } from './logger';
import DiffWithPreviousCommand from './commands/diffWithPrevious';
import DiffLineWithPreviousCommand from './commands/diffLineWithPrevious';
import DiffWithWorkingCommand from './commands/diffWithWorking';
import DiffLineWithWorkingCommand from './commands/diffLineWithWorking';
import DiffWithPreviousCommand from './commands/diffWithPrevious';
import DiffWithWorkingCommand from './commands/diffWithWorking';
import ShowBlameCommand from './commands/showBlame';
import ShowBlameHistoryCommand from './commands/showBlameHistory';
import ShowFileHistoryCommand from './commands/showFileHistory';
import ToggleBlameCommand from './commands/toggleBlame';
import ToggleCodeLensCommand from './commands/toggleCodeLens';
import { IAdvancedConfig } from './configuration';
import { WorkspaceState } from './constants';
import GitContentProvider from './gitContentProvider';
import GitProvider, { Git } from './gitProvider';
import GitRevisionCodeLensProvider from './gitRevisionCodeLensProvider';
import { Logger } from './logger';
// this method is called when your extension is activated
export async function activate(context: ExtensionContext) {
@@ -50,9 +49,8 @@ export async function activate(context: ExtensionContext) {
context.subscriptions.push(git);
context.subscriptions.push(workspace.registerTextDocumentContentProvider(GitContentProvider.scheme, new GitContentProvider(context, git)));
context.subscriptions.push(workspace.registerTextDocumentContentProvider(GitBlameContentProvider.scheme, new GitBlameContentProvider(context, git)));
context.subscriptions.push(languages.registerCodeLensProvider(GitBlameCodeLensProvider.selector, new GitBlameCodeLensProvider(context, git)));
context.subscriptions.push(languages.registerCodeLensProvider(GitRevisionCodeLensProvider.selector, new GitRevisionCodeLensProvider(context, git)));
const annotationController = new BlameAnnotationController(context, git);
context.subscriptions.push(annotationController);