mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-51314 Notification on successful git tag creation. GitTagDialog: focus on tag name.
This commit is contained in:
@@ -140,6 +140,11 @@ public class GitTagDialog extends DialogWrapper {
|
||||
validateFields();
|
||||
}
|
||||
|
||||
@Override
|
||||
public JComponent getPreferredFocusedComponent() {
|
||||
return myTagNameTextField;
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform tagging according to selected options
|
||||
*
|
||||
@@ -189,6 +194,7 @@ public class GitTagDialog extends DialogWrapper {
|
||||
}
|
||||
try {
|
||||
GitHandlerUtil.doSynchronously(h, GitBundle.getString("tagging.title"), h.printableCommandLine());
|
||||
GitUIUtil.notifySuccess(myProject, myTagNameTextField.getText(), "Created tag " + myTagNameTextField.getText() + " successfully.");
|
||||
}
|
||||
finally {
|
||||
exceptions.addAll(h.errors());
|
||||
|
||||
@@ -54,6 +54,13 @@ public class GitUIUtil {
|
||||
*/
|
||||
private GitUIUtil() { }
|
||||
|
||||
/**
|
||||
* Displays a "success"-notification.
|
||||
*/
|
||||
public static void notifySuccess(Project project, String title, String description) {
|
||||
Notifications.Bus.notify(new Notification(GitVcs.NOTIFICATION_GROUP_ID, title, description, NotificationType.INFORMATION), project);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a list cell renderer for virtual files (it renders presentable URL)
|
||||
* @param listCellRenderer
|
||||
|
||||
Reference in New Issue
Block a user