Parcourir la source

Renames StatusFileCommitsNode to StatusFileNode

main
Eric Amodio il y a 6 ans
Parent
révision
14809ab45c
8 fichiers modifiés avec 180 ajouts et 185 suppressions
  1. +2
    -2
      package.json
  2. +2
    -2
      src/views/explorerCommands.ts
  3. +1
    -1
      src/views/nodes.ts
  4. +1
    -0
      src/views/nodes/explorerNode.ts
  5. +1
    -1
      src/views/nodes/resultsFileNode.ts
  6. +1
    -1
      src/views/nodes/statusFileNode.ts
  7. +2
    -8
      src/views/nodes/statusFilesNode.ts

+ 2
- 2
package.json Voir le fichier

@ -3261,7 +3261,7 @@
},
{
"command": "gitlens.explorers.applyChanges",
"when": "viewItem =~ /gitlens:file:(commit|status)\\b/",
"when": "viewItem =~ /gitlens:file:(commit|results)\\b/",
"group": "5_gitlens_1@1"
},
{
@ -3286,7 +3286,7 @@
},
{
"command": "gitlens.explorers.exploreRepoRevision",
"when": "viewItem =~ /gitlens:(branch|commit|file:(commit|status)|stash|tag)\\b/",
"when": "viewItem =~ /gitlens:(branch|commit|file:(commit|results|status)|stash|tag)\\b/",
"group": "7_gitlens_more@1"
},
{

+ 2
- 2
src/views/explorerCommands.ts Voir le fichier

@ -28,7 +28,7 @@ import {
ResultsFileNode,
StashFileNode,
StashNode,
StatusFileCommitsNode,
StatusFileNode,
StatusUpstreamNode,
TagNode
} from './nodes';
@ -355,7 +355,7 @@ export class ExplorerCommands implements Disposable {
return commands.executeCommand(Commands.DiffWith, diffArgs);
}
private async openFileRevisionInRemote(node: CommitFileNode | StashFileNode | StatusFileCommitsNode) {
private async openFileRevisionInRemote(node: CommitFileNode | StashFileNode | StatusFileNode) {
return commands.executeCommand(Commands.OpenFileInRemote, node.commit.toGitUri(node.commit.status === 'D'), {
range: false
} as OpenFileInRemoteCommandArgs);

+ 1
- 1
src/views/nodes.ts Voir le fichier

@ -20,7 +20,7 @@ export * from './nodes/resultsNode';
export * from './nodes/stashesNode';
export * from './nodes/stashFileNode';
export * from './nodes/stashNode';
export * from './nodes/statusFileCommitsNode';
export * from './nodes/statusFileNode';
export * from './nodes/resultsFileNode';
export * from './nodes/statusFilesNode';
export * from './nodes/resultsFilesNode';

+ 1
- 0
src/views/nodes/explorerNode.ts Voir le fichier

@ -28,6 +28,7 @@ export enum ResourceType {
Repository = 'gitlens:repository',
Results = 'gitlens:results',
ResultsCommits = 'gitlens:results:commits',
ResultsFile = 'gitlens:file:results',
ResultsFiles = 'gitlens:results:files',
SearchResults = 'gitlens:results:search',
Stash = 'gitlens:stash',

+ 1
- 1
src/views/nodes/resultsFileNode.ts Voir le fichier

@ -25,7 +25,7 @@ export class ResultsFileNode extends ExplorerNode {
getTreeItem(): TreeItem {
const item = new TreeItem(this.label, TreeItemCollapsibleState.None);
item.contextValue = ResourceType.StatusFile;
item.contextValue = ResourceType.ResultsFile;
item.tooltip = StatusFileFormatter.fromTemplate('${file}\n${directory}/\n\n${status}', this._file);
const statusIcon = GitFile.getStatusIcon(this._file.status);

src/views/nodes/statusFileCommitsNode.ts → src/views/nodes/statusFileNode.ts Voir le fichier

@ -15,7 +15,7 @@ import { Explorer } from '../explorer';
import { CommitFileNode, CommitFileNodeDisplayAs } from './commitFileNode';
import { ExplorerNode, ResourceType } from './explorerNode';
export class StatusFileCommitsNode extends ExplorerNode {
export class StatusFileNode extends ExplorerNode {
constructor(
public readonly repoPath: string,
public readonly file: GitFile,

+ 2
- 8
src/views/nodes/statusFilesNode.ts Voir le fichier

@ -17,7 +17,7 @@ import { Arrays, Iterables, Objects, Strings } from '../../system';
import { RepositoriesExplorer } from '../repositoriesExplorer';
import { ExplorerNode, ResourceType } from './explorerNode';
import { FileExplorerNode, FolderNode } from './folderNode';
import { StatusFileCommitsNode } from './statusFileCommitsNode';
import { StatusFileNode } from './statusFileNode';
export class StatusFilesNode extends ExplorerNode {
readonly repoPath: string;
@ -86,13 +86,7 @@ export class StatusFilesNode extends ExplorerNode {
...Iterables.map(
Objects.values(groups),
files =>
new StatusFileCommitsNode(
repoPath,
files[files.length - 1],
files.map(s => s.commit),
this,
this.explorer
)
new StatusFileNode(repoPath, files[files.length - 1], files.map(s => s.commit), this, this.explorer)
)
];

Chargement…
Annuler
Enregistrer