Changes behaviors when file has unsaved changes:

- Status bar blame information will hide
  - CodeLens change to a `Cannot determine...` message and become unclickable
  - Many menu choices and commands will hide
Fixes #36 - Blame information is invalid when a file has unsaved changes
Fixed #38 - Toggle Blame Annotation button shows even when it isn't valid
Preps v2.9.0
This commit is contained in:
Eric Amodio
2017-03-03 03:32:31 -05:00
parent d389a7b588
commit 1519898dfa
14 changed files with 325 additions and 141 deletions

View File

@@ -1,5 +1,6 @@
'use strict';
import { commands, ExtensionContext, languages, window, workspace } from 'vscode';
import { BlameabilityTracker } from './blameabilityTracker';
import { BlameActiveLineController } from './blameActiveLineController';
import { BlameAnnotationController } from './blameAnnotationController';
import { configureCssCharacters } from './blameAnnotationFormatter';
@@ -63,14 +64,17 @@ export async function activate(context: ExtensionContext) {
const git = new GitProvider(context);
context.subscriptions.push(git);
const blameabilityTracker = new BlameabilityTracker(git);
context.subscriptions.push(blameabilityTracker);
context.subscriptions.push(workspace.registerTextDocumentContentProvider(GitContentProvider.scheme, new GitContentProvider(context, git)));
context.subscriptions.push(languages.registerCodeLensProvider(GitRevisionCodeLensProvider.selector, new GitRevisionCodeLensProvider(context, git)));
const annotationController = new BlameAnnotationController(context, git);
const annotationController = new BlameAnnotationController(context, git, blameabilityTracker);
context.subscriptions.push(annotationController);
const activeLineController = new BlameActiveLineController(context, git, annotationController);
const activeLineController = new BlameActiveLineController(context, git, blameabilityTracker, annotationController);
context.subscriptions.push(activeLineController);
context.subscriptions.push(new Keyboard(context));