From b162c7c962e766457fecd2fbfdd3db6f9f96217f Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Thu, 3 May 2018 01:45:50 -0400 Subject: [PATCH] Reworks some commands for consistency --- CHANGELOG.md | 6 ++--- package.json | 41 +++++------------------------- src/commands/common.ts | 3 --- src/commands/openCommitInRemote.ts | 2 +- src/commands/openFileInRemote.ts | 2 +- src/commands/showQuickCommitFileDetails.ts | 2 +- 6 files changed, 13 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cfbc8c..ff22068 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,11 +9,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Adds a tree layout option to tags in the *GitLens* explorer — closes [#358](https://github.com/eamodio/vscode-gitlens/issues/358) - Adds an icon for the *Compare File with Previous Revision* command (`gitlens.diffWithPrevious`) and moves it into the editor toolbar - Adds an icon for the *Compare File with Next Revision* command (`gitlens.diffWithNext`) and moves it into the editor toolbar -- Adds a *Show Line Commit Details* command (`gitlens.showQuickLineCommitFileDetails`) — behaves the same as the *Show Commit File Details* command (`gitlens.showQuickCommitFileDetails`) but with a more accurate menu name -- Adds a *Open Line Commit in Remote* command (`gitlens.openLineCommitInRemote`) — behaves the same as the *Open Commit in Remote* command (`gitlens.openCommitInRemote`) but with a more accurate menu name -- Adds a *Open Line in Remote* command (`gitlens.openLineInRemote`) — behaves the same as the *Open File in Remote* command (`gitlens.openFileInRemote`) but with a more accurate menu name ### Changed +- Renames *Compare Line Revision with Previous* command (`gitlens.diffLineWithPrevious`) to *Compare Commit with Previous* for consistency with other commands +- Renames *Compare Line Revision with Working File* command (`gitlens.diffLineWithWorking`) to *Compare Commit with Working File* for consistency with other commands +- Renames *Show Commit File Details* command (`gitlens.showQuickCommitFileDetails`) to *Show Commit Details* for consistency with other commands - Renames the `gitlens.advanced.menus` setting to `gitlens.menus` - Reworks GitLens menu contributions and configuration diff --git a/package.json b/package.json index 74083f4..708f1aa 100644 --- a/package.json +++ b/package.json @@ -1152,7 +1152,7 @@ }, { "command": "gitlens.diffLineWithPrevious", - "title": "Compare Line Revision with Previous", + "title": "Compare Commit with Previous", "category": "GitLens" }, { @@ -1167,7 +1167,7 @@ }, { "command": "gitlens.diffLineWithWorking", - "title": "Compare Line Revision with Working File", + "title": "Compare Commit with Working File", "category": "GitLens" }, { @@ -1242,12 +1242,7 @@ }, { "command": "gitlens.showQuickCommitFileDetails", - "title": "Show Commit File Details", - "category": "GitLens" - }, - { - "command": "gitlens.showQuickLineCommitFileDetails", - "title": "Show Line Commit Details", + "title": "Show Commit Details", "category": "GitLens" }, { @@ -1321,16 +1316,6 @@ "category": "GitLens" }, { - "command": "gitlens.openLineCommitInRemote", - "title": "Open Line Commit in Remote", - "category": "GitLens" - }, - { - "command": "gitlens.openLineInRemote", - "title": "Open Line in Remote", - "category": "GitLens" - }, - { "command": "gitlens.openRepoInRemote", "title": "Open Repository in Remote", "category": "GitLens" @@ -1840,11 +1825,7 @@ }, { "command": "gitlens.showQuickCommitFileDetails", - "when": "false" - }, - { - "command": "gitlens.showQuickLineCommitFileDetails", - "when": "gitlens:activeIsBlameable" + "when": "editorTextFocus && gitlens:activeIsBlameable" }, { "command": "gitlens.showQuickFileHistory", @@ -1899,14 +1880,6 @@ "when": "gitlens:activeIsTracked && gitlens:activeHasRemote" }, { - "command": "gitlens.openLineCommitInRemote", - "when": "gitlens:activeIsTracked && gitlens:activeHasRemote" - }, - { - "command": "gitlens.openLineInRemote", - "when": "gitlens:activeIsTracked && gitlens:activeHasRemote" - }, - { "command": "gitlens.openFileRevision", "when": "gitlens:activeIsTracked" }, @@ -2191,17 +2164,17 @@ "group": "1_gitlens@2" }, { - "command": "gitlens.openLineInRemote", + "command": "gitlens.openFileInRemote", "when": "editorTextFocus && gitlens:activeHasRemote && config.gitlens.menus.editor.remote", "group": "1_gitlens_1@1" }, { - "command": "gitlens.openLineCommitInRemote", + "command": "gitlens.openCommitInRemote", "when": "editorTextFocus && gitlens:activeHasRemote && config.gitlens.menus.editor.remote", "group": "1_gitlens_1@2" }, { - "command": "gitlens.showQuickLineCommitFileDetails", + "command": "gitlens.showQuickCommitFileDetails", "when": "editorTextFocus && gitlens:activeIsBlameable && config.gitlens.menus.editor.details", "group": "1_gitlens_1@3" }, diff --git a/src/commands/common.ts b/src/commands/common.ts index 776cd2f..fb1d929 100644 --- a/src/commands/common.ts +++ b/src/commands/common.ts @@ -37,8 +37,6 @@ export enum Commands { OpenFileInRemote = 'gitlens.openFileInRemote', OpenFileRevision = 'gitlens.openFileRevision', OpenInRemote = 'gitlens.openInRemote', - OpenLineCommitInRemote = 'gitlens.openLineCommitInRemote', - OpenLineInRemote = 'gitlens.openLineInRemote', OpenRepoInRemote = 'gitlens.openRepoInRemote', OpenWorkingFile = 'gitlens.openWorkingFile', ResetSuppressedWarnings = 'gitlens.resetSuppressedWarnings', @@ -46,7 +44,6 @@ export enum Commands { ShowLastQuickPick = 'gitlens.showLastQuickPick', ShowQuickCommitDetails = 'gitlens.showQuickCommitDetails', ShowQuickCommitFileDetails = 'gitlens.showQuickCommitFileDetails', - ShowQuickLineCommitFileDetails = 'gitlens.showQuickLineCommitFileDetails', ShowQuickFileHistory = 'gitlens.showQuickFileHistory', ShowQuickBranchHistory = 'gitlens.showQuickBranchHistory', ShowQuickCurrentBranchHistory = 'gitlens.showQuickRepoHistory', diff --git a/src/commands/openCommitInRemote.ts b/src/commands/openCommitInRemote.ts index e5eb38e..4316028 100644 --- a/src/commands/openCommitInRemote.ts +++ b/src/commands/openCommitInRemote.ts @@ -23,7 +23,7 @@ export class OpenCommitInRemoteCommand extends ActiveEditorCommand { } constructor() { - super([Commands.OpenCommitInRemote, Commands.OpenLineCommitInRemote]); + super(Commands.OpenCommitInRemote); } protected async preExecute(context: CommandContext, args: OpenCommitInRemoteCommandArgs = {}): Promise { diff --git a/src/commands/openFileInRemote.ts b/src/commands/openFileInRemote.ts index 59ad764..97cb41c 100644 --- a/src/commands/openFileInRemote.ts +++ b/src/commands/openFileInRemote.ts @@ -14,7 +14,7 @@ export interface OpenFileInRemoteCommandArgs { export class OpenFileInRemoteCommand extends ActiveEditorCommand { constructor() { - super([Commands.OpenFileInRemote, Commands.OpenLineInRemote]); + super(Commands.OpenFileInRemote); } protected async preExecute(context: CommandContext, args: OpenFileInRemoteCommandArgs = { range: true }): Promise { diff --git a/src/commands/showQuickCommitFileDetails.ts b/src/commands/showQuickCommitFileDetails.ts index 8b416b2..99bb54f 100644 --- a/src/commands/showQuickCommitFileDetails.ts +++ b/src/commands/showQuickCommitFileDetails.ts @@ -31,7 +31,7 @@ export class ShowQuickCommitFileDetailsCommand extends ActiveEditorCachedCommand } constructor() { - super([Commands.ShowQuickCommitFileDetails, Commands.ShowQuickLineCommitFileDetails]); + super(Commands.ShowQuickCommitFileDetails); } protected async preExecute(context: CommandContext, args: ShowQuickCommitFileDetailsCommandArgs = {}): Promise {