void (@NotNull String branchName, String contextName) { WorkingContextManager contextManager = getContextManager(); contextManager.clearContext(); contextManager.loadContext(contextName); Notification notification = NOTIFICATION.createNotification(TaskBundle.message("workspace.associated.with.branch.has.been.restored", branchName), NotificationType.INFORMATION); if (myLastBranch != null && contextManager.hasContext(getContextName(myLastBranch))) { notification.addAction(new NotificationAction(TaskBundle.messagePointer("action.Anonymous.text.rollback")) { @Override public void actionPerformed(@NotNull AnActionEvent e, @NotNull Notification notification) { contextManager.clearContext(); contextManager.loadContext(getContextName(myLastBranch)); } }); } notification.addAction(new NotificationAction(TaskBundle.messagePointer("action.Anonymous.text.configure.tree.dots")) { @Override public void actionPerformed(@NotNull AnActionEvent e, @NotNull Notification notification) { new ConfigureBranchContextDialog(myProject).show(); } }).setContextHelpAction(new AnAction(TaskBundle.messagePointer("action.BranchContextTracker.Anonymous.text.what.is.a.workspace"), TaskBundle.messagePointer("action.BranchContextTracker.Anonymous.description")) { @Override public void actionPerformed(@NotNull AnActionEvent e) { } }).notify(myProject); }