From dfd0f8c365168e073b5d53453df0ba8360d69892 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Wed, 1 Mar 2017 01:13:53 -0500 Subject: [PATCH] Refactors command & quickpick imports --- src/commands.ts | 86 +++++++--------------------------- src/commands/commands.ts | 71 ++++++++++++++++++++++++++++ src/commands/copyMessageToClipboard.ts | 4 +- src/commands/copyShaToClipboard.ts | 4 +- src/commands/diffLineWithPrevious.ts | 4 +- src/commands/diffLineWithWorking.ts | 4 +- src/commands/diffWithPrevious.ts | 4 +- src/commands/diffWithWorking.ts | 4 +- src/commands/showBlame.ts | 4 +- src/commands/showBlameHistory.ts | 4 +- src/commands/showFileHistory.ts | 4 +- src/commands/showQuickCommitDetails.ts | 8 ++-- src/commands/showQuickFileHistory.ts | 6 +-- src/commands/showQuickRepoHistory.ts | 6 +-- src/commands/showQuickRepoStatus.ts | 6 +-- src/commands/toggleBlame.ts | 4 +- src/commands/toggleCodeLens.ts | 4 +- src/extension.ts | 21 +++------ src/quickPicks.ts | 7 +++ 19 files changed, 135 insertions(+), 120 deletions(-) create mode 100644 src/commands/commands.ts create mode 100644 src/quickPicks.ts diff --git a/src/commands.ts b/src/commands.ts index 74fc603..6fc7e2c 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -1,71 +1,17 @@ 'use strict'; -import { commands, Disposable, TextEditor, TextEditorEdit, window } from 'vscode'; - -export type Commands = 'gitlens.copyMessageToClipboard' | 'gitlens.copyShaToClipboard' | 'gitlens.diffWithPrevious' | 'gitlens.diffLineWithPrevious' | 'gitlens.diffWithWorking' | 'gitlens.diffLineWithWorking' | 'gitlens.showBlame' | 'gitlens.showBlameHistory' | 'gitlens.showFileHistory' | 'gitlens.showQuickCommitDetails' | 'gitlens.showQuickFileHistory' | 'gitlens.showQuickRepoHistory' | 'gitlens.showQuickRepoStatus' | 'gitlens.toggleBlame' | 'gitlens.toggleCodeLens'; -export const Commands = { - CopyMessageToClipboard: 'gitlens.copyMessageToClipboard' as Commands, - CopyShaToClipboard: 'gitlens.copyShaToClipboard' as Commands, - DiffWithPrevious: 'gitlens.diffWithPrevious' as Commands, - DiffLineWithPrevious: 'gitlens.diffLineWithPrevious' as Commands, - DiffWithWorking: 'gitlens.diffWithWorking' as Commands, - DiffLineWithWorking: 'gitlens.diffLineWithWorking' as Commands, - ShowBlame: 'gitlens.showBlame' as Commands, - ShowBlameHistory: 'gitlens.showBlameHistory' as Commands, - ShowFileHistory: 'gitlens.showFileHistory' as Commands, - ShowQuickCommitDetails: 'gitlens.showQuickCommitDetails' as Commands, - ShowQuickFileHistory: 'gitlens.showQuickFileHistory' as Commands, - ShowQuickRepoHistory: 'gitlens.showQuickRepoHistory' as Commands, - ShowQuickRepoStatus: 'gitlens.showQuickRepoStatus' as Commands, - ToggleBlame: 'gitlens.toggleBlame' as Commands, - ToggleCodeLens: 'gitlens.toggleCodeLens' as Commands -}; - -export abstract class Command extends Disposable { - - private _disposable: Disposable; - - constructor(command: Commands) { - super(() => this.dispose()); - this._disposable = commands.registerCommand(command, this.execute, this); - } - - dispose() { - this._disposable && this._disposable.dispose(); - } - - abstract execute(...args: any[]): any; -} - -export abstract class EditorCommand extends Disposable { - private _disposable: Disposable; - - constructor(command: Commands) { - super(() => this.dispose()); - this._disposable = commands.registerTextEditorCommand(command, this.execute, this); - } - - dispose() { - this._disposable && this._disposable.dispose(); - } - - abstract execute(editor: TextEditor, edit: TextEditorEdit, ...args: any[]): any; -} - -export abstract class ActiveEditorCommand extends Disposable { - private _disposable: Disposable; - - constructor(command: Commands) { - super(() => this.dispose()); - this._disposable = commands.registerCommand(command, this._execute, this); - } - - dispose() { - this._disposable && this._disposable.dispose(); - } - - _execute(...args: any[]): any { - return this.execute(window.activeTextEditor, ...args); - } - - abstract execute(editor: TextEditor, ...args: any[]): any; -} \ No newline at end of file +export { ActiveEditorCommand, Command, Commands, EditorCommand } from './commands/commands'; +export { CopyMessageToClipboardCommand } from './commands/copyMessageToClipboard'; +export { CopyShaToClipboardCommand } from './commands/copyShaToClipboard'; +export { DiffLineWithPreviousCommand } from './commands/diffLineWithPrevious'; +export { DiffLineWithWorkingCommand } from './commands/diffLineWithWorking'; +export { DiffWithPreviousCommand } from './commands/diffWithPrevious'; +export { DiffWithWorkingCommand } from './commands/diffWithWorking'; +export { ShowBlameCommand } from './commands/showBlame'; +export { ShowBlameHistoryCommand } from './commands/showBlameHistory'; +export { ShowFileHistoryCommand } from './commands/showFileHistory'; +export { ShowQuickCommitDetailsCommand } from './commands/showQuickCommitDetails'; +export { ShowQuickFileHistoryCommand } from './commands/showQuickFileHistory'; +export { ShowQuickRepoHistoryCommand } from './commands/showQuickRepoHistory'; +export { ShowQuickRepoStatusCommand } from './commands/showQuickRepoStatus'; +export { ToggleBlameCommand } from './commands/toggleBlame'; +export { ToggleCodeLensCommand } from './commands/toggleCodeLens'; \ No newline at end of file diff --git a/src/commands/commands.ts b/src/commands/commands.ts new file mode 100644 index 0000000..74fc603 --- /dev/null +++ b/src/commands/commands.ts @@ -0,0 +1,71 @@ +'use strict'; +import { commands, Disposable, TextEditor, TextEditorEdit, window } from 'vscode'; + +export type Commands = 'gitlens.copyMessageToClipboard' | 'gitlens.copyShaToClipboard' | 'gitlens.diffWithPrevious' | 'gitlens.diffLineWithPrevious' | 'gitlens.diffWithWorking' | 'gitlens.diffLineWithWorking' | 'gitlens.showBlame' | 'gitlens.showBlameHistory' | 'gitlens.showFileHistory' | 'gitlens.showQuickCommitDetails' | 'gitlens.showQuickFileHistory' | 'gitlens.showQuickRepoHistory' | 'gitlens.showQuickRepoStatus' | 'gitlens.toggleBlame' | 'gitlens.toggleCodeLens'; +export const Commands = { + CopyMessageToClipboard: 'gitlens.copyMessageToClipboard' as Commands, + CopyShaToClipboard: 'gitlens.copyShaToClipboard' as Commands, + DiffWithPrevious: 'gitlens.diffWithPrevious' as Commands, + DiffLineWithPrevious: 'gitlens.diffLineWithPrevious' as Commands, + DiffWithWorking: 'gitlens.diffWithWorking' as Commands, + DiffLineWithWorking: 'gitlens.diffLineWithWorking' as Commands, + ShowBlame: 'gitlens.showBlame' as Commands, + ShowBlameHistory: 'gitlens.showBlameHistory' as Commands, + ShowFileHistory: 'gitlens.showFileHistory' as Commands, + ShowQuickCommitDetails: 'gitlens.showQuickCommitDetails' as Commands, + ShowQuickFileHistory: 'gitlens.showQuickFileHistory' as Commands, + ShowQuickRepoHistory: 'gitlens.showQuickRepoHistory' as Commands, + ShowQuickRepoStatus: 'gitlens.showQuickRepoStatus' as Commands, + ToggleBlame: 'gitlens.toggleBlame' as Commands, + ToggleCodeLens: 'gitlens.toggleCodeLens' as Commands +}; + +export abstract class Command extends Disposable { + + private _disposable: Disposable; + + constructor(command: Commands) { + super(() => this.dispose()); + this._disposable = commands.registerCommand(command, this.execute, this); + } + + dispose() { + this._disposable && this._disposable.dispose(); + } + + abstract execute(...args: any[]): any; +} + +export abstract class EditorCommand extends Disposable { + private _disposable: Disposable; + + constructor(command: Commands) { + super(() => this.dispose()); + this._disposable = commands.registerTextEditorCommand(command, this.execute, this); + } + + dispose() { + this._disposable && this._disposable.dispose(); + } + + abstract execute(editor: TextEditor, edit: TextEditorEdit, ...args: any[]): any; +} + +export abstract class ActiveEditorCommand extends Disposable { + private _disposable: Disposable; + + constructor(command: Commands) { + super(() => this.dispose()); + this._disposable = commands.registerCommand(command, this._execute, this); + } + + dispose() { + this._disposable && this._disposable.dispose(); + } + + _execute(...args: any[]): any { + return this.execute(window.activeTextEditor, ...args); + } + + abstract execute(editor: TextEditor, ...args: any[]): any; +} \ No newline at end of file diff --git a/src/commands/copyMessageToClipboard.ts b/src/commands/copyMessageToClipboard.ts index c6d540c..06a6efe 100644 --- a/src/commands/copyMessageToClipboard.ts +++ b/src/commands/copyMessageToClipboard.ts @@ -1,12 +1,12 @@ 'use strict'; import { Iterables } from '../system'; import { TextEditor, Uri, window } from 'vscode'; -import { ActiveEditorCommand, Commands } from '../commands'; +import { ActiveEditorCommand, Commands } from './commands'; import GitProvider, { GitUri } from '../gitProvider'; import { Logger } from '../logger'; import { copy } from 'copy-paste'; -export default class CopyMessageToClipboardCommand extends ActiveEditorCommand { +export class CopyMessageToClipboardCommand extends ActiveEditorCommand { constructor(private git: GitProvider, public repoPath: string) { super(Commands.CopyMessageToClipboard); diff --git a/src/commands/copyShaToClipboard.ts b/src/commands/copyShaToClipboard.ts index c309ead..ef212cb 100644 --- a/src/commands/copyShaToClipboard.ts +++ b/src/commands/copyShaToClipboard.ts @@ -1,12 +1,12 @@ 'use strict'; import { Iterables } from '../system'; import { TextEditor, Uri, window } from 'vscode'; -import { ActiveEditorCommand, Commands } from '../commands'; +import { ActiveEditorCommand, Commands } from './commands'; import GitProvider, { GitUri } from '../gitProvider'; import { Logger } from '../logger'; import { copy } from 'copy-paste'; -export default class CopyShaToClipboardCommand extends ActiveEditorCommand { +export class CopyShaToClipboardCommand extends ActiveEditorCommand { constructor(private git: GitProvider, public repoPath: string) { super(Commands.CopyShaToClipboard); diff --git a/src/commands/diffLineWithPrevious.ts b/src/commands/diffLineWithPrevious.ts index cae1efc..9bd38d6 100644 --- a/src/commands/diffLineWithPrevious.ts +++ b/src/commands/diffLineWithPrevious.ts @@ -1,12 +1,12 @@ 'use strict'; import { commands, TextEditor, TextEditorEdit, Uri, window } from 'vscode'; -import { Commands, EditorCommand } from '../commands'; +import { Commands, EditorCommand } from './commands'; import { BuiltInCommands } from '../constants'; import GitProvider, { GitCommit, GitUri } from '../gitProvider'; import { Logger } from '../logger'; import * as path from 'path'; -export default class DiffLineWithPreviousCommand extends EditorCommand { +export class DiffLineWithPreviousCommand extends EditorCommand { constructor(private git: GitProvider) { super(Commands.DiffLineWithPrevious); diff --git a/src/commands/diffLineWithWorking.ts b/src/commands/diffLineWithWorking.ts index c383b12..dd3af86 100644 --- a/src/commands/diffLineWithWorking.ts +++ b/src/commands/diffLineWithWorking.ts @@ -1,10 +1,10 @@ 'use strict'; import { commands, TextEditor, TextEditorEdit, Uri, window } from 'vscode'; -import { Commands, EditorCommand } from '../commands'; +import { Commands, EditorCommand } from './commands'; import GitProvider, { GitCommit, GitUri } from '../gitProvider'; import { Logger } from '../logger'; -export default class DiffLineWithWorkingCommand extends EditorCommand { +export class DiffLineWithWorkingCommand extends EditorCommand { constructor(private git: GitProvider) { super(Commands.DiffLineWithWorking); diff --git a/src/commands/diffWithPrevious.ts b/src/commands/diffWithPrevious.ts index fd38a4d..79232d0 100644 --- a/src/commands/diffWithPrevious.ts +++ b/src/commands/diffWithPrevious.ts @@ -1,14 +1,14 @@ 'use strict'; import { Iterables } from '../system'; import { commands, Range, TextEditor, TextEditorEdit, Uri, window } from 'vscode'; -import { Commands, EditorCommand } from '../commands'; +import { Commands, EditorCommand } from './commands'; import { BuiltInCommands } from '../constants'; import GitProvider, { GitCommit, GitUri } from '../gitProvider'; import { Logger } from '../logger'; import * as moment from 'moment'; import * as path from 'path'; -export default class DiffWithPreviousCommand extends EditorCommand { +export class DiffWithPreviousCommand extends EditorCommand { constructor(private git: GitProvider) { super(Commands.DiffWithPrevious); diff --git a/src/commands/diffWithWorking.ts b/src/commands/diffWithWorking.ts index aaed896..6e8b79a 100644 --- a/src/commands/diffWithWorking.ts +++ b/src/commands/diffWithWorking.ts @@ -1,13 +1,13 @@ 'use strict'; import { Iterables } from '../system'; import { commands, TextEditor, TextEditorEdit, Uri, window } from 'vscode'; -import { Commands, EditorCommand } from '../commands'; +import { Commands, EditorCommand } from './commands'; import { BuiltInCommands } from '../constants'; import GitProvider, { GitCommit, GitUri } from '../gitProvider'; import { Logger } from '../logger'; import * as path from 'path'; -export default class DiffWithWorkingCommand extends EditorCommand { +export class DiffWithWorkingCommand extends EditorCommand { constructor(private git: GitProvider) { super(Commands.DiffWithWorking); diff --git a/src/commands/showBlame.ts b/src/commands/showBlame.ts index 476588f..8659a7d 100644 --- a/src/commands/showBlame.ts +++ b/src/commands/showBlame.ts @@ -1,10 +1,10 @@ 'use strict'; import { TextEditor, TextEditorEdit, Uri, window } from 'vscode'; import BlameAnnotationController from '../blameAnnotationController'; -import { Commands, EditorCommand } from '../commands'; +import { Commands, EditorCommand } from './commands'; import { Logger } from '../logger'; -export default class ShowBlameCommand extends EditorCommand { +export class ShowBlameCommand extends EditorCommand { constructor(private annotationController: BlameAnnotationController) { super(Commands.ShowBlame); diff --git a/src/commands/showBlameHistory.ts b/src/commands/showBlameHistory.ts index bb3553b..7f5e095 100644 --- a/src/commands/showBlameHistory.ts +++ b/src/commands/showBlameHistory.ts @@ -1,11 +1,11 @@ 'use strict'; import { commands, Position, Range, TextEditor, TextEditorEdit, Uri, window } from 'vscode'; -import { Commands, EditorCommand } from '../commands'; +import { Commands, EditorCommand } from './commands'; import { BuiltInCommands } from '../constants'; import GitProvider, { GitUri } from '../gitProvider'; import { Logger } from '../logger'; -export default class ShowBlameHistoryCommand extends EditorCommand { +export class ShowBlameHistoryCommand extends EditorCommand { constructor(private git: GitProvider) { super(Commands.ShowBlameHistory); diff --git a/src/commands/showFileHistory.ts b/src/commands/showFileHistory.ts index 145bb00..24fa897 100644 --- a/src/commands/showFileHistory.ts +++ b/src/commands/showFileHistory.ts @@ -1,11 +1,11 @@ 'use strict'; import { commands, Position, Range, TextEditor, TextEditorEdit, Uri, window } from 'vscode'; -import { Commands, EditorCommand } from '../commands'; +import { Commands, EditorCommand } from './commands'; import { BuiltInCommands } from '../constants'; import GitProvider, { GitUri } from '../gitProvider'; import { Logger } from '../logger'; -export default class ShowFileHistoryCommand extends EditorCommand { +export class ShowFileHistoryCommand extends EditorCommand { constructor(private git: GitProvider) { super(Commands.ShowFileHistory); diff --git a/src/commands/showQuickCommitDetails.ts b/src/commands/showQuickCommitDetails.ts index b253551..60ec3d9 100644 --- a/src/commands/showQuickCommitDetails.ts +++ b/src/commands/showQuickCommitDetails.ts @@ -1,12 +1,12 @@ 'use strict'; import { Iterables } from '../system'; import { commands, TextEditor, Uri, window } from 'vscode'; -import { ActiveEditorCommand, Commands } from '../commands'; +import { ActiveEditorCommand, Commands } from './commands'; import GitProvider, { GitCommit, GitLogCommit, GitUri } from '../gitProvider'; import { Logger } from '../logger'; -import { CommandQuickPickItem, CommitFileDetailsQuickPick, CommitDetailsQuickPick, CommitWithFileStatusQuickPickItem } from '../quickPicks/commitDetails'; +import { CommandQuickPickItem, CommitFileDetailsQuickPick, CommitDetailsQuickPick, CommitWithFileStatusQuickPickItem } from '../quickPicks'; -export default class ShowQuickCommitDetailsCommand extends ActiveEditorCommand { +export class ShowQuickCommitDetailsCommand extends ActiveEditorCommand { constructor(private git: GitProvider) { super(Commands.ShowQuickCommitDetails); @@ -56,7 +56,7 @@ export default class ShowQuickCommitDetailsCommand extends ActiveEditorCommand { pick = await CommitDetailsQuickPick.show(commit as GitLogCommit, uri, goBackCommand); if (!pick) return undefined; - if (pick instanceof CommandQuickPickItem) { + if (!(pick instanceof CommitWithFileStatusQuickPickItem)) { return pick.execute(); } diff --git a/src/commands/showQuickFileHistory.ts b/src/commands/showQuickFileHistory.ts index 026cbad..edff22a 100644 --- a/src/commands/showQuickFileHistory.ts +++ b/src/commands/showQuickFileHistory.ts @@ -1,11 +1,11 @@ 'use strict'; import { commands, TextEditor, Uri, window } from 'vscode'; -import { ActiveEditorCommand, Commands } from '../commands'; +import { ActiveEditorCommand, Commands } from './commands'; import GitProvider, { GitCommit, GitUri } from '../gitProvider'; import { Logger } from '../logger'; -import { CommandQuickPickItem, FileHistoryQuickPick } from '../quickPicks/fileHistory'; +import { CommandQuickPickItem, FileHistoryQuickPick } from '../quickPicks'; -export default class ShowQuickFileHistoryCommand extends ActiveEditorCommand { +export class ShowQuickFileHistoryCommand extends ActiveEditorCommand { constructor(private git: GitProvider) { super(Commands.ShowQuickFileHistory); diff --git a/src/commands/showQuickRepoHistory.ts b/src/commands/showQuickRepoHistory.ts index 4fc80b8..1238fde 100644 --- a/src/commands/showQuickRepoHistory.ts +++ b/src/commands/showQuickRepoHistory.ts @@ -1,11 +1,11 @@ 'use strict'; import { commands, TextEditor, Uri, window } from 'vscode'; -import { ActiveEditorCommand, Commands } from '../commands'; +import { ActiveEditorCommand, Commands } from './commands'; import GitProvider, { GitCommit, GitUri } from '../gitProvider'; import { Logger } from '../logger'; -import { CommandQuickPickItem, RepoHistoryQuickPick } from '../quickPicks/repoHistory'; +import { CommandQuickPickItem, RepoHistoryQuickPick } from '../quickPicks'; -export default class ShowQuickRepoHistoryCommand extends ActiveEditorCommand { +export class ShowQuickRepoHistoryCommand extends ActiveEditorCommand { constructor(private git: GitProvider, public repoPath: string) { super(Commands.ShowQuickRepoHistory); diff --git a/src/commands/showQuickRepoStatus.ts b/src/commands/showQuickRepoStatus.ts index 0602e8d..b135172 100644 --- a/src/commands/showQuickRepoStatus.ts +++ b/src/commands/showQuickRepoStatus.ts @@ -1,11 +1,11 @@ 'use strict'; import { TextEditor, Uri, window } from 'vscode'; -import { ActiveEditorCommand, Commands } from '../commands'; +import { ActiveEditorCommand, Commands } from './commands'; import GitProvider, { GitUri } from '../gitProvider'; import { Logger } from '../logger'; -import { CommandQuickPickItem, RepoStatusQuickPick } from '../quickPicks/repoStatus'; +import { CommandQuickPickItem, RepoStatusQuickPick } from '../quickPicks'; -export default class ShowQuickRepoStatusCommand extends ActiveEditorCommand { +export class ShowQuickRepoStatusCommand extends ActiveEditorCommand { constructor(private git: GitProvider, public repoPath: string) { super(Commands.ShowQuickRepoStatus); diff --git a/src/commands/toggleBlame.ts b/src/commands/toggleBlame.ts index aedece0..58a16b7 100644 --- a/src/commands/toggleBlame.ts +++ b/src/commands/toggleBlame.ts @@ -1,10 +1,10 @@ 'use strict'; import { TextEditor, TextEditorEdit, Uri, window } from 'vscode'; import BlameAnnotationController from '../blameAnnotationController'; -import { Commands, EditorCommand } from '../commands'; +import { Commands, EditorCommand } from './commands'; import { Logger } from '../logger'; -export default class ToggleBlameCommand extends EditorCommand { +export class ToggleBlameCommand extends EditorCommand { constructor(private annotationController: BlameAnnotationController) { super(Commands.ToggleBlame); diff --git a/src/commands/toggleCodeLens.ts b/src/commands/toggleCodeLens.ts index b45510b..e3a345e 100644 --- a/src/commands/toggleCodeLens.ts +++ b/src/commands/toggleCodeLens.ts @@ -1,9 +1,9 @@ 'use strict'; import { TextEditor, TextEditorEdit } from 'vscode'; -import { Commands, EditorCommand } from '../commands'; +import { Commands, EditorCommand } from './commands'; import GitProvider from '../gitProvider'; -export default class ToggleCodeLensCommand extends EditorCommand { +export class ToggleCodeLensCommand extends EditorCommand { constructor(private git: GitProvider) { super(Commands.ToggleCodeLens); diff --git a/src/extension.ts b/src/extension.ts index 4151928..84f8d4c 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -3,21 +3,12 @@ import { commands, ExtensionContext, languages, window, workspace } from 'vscode import BlameActiveLineController from './blameActiveLineController'; import BlameAnnotationController from './blameAnnotationController'; import { configureCssCharacters } from './blameAnnotationFormatter'; -import CopyMessageToClipboardCommand from './commands/copyMessageToClipboard'; -import CopyShaToClipboardCommand from './commands/copyShaToClipboard'; -import DiffLineWithPreviousCommand from './commands/diffLineWithPrevious'; -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 ShowQuickCommitDetailsCommand from './commands/showQuickCommitDetails'; -import ShowQuickFileHistoryCommand from './commands/showQuickFileHistory'; -import ShowQuickRepoHistoryCommand from './commands/showQuickRepoHistory'; -import ShowQuickRepoStatusCommand from './commands/showQuickRepoStatus'; -import ToggleBlameCommand from './commands/toggleBlame'; -import ToggleCodeLensCommand from './commands/toggleCodeLens'; +import { CopyMessageToClipboardCommand, CopyShaToClipboardCommand } from './commands'; +import { DiffLineWithPreviousCommand, DiffLineWithWorkingCommand, DiffWithPreviousCommand, DiffWithWorkingCommand} from './commands'; +import { ShowBlameCommand, ToggleBlameCommand } from './commands'; +import { ShowBlameHistoryCommand, ShowFileHistoryCommand } from './commands'; +import { ShowQuickCommitDetailsCommand, ShowQuickFileHistoryCommand, ShowQuickRepoHistoryCommand, ShowQuickRepoStatusCommand} from './commands'; +import { ToggleCodeLensCommand } from './commands'; import { IAdvancedConfig, IBlameConfig } from './configuration'; import { BuiltInCommands, WorkspaceState } from './constants'; import GitContentProvider from './gitContentProvider'; diff --git a/src/quickPicks.ts b/src/quickPicks.ts new file mode 100644 index 0000000..368b697 --- /dev/null +++ b/src/quickPicks.ts @@ -0,0 +1,7 @@ +'use strict'; +export { CommandQuickPickItem, OpenFileCommandQuickPickItem, OpenFilesCommandQuickPickItem } from './quickPicks/quickPicks'; +export { CommitQuickPickItem, CommitWithFileStatusQuickPickItem } from './quickPicks/gitQuickPicks'; +export { OpenCommitFileCommandQuickPickItem, OpenCommitFilesCommandQuickPickItem, CommitDetailsQuickPick, CommitFileDetailsQuickPick } from './quickPicks/commitDetails'; +export { FileHistoryQuickPick } from './quickPicks/fileHistory'; +export { RepoHistoryQuickPick } from './quickPicks/repoHistory'; +export { OpenStatusFileCommandQuickPickItem, OpenStatusFilesCommandQuickPickItem, RepoStatusQuickPick } from './quickPicks/repoStatus';