Renames commands/commands to commands/common

Renames quickpicks/quickpicks to quickpicks/common
Moves git quick picks into common and other quick pick files
This commit is contained in:
Eric Amodio
2017-03-28 16:19:57 -04:00
parent aa39792843
commit 8b0748608d
40 changed files with 117 additions and 119 deletions

View File

@@ -1,7 +1,7 @@
'use strict';
import { TextEditor, Uri, window } from 'vscode';
import { ActiveEditorTracker } from '../activeEditorTracker';
import { ActiveEditorCommand, Commands } from './commands';
import { ActiveEditorCommand, Commands } from './common';
import { TextEditorComparer, UriComparer } from '../comparers';
import { GitService } from '../gitService';
import { Logger } from '../logger';

View File

@@ -41,6 +41,20 @@ export const Commands = {
ToggleCodeLens: 'gitlens.toggleCodeLens' as Commands
};
export type CommandContext = 'gitlens:canToggleCodeLens' | 'gitlens:enabled' | 'gitlens:isBlameable' | 'gitlens:key';
export const CommandContext = {
CanToggleCodeLens: 'gitlens:canToggleCodeLens' as CommandContext,
Enabled: 'gitlens:enabled' as CommandContext,
HasRemotes: 'gitlens:hasRemotes' as CommandContext,
IsBlameable: 'gitlens:isBlameable' as CommandContext,
Key: 'gitlens:key' as CommandContext
};
export function setCommandContext(key: CommandContext | string, value: any) {
return commands.executeCommand(BuiltInCommands.SetContext, key, value);
}
export abstract class Command extends Disposable {
private _disposable: Disposable;

View File

@@ -1,7 +1,7 @@
'use strict';
import { Iterables } from '../system';
import { TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './commands';
import { ActiveEditorCommand, Commands } from './common';
import { GitService, GitUri } from '../gitService';
import { Logger } from '../logger';
import { copy } from 'copy-paste';

View File

@@ -1,7 +1,7 @@
'use strict';
import { Iterables } from '../system';
import { TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './commands';
import { ActiveEditorCommand, Commands } from './common';
import { GitService, GitUri } from '../gitService';
import { Logger } from '../logger';
import { copy } from 'copy-paste';

View File

@@ -1,7 +1,7 @@
'use strict';
import { Iterables } from '../system';
import { TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './commands';
import { ActiveEditorCommand, Commands } from './common';
import { GitService } from '../gitService';
import { Logger } from '../logger';
import { CommandQuickPickItem, BranchesQuickPick } from '../quickPicks';

View File

@@ -1,6 +1,6 @@
'use strict';
import { commands, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './commands';
import { ActiveEditorCommand, Commands } from './common';
import { BuiltInCommands } from '../constants';
import { GitCommit, GitService, GitUri } from '../gitService';
import { Logger } from '../logger';

View File

@@ -1,6 +1,6 @@
'use strict';
import { commands, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './commands';
import { ActiveEditorCommand, Commands } from './common';
import { GitCommit, GitService, GitUri } from '../gitService';
import { Logger } from '../logger';

View File

@@ -1,6 +1,6 @@
'use strict';
import { commands, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './commands';
import { ActiveEditorCommand, Commands } from './common';
import { BuiltInCommands } from '../constants';
import { GitService, GitUri } from '../gitService';
import { Logger } from '../logger';

View File

@@ -1,7 +1,7 @@
'use strict';
import { Iterables } from '../system';
import { commands, Range, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './commands';
import { ActiveEditorCommand, Commands } from './common';
import { BuiltInCommands } from '../constants';
import { GitLogCommit, GitService, GitUri } from '../gitService';
import { Logger } from '../logger';

View File

@@ -1,7 +1,7 @@
'use strict';
import { Iterables } from '../system';
import { commands, Range, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './commands';
import { ActiveEditorCommand, Commands } from './common';
import { BuiltInCommands } from '../constants';
import { GitCommit, GitService, GitUri } from '../gitService';
import { Logger } from '../logger';

View File

@@ -1,7 +1,7 @@
'use strict';
// import { Iterables } from '../system';
import { commands, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './commands';
import { ActiveEditorCommand, Commands } from './common';
import { BuiltInCommands } from '../constants';
import { GitCommit, GitService, GitUri } from '../gitService';
import { Logger } from '../logger';

View File

@@ -1,7 +1,7 @@
'use strict';
import { commands, Disposable, QuickPickItem } from 'vscode';
import { CommandContext, setCommandContext } from '../commands';
import { CommandQuickPickItem, OpenFileCommandQuickPickItem } from '../quickPicks/quickPicks';
import { CommandContext, setCommandContext } from './common';
import { CommandQuickPickItem, OpenFileCommandQuickPickItem } from '../quickPicks';
import { Logger } from '../logger';
const keyNoopCommand = Object.create(null) as QuickPickItem;

View File

@@ -1,6 +1,6 @@
'use strict';
import { TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands, openEditor } from './commands';
import { ActiveEditorCommand, Commands, openEditor } from './common';
import { GitService } from '../gitService';
import { Logger } from '../logger';
import * as path from 'path';

View File

@@ -1,7 +1,7 @@
'use strict';
import { Arrays } from '../system';
import { commands, TextEditor, TextEditorEdit, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './commands';
import { ActiveEditorCommand, Commands } from './common';
import { GitCommit, GitService, GitUri } from '../gitService';
import { Logger } from '../logger';

View File

@@ -1,7 +1,7 @@
'use strict';
import { Arrays } from '../system';
import { commands, Range, TextEditor, TextEditorEdit, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './commands';
import { ActiveEditorCommand, Commands } from './common';
import { GitService, GitUri } from '../gitService';
import { Logger } from '../logger';

View File

@@ -1,6 +1,6 @@
'use strict';
import { TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './commands';
import { ActiveEditorCommand, Commands } from './common';
import { GitRemote, RemoteOpenType } from '../gitService';
import { Logger } from '../logger';
import { CommandQuickPickItem, OpenRemoteCommandQuickPickItem, RemotesQuickPick } from '../quickPicks';

View File

@@ -1,7 +1,7 @@
'use strict';
import { TextEditor, TextEditorEdit, Uri, window } from 'vscode';
import { BlameAnnotationController } from '../blameAnnotationController';
import { Commands, EditorCommand } from './commands';
import { Commands, EditorCommand } from './common';
import { Logger } from '../logger';
export class ShowBlameCommand extends EditorCommand {

View File

@@ -1,6 +1,6 @@
'use strict';
import { commands, Position, Range, TextEditor, TextEditorEdit, Uri, window } from 'vscode';
import { Commands, EditorCommand } from './commands';
import { Commands, EditorCommand } from './common';
import { BuiltInCommands } from '../constants';
import { GitService, GitUri } from '../gitService';
import { Logger } from '../logger';

View File

@@ -1,6 +1,6 @@
'use strict';
import { commands, Position, Range, TextEditor, TextEditorEdit, Uri, window } from 'vscode';
import { Commands, EditorCommand } from './commands';
import { Commands, EditorCommand } from './common';
import { BuiltInCommands } from '../constants';
import { GitService, GitUri } from '../gitService';
import { Logger } from '../logger';

View File

@@ -1,6 +1,6 @@
'use strict';
import { commands, window } from 'vscode';
import { Command, Commands, getLastCommand } from './commands';
import { Command, Commands, getLastCommand } from './common';
import { Logger } from '../logger';
export class ShowLastQuickPickCommand extends Command {

View File

@@ -1,6 +1,6 @@
'use strict';
import { commands, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCachedCommand, Commands } from '../commands';
import { ActiveEditorCachedCommand, Commands } from './common';
import { GitService, GitUri, IGitLog } from '../gitService';
import { Logger } from '../logger';
import { BranchesQuickPick, BranchHistoryQuickPick, CommandQuickPickItem } from '../quickPicks';

View File

@@ -1,6 +1,6 @@
'use strict';
import { commands, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCachedCommand, Commands } from './commands';
import { ActiveEditorCachedCommand, Commands } from './common';
import { GitCommit, GitLogCommit, GitService, GitUri, IGitLog } from '../gitService';
import { Logger } from '../logger';
import { CommandQuickPickItem, CommitDetailsQuickPick, CommitWithFileStatusQuickPickItem } from '../quickPicks';

View File

@@ -1,6 +1,6 @@
'use strict';
import { TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCachedCommand, Commands } from './commands';
import { ActiveEditorCachedCommand, Commands } from './common';
import { GitCommit, GitLogCommit, GitService, GitUri, IGitLog } from '../gitService';
import { Logger } from '../logger';
import { CommandQuickPickItem, CommitFileDetailsQuickPick } from '../quickPicks';

View File

@@ -1,6 +1,6 @@
'use strict';
import { commands, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCachedCommand, Commands } from '../commands';
import { ActiveEditorCachedCommand, Commands } from './common';
import { GitService } from '../gitService';
import { Logger } from '../logger';
import { CommandQuickPickItem } from '../quickPicks';

View File

@@ -1,6 +1,6 @@
'use strict';
import { commands, Range, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCachedCommand, Commands } from '../commands';
import { ActiveEditorCachedCommand, Commands } from './common';
import { GitService, GitUri, IGitLog } from '../gitService';
import { Logger } from '../logger';
import { CommandQuickPickItem, FileHistoryQuickPick } from '../quickPicks';

View File

@@ -1,6 +1,6 @@
'use strict';
import { TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCachedCommand, Commands } from './commands';
import { ActiveEditorCachedCommand, Commands } from './common';
import { GitService } from '../gitService';
import { Logger } from '../logger';
import { CommandQuickPickItem, RepoStatusQuickPick } from '../quickPicks';

View File

@@ -1,7 +1,7 @@
'use strict';
import { TextEditor, TextEditorEdit, Uri, window } from 'vscode';
import { BlameAnnotationController } from '../blameAnnotationController';
import { Commands, EditorCommand } from './commands';
import { Commands, EditorCommand } from './common';
import { Logger } from '../logger';
export class ToggleBlameCommand extends EditorCommand {

View File

@@ -1,6 +1,6 @@
'use strict';
import { TextEditor, TextEditorEdit } from 'vscode';
import { Commands, EditorCommand } from './commands';
import { Commands, EditorCommand } from './common';
import { GitService } from '../gitService';
export class ToggleCodeLensCommand extends EditorCommand {