IDEA-51314 Notification on successful git tag creation. GitTagDialog: focus on tag name.

This commit is contained in:
Kirill Likhodedov
2010-11-18 19:33:38 +03:00
parent 08de853c05
commit a9210f00b0
2 changed files with 13 additions and 0 deletions
@@ -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