matthiasblaesing commented on code in PR #8653:
URL: https://github.com/apache/netbeans/pull/8653#discussion_r2203496511
##########
ide/git/src/org/netbeans/modules/git/ui/repository/RepositoryBrowserPanel.java:
##########
@@ -1226,6 +1227,23 @@ public void run () {
});
}
});
+ actions.add(new
AbstractAction(NbBundle.getMessage(RenameBranchAction.class,
"LBL_RenameBranchAction_PopupName")) { //NOI18N
+ @Override
+ public void actionPerformed (ActionEvent e) {
+ EventQueue.invokeLater(new Runnable() {
+ @Override
+ public void run () {
+ RenameBranchAction action =
SystemAction.get(RenameBranchAction.class);
+ action.renameBranch(repo, branch);
+ }
+ });
+ }
+
+ @Override
+ public boolean isEnabled() {
+ return !active;
+ }
Review Comment:
I think this can be removed. It will block renaming the checked out branch
in the repository browser:
<img width="415" height="328" alt="Image"
src="https://github.com/user-attachments/assets/a792db1c-2ef9-44a2-8ea9-d96082d8673a"
/>
git allows you to rename the checked out branch without any issues and
indeed the option is enabled in the context menu of the project:
<img width="392" height="254" alt="Image"
src="https://github.com/user-attachments/assets/83aa026a-ff2b-4f2e-8a70-06831a87741b"
/>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists