Skip to content

Commit 19466af

Browse files
committed
Improve project/environment/git branch selection design #5879
- add bottom toolbar to HopGui - add a way to rename git branch - add icon to the project and environment dialog - avoid selecting an environment linked to another project
1 parent d6fb281 commit 19466af

38 files changed

+735
-1051
lines changed

plugins/misc/git/src/main/java/org/apache/hop/git/GitGuiPlugin.java

Lines changed: 231 additions & 160 deletions
Large diffs are not rendered by default.

plugins/misc/git/src/main/java/org/apache/hop/git/model/UIGit.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,17 @@ public boolean createBranch(String value) {
837837
}
838838
}
839839

840+
public boolean renameBranch(String oldName, String newName) {
841+
try {
842+
git.branchRename().setOldName(oldName).setNewName(newName).call();
843+
checkoutBranch(getExpandedName(newName, VCS.TYPE_BRANCH));
844+
return true;
845+
} catch (Exception e) {
846+
showMessageBox(BaseMessages.getString(PKG, CONST_DIALOG_ERROR), e.getMessage());
847+
return false;
848+
}
849+
}
850+
840851
public boolean deleteBranch(String name, boolean force) {
841852
try {
842853
git.branchDelete()
Lines changed: 3 additions & 41 deletions
Loading

plugins/misc/git/src/main/resources/git-add.svg

Lines changed: 0 additions & 2 deletions
Loading

plugins/misc/git/src/main/resources/git-commit.svg

Lines changed: 1 addition & 4 deletions
Loading

plugins/misc/git/src/main/resources/git_icon_inactive.svg

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Loading

plugins/misc/git/src/main/resources/org/apache/hop/git/messages/messages_en_US.properties

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,18 @@ GitGuiPlugin.Dialog.AddError.Message=There was an error doing a git add
2323
GitGuiPlugin.Dialog.Branch.BranchName=Branch: {0}
2424
GitGuiPlugin.Dialog.Branch.CreateBranch.Header=Create a Branch
2525
GitGuiPlugin.Dialog.Branch.CreateBranch.Message=Branch name
26-
GitGuiPlugin.Dialog.Branch.CreateBranch=Create Branch
2726
GitGuiPlugin.Dialog.Branch.CreateBranchSuccessFul.Header=Branch Created
2827
GitGuiPlugin.Dialog.Branch.CreateBranchSuccessFul.Message=Branch created Successfully
29-
GitGuiPlugin.Dialog.Branch.DeleteBranch.Header=Create a Branch
30-
GitGuiPlugin.Dialog.Branch.DeleteBranch.Message=Branch name
31-
GitGuiPlugin.Dialog.Branch.DeleteBranch=Delete Branch
28+
GitGuiPlugin.Dialog.Branch.DeleteBranch.Header=Delete a Branch
29+
GitGuiPlugin.Dialog.Branch.DeleteBranch.Message=Select the branch you want to delete
3230
GitGuiPlugin.Dialog.Branch.DeleteBranchSuccessFul.Header=Branch Deleted
3331
GitGuiPlugin.Dialog.Branch.DeleteBranchSuccessFul.Message=Branch deleted Successfully
3432
GitGuiPlugin.Dialog.Branch.MergeBranch.Header=Merge Branch
3533
GitGuiPlugin.Dialog.Branch.MergeBranch.Message=Select the branch you want to merge
36-
GitGuiPlugin.Dialog.Branch.MergeBranch=Merge Branch
3734
GitGuiPlugin.Dialog.Branch.MergeBranchSuccessFul.Header=Merge successful
3835
GitGuiPlugin.Dialog.Branch.MergeBranchSuccessFul.Message=Successful merge
36+
GitGuiPlugin.Dialog.Branch.RenameBranch.Header=Rename a Branch
37+
GitGuiPlugin.Dialog.Branch.RenameBranch.Message=New branch name
3938
GitGuiPlugin.Dialog.CommitError.Header=Commit Error
4039
GitGuiPlugin.Dialog.CommitError.Message=There was an error doing a git commit
4140
GitGuiPlugin.Dialog.FilesReverted.Header=Files Reverted
@@ -64,6 +63,12 @@ GitGuiPlugin.Dialog.StageFiles.Header=Select files to commit
6463
GitGuiPlugin.Dialog.StageFiles.Message=Please select the files to commit. They'll be staged (add) for the commit to git
6564
GitGuiPlugin.Info.Label=Git Info: {0}
6665
GitGuiPlugin.Menu.Add.Text=Git Add
66+
GitGuiPlugin.Menu.Branch.Create.Text=Create Branch...
67+
GitGuiPlugin.Menu.Branch.Delete.Text=Delete Branch...
68+
GitGuiPlugin.Menu.Branch.Merge.Text=Merge Branch...
69+
GitGuiPlugin.Menu.Branch.Pull.Text=Pull...
70+
GitGuiPlugin.Menu.Branch.Push.Text=Push...
71+
GitGuiPlugin.Menu.Branch.Rename.Text=Rename Branch...
6772
GitGuiPlugin.Menu.Commit.Text=Git Commit
6873
GitGuiPlugin.Menu.Info.Text=Git Info
6974
GitGuiPlugin.Menu.Revert.Text=Git Revert

plugins/misc/git/src/main/resources/pull.svg

Lines changed: 0 additions & 2 deletions
Loading

plugins/misc/git/src/main/resources/push.svg

Lines changed: 0 additions & 2 deletions
Loading

0 commit comments

Comments
 (0)