Просмотр исходного кода

Adds whitespace style changes

main
Eric Amodio 7 лет назад
Родитель
Сommit
2b907788dd
27 измененных файлов: 37 добавлений и 0 удалений
  1. +1
    -0
      src/blameAnnotationController.ts
  2. +1
    -0
      src/blameAnnotationProvider.ts
  3. +1
    -0
      src/blameStatusBarController.ts
  4. +1
    -0
      src/commands/commands.ts
  5. +1
    -0
      src/commands/diffLineWithPrevious.ts
  6. +1
    -0
      src/commands/diffLineWithWorking.ts
  7. +1
    -0
      src/commands/diffWithPrevious.ts
  8. +1
    -0
      src/commands/diffWithWorking.ts
  9. +3
    -0
      src/commands/quickPickItems.ts
  10. +1
    -0
      src/commands/showBlame.ts
  11. +1
    -0
      src/commands/showBlameHistory.ts
  12. +1
    -0
      src/commands/showFileHistory.ts
  13. +1
    -0
      src/commands/showQuickFileHistory.ts
  14. +1
    -0
      src/commands/showQuickRepoHistory.ts
  15. +1
    -0
      src/commands/toggleBlame.ts
  16. +1
    -0
      src/commands/toggleCodeLens.ts
  17. +3
    -0
      src/comparers.ts
  18. +1
    -0
      src/git/enrichers/blameParserEnricher.ts
  19. +1
    -0
      src/git/enrichers/logParserEnricher.ts
  20. +1
    -0
      src/git/git.ts
  21. +1
    -0
      src/git/gitEnrichment.ts
  22. +1
    -0
      src/git/gitUri.ts
  23. +3
    -0
      src/gitCodeLensProvider.ts
  24. +1
    -0
      src/gitContentProvider.ts
  25. +3
    -0
      src/gitProvider.ts
  26. +3
    -0
      src/gitRevisionCodeLensProvider.ts
  27. +1
    -0
      src/logger.ts

+ 1
- 0
src/blameAnnotationController.ts Просмотреть файл

@ -8,6 +8,7 @@ import GitProvider from './gitProvider';
import { Logger } from './logger';
export default class BlameAnnotationController extends Disposable {
private _annotationProviders: Map<number, BlameAnnotationProvider> = new Map();
private _blameAnnotationsDisposable: Disposable;
private _pendingWhitespaceToggleDisposable: Disposable;

+ 1
- 0
src/blameAnnotationProvider.ts Просмотреть файл

@ -17,6 +17,7 @@ const blameDecoration: TextEditorDecorationType = window.createTextEditorDecorat
let highlightDecoration: TextEditorDecorationType;
export class BlameAnnotationProvider extends Disposable {
public document: TextDocument;
public requiresRenderWhitespaceToggle: boolean = false;

+ 1
- 0
src/blameStatusBarController.ts Просмотреть файл

@ -8,6 +8,7 @@ import { Logger } from './logger';
import * as moment from 'moment';
export default class BlameStatusBarController extends Disposable {
private _blame: Promise<IGitBlame> | undefined;
private _config: IConfig;
private _disposable: Disposable;

+ 1
- 0
src/commands/commands.ts Просмотреть файл

@ -3,6 +3,7 @@ import { commands, Disposable, TextEditor, TextEditorEdit } from 'vscode';
import { Commands } from '../constants';
export abstract class Command extends Disposable {
private _disposable: Disposable;
constructor(command: Commands) {

+ 1
- 0
src/commands/diffLineWithPrevious.ts Просмотреть файл

@ -6,6 +6,7 @@ import GitProvider, { GitCommit, GitUri } from '../gitProvider';
import { Logger } from '../logger';
export default class DiffLineWithPreviousCommand extends EditorCommand {
constructor(private git: GitProvider) {
super(Commands.DiffLineWithPrevious);
}

+ 1
- 0
src/commands/diffLineWithWorking.ts Просмотреть файл

@ -6,6 +6,7 @@ import GitProvider, { GitCommit, GitUri } from '../gitProvider';
import { Logger } from '../logger';
export default class DiffLineWithWorkingCommand extends EditorCommand {
constructor(private git: GitProvider) {
super(Commands.DiffLineWithWorking);
}

+ 1
- 0
src/commands/diffWithPrevious.ts Просмотреть файл

@ -9,6 +9,7 @@ import * as moment from 'moment';
import * as path from 'path';
export default class DiffWithPreviousCommand extends EditorCommand {
constructor(private git: GitProvider) {
super(Commands.DiffWithPrevious);
}

+ 1
- 0
src/commands/diffWithWorking.ts Просмотреть файл

@ -8,6 +8,7 @@ import { Logger } from '../logger';
import * as path from 'path';
export default class DiffWithWorkingCommand extends EditorCommand {
constructor(private git: GitProvider) {
super(Commands.DiffWithWorking);
}

+ 3
- 0
src/commands/quickPickItems.ts Просмотреть файл

@ -6,6 +6,7 @@ import * as moment from 'moment';
import * as path from 'path';
export class CommitQuickPickItem implements QuickPickItem {
label: string;
description: string;
detail: string;
@ -22,6 +23,7 @@ export interface CompareQuickPickItem extends QuickPickItem {
}
export class FileQuickPickItem implements QuickPickItem {
label: string;
description: string;
detail: string;
@ -34,6 +36,7 @@ export class FileQuickPickItem implements QuickPickItem {
}
export class ShowAllCommitsQuickPickItem implements QuickPickItem {
label: string;
description: string;
detail: string;

+ 1
- 0
src/commands/showBlame.ts Просмотреть файл

@ -6,6 +6,7 @@ import { Commands } from '../constants';
import { Logger } from '../logger';
export default class ShowBlameCommand extends EditorCommand {
constructor(private annotationController: BlameAnnotationController) {
super(Commands.ShowBlame);
}

+ 1
- 0
src/commands/showBlameHistory.ts Просмотреть файл

@ -6,6 +6,7 @@ import GitProvider, { GitUri } from '../gitProvider';
import { Logger } from '../logger';
export default class ShowBlameHistoryCommand extends EditorCommand {
constructor(private git: GitProvider) {
super(Commands.ShowBlameHistory);
}

+ 1
- 0
src/commands/showFileHistory.ts Просмотреть файл

@ -6,6 +6,7 @@ import GitProvider, { GitUri } from '../gitProvider';
import { Logger } from '../logger';
export default class ShowFileHistoryCommand extends EditorCommand {
constructor(private git: GitProvider) {
super(Commands.ShowFileHistory);
}

+ 1
- 0
src/commands/showQuickFileHistory.ts Просмотреть файл

@ -9,6 +9,7 @@ import { CommitQuickPickItem, CompareQuickPickItem, ShowAllCommitsQuickPickItem
import * as moment from 'moment';
export default class ShowQuickFileHistoryCommand extends EditorCommand {
constructor(private git: GitProvider) {
super(Commands.ShowQuickFileHistory);
}

+ 1
- 0
src/commands/showQuickRepoHistory.ts Просмотреть файл

@ -9,6 +9,7 @@ import { CommitQuickPickItem, CompareQuickPickItem, FileQuickPickItem, ShowAllCo
import * as moment from 'moment';
export default class ShowQuickRepoHistoryCommand extends Command {
constructor(private git: GitProvider, public repoPath: string) {
super(Commands.ShowQuickRepoHistory);
}

+ 1
- 0
src/commands/toggleBlame.ts Просмотреть файл

@ -6,6 +6,7 @@ import { Commands } from '../constants';
import { Logger } from '../logger';
export default class ToggleBlameCommand extends EditorCommand {
constructor(private annotationController: BlameAnnotationController) {
super(Commands.ToggleBlame);
}

+ 1
- 0
src/commands/toggleCodeLens.ts Просмотреть файл

@ -5,6 +5,7 @@ import { Commands } from '../constants';
import GitProvider from '../gitProvider';
export default class ToggleCodeLensCommand extends EditorCommand {
constructor(private git: GitProvider) {
super(Commands.ToggleCodeLens);
}

+ 3
- 0
src/comparers.ts Просмотреть файл

@ -6,6 +6,7 @@ abstract class Comparer {
}
class UriComparer extends Comparer<Uri> {
equals(lhs: Uri, rhs: Uri) {
if (!lhs && !rhs) return true;
if ((lhs && !rhs) || (!lhs && rhs)) return false;
@ -15,6 +16,7 @@ class UriComparer extends Comparer {
}
class TextDocumentComparer extends Comparer<TextDocument> {
equals(lhs: TextDocument, rhs: TextDocument) {
if (!lhs && !rhs) return true;
if ((lhs && !rhs) || (!lhs && rhs)) return false;
@ -24,6 +26,7 @@ class TextDocumentComparer extends Comparer {
}
class TextEditorComparer extends Comparer<TextEditor> {
equals(lhs: TextEditor, rhs: TextEditor) {
if (!lhs && !rhs) return true;
if ((lhs && !rhs) || (!lhs && rhs)) return false;

+ 1
- 0
src/git/enrichers/blameParserEnricher.ts Просмотреть файл

@ -28,6 +28,7 @@ interface IBlameEntry {
}
export class GitBlameParserEnricher implements IGitEnricher<IGitBlame> {
constructor(public format: GitBlameFormat) {
if (format !== GitBlameFormat.incremental) {
throw new Error(`Invalid blame format=${format}`);

+ 1
- 0
src/git/enrichers/logParserEnricher.ts Просмотреть файл

@ -19,6 +19,7 @@ interface ILogEntry {
}
export class GitLogParserEnricher implements IGitEnricher<IGitLog> {
private _parseEntries(data: string, isRepoPath: boolean): ILogEntry[] {
if (!data) return undefined;

+ 1
- 0
src/git/git.ts Просмотреть файл

@ -41,6 +41,7 @@ export const GitBlameFormat = {
};
export default class Git {
static normalizePath(fileName: string, repoPath?: string) {
return fileName.replace(/\\/g, '/');
}

+ 1
- 0
src/git/gitEnrichment.ts Просмотреть файл

@ -53,6 +53,7 @@ interface IGitCommit {
}
export class GitCommit implements IGitCommit {
lines: IGitCommitLine[];
originalFileName?: string;
previousSha?: string;

+ 1
- 0
src/git/gitUri.ts Просмотреть файл

@ -4,6 +4,7 @@ import { DocumentSchemes } from '../constants';
import GitProvider from '../gitProvider';
export class GitUri extends Uri {
offset: number;
repoPath?: string | undefined;
sha?: string | undefined;

+ 3
- 0
src/gitCodeLensProvider.ts Просмотреть файл

@ -8,6 +8,7 @@ import { Logger } from './logger';
import * as moment from 'moment';
export class GitRecentChangeCodeLens extends CodeLens {
constructor(private blame: () => IGitBlameLines, public uri: GitUri, public symbolKind: SymbolKind, public blameRange: Range, public isFullRange: boolean, range: Range) {
super(range);
}
@ -18,6 +19,7 @@ export class GitRecentChangeCodeLens extends CodeLens {
}
export class GitAuthorsCodeLens extends CodeLens {
constructor(private blame: () => IGitBlameLines, public uri: GitUri, public symbolKind: SymbolKind, public blameRange: Range, public isFullRange: boolean, range: Range) {
super(range);
}
@ -28,6 +30,7 @@ export class GitAuthorsCodeLens extends CodeLens {
}
export default class GitCodeLensProvider implements CodeLensProvider {
static selector: DocumentSelector = { scheme: DocumentSchemes.File };
private _config: IConfig;

+ 1
- 0
src/gitContentProvider.ts Просмотреть файл

@ -6,6 +6,7 @@ import { Logger } from './logger';
import * as path from 'path';
export default class GitContentProvider implements TextDocumentContentProvider {
static scheme = DocumentSchemes.Git;
constructor(context: ExtensionContext, private git: GitProvider) { }

+ 3
- 0
src/gitProvider.ts Просмотреть файл

@ -16,10 +16,12 @@ export { Git, GitUri };
export * from './git/git';
class UriCacheEntry {
constructor(public uri: GitUri) { }
}
class GitCacheEntry {
blame?: ICachedBlame;
log?: ICachedLog;
@ -44,6 +46,7 @@ enum RemoveCacheReason {
}
export default class GitProvider extends Disposable {
private _gitCache: Map<string, GitCacheEntry> | undefined;
private _cacheDisposable: Disposable | undefined;
private _repoPath: string;

+ 3
- 0
src/gitRevisionCodeLensProvider.ts Просмотреть файл

@ -5,18 +5,21 @@ import { Commands, DocumentSchemes } from './constants';
import GitProvider, { GitCommit, GitUri } from './gitProvider';
export class GitDiffWithWorkingCodeLens extends CodeLens {
constructor(git: GitProvider, public fileName: string, public commit: GitCommit, range: Range) {
super(range);
}
}
export class GitDiffWithPreviousCodeLens extends CodeLens {
constructor(git: GitProvider, public fileName: string, public commit: GitCommit, range: Range) {
super(range);
}
}
export default class GitRevisionCodeLensProvider implements CodeLensProvider {
static selector: DocumentSelector = { scheme: DocumentSchemes.Git };
constructor(context: ExtensionContext, private git: GitProvider) { }

+ 1
- 0
src/logger.ts Просмотреть файл

@ -25,6 +25,7 @@ function onConfigurationChange() {
}
export class Logger {
static log(message?: any, ...params: any[]): void {
if (config.debug) {
console.log('[GitLens]', message, ...params);

Загрузка…
Отмена
Сохранить