// Path: src/main/java/gitflow/ui/NotifyUtil.java
// public class NotifyUtil
// {
//     private static final NotificationGroup TOOLWINDOW_NOTIFICATION = NotificationGroup.toolWindowGroup(
//             "Gitflow Errors", ToolWindowId.VCS, true);
//     private static final NotificationGroup STICKY_NOTIFICATION = new NotificationGroup(
//             "Gitflow Errors", NotificationDisplayType.STICKY_BALLOON, true);
//     private static final NotificationGroup BALLOON_NOTIFICATION = new NotificationGroup(
//             "Gitflow Notifications", NotificationDisplayType.BALLOON, true);
// 
//     public static void notifySuccess(Project project, String title, String message) {
//         notify(NotificationType.INFORMATION, BALLOON_NOTIFICATION, project, title, message);
//     }
// 
// 	public static void notifyInfo(Project project, String title, String message) {
// 		notify(NotificationType.INFORMATION, TOOLWINDOW_NOTIFICATION, project, title, message);
// 	}
// 
//     public static void notifyError(Project project, String title, String message) {
//         notify(NotificationType.ERROR, TOOLWINDOW_NOTIFICATION, project, title, message);
//     }
// 
//     public static void notifyError(Project project, String title, Exception exception) {
//         notify(NotificationType.ERROR, STICKY_NOTIFICATION, project, title, exception.getMessage());
//     }
// 
//     private static void notify(NotificationType type, NotificationGroup group, Project project, String title, String message) {
//         group.createNotification(title, message, type, null).notify(project);
//     }
// }


import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.vcs.VcsException;
import com.intellij.openapi.vfs.VirtualFile;
import git4idea.config.GitConfigUtil;
import git4idea.repo.GitRepository;
import gitflow.ui.NotifyUtil;
import org.jetbrains.annotations.NotNull;
import java.util.HashMap;
import java.util.Map;
            Disposer.register(project_, () -> gitflowConfigUtilMap.remove(project_));
        }

        return instance;
    }

    GitflowConfigUtil(Project project_, GitRepository repo_){
        project = project_;
        repo = repo_;

        update();
    }

    public void update(){
        VirtualFile root = repo.getRoot();

        try{
            Future<Void> f = (Future<Void>) ApplicationManager.getApplication().executeOnPooledThread(new Runnable() {
                @Override
                public void run() {
                    try{
                        masterBranch = GitConfigUtil.getValue(project, root, BRANCH_MASTER);
                        developBranch = GitConfigUtil.getValue(project, root, BRANCH_DEVELOP);
                        featurePrefix = GitConfigUtil.getValue(project,root,PREFIX_FEATURE);
                        releasePrefix = GitConfigUtil.getValue(project,root,PREFIX_RELEASE);
                        hotfixPrefix = GitConfigUtil.getValue(project,root,PREFIX_HOTFIX);
                        bugfixPrefix = GitConfigUtil.getValue(project,root,PREFIX_BUGFIX);
                        supportPrefix = GitConfigUtil.getValue(project,root,PREFIX_SUPPORT);
                        versiontagPrefix = GitConfigUtil.getValue(project,root,PREFIX_VERSIONTAG);
                    } catch (VcsException e) {
// Path: src/main/java/gitflow/ui/NotifyUtil.java
// public class NotifyUtil
// {
//     private static final NotificationGroup TOOLWINDOW_NOTIFICATION = NotificationGroup.toolWindowGroup(
//             "Gitflow Errors", ToolWindowId.VCS, true);
//     private static final NotificationGroup STICKY_NOTIFICATION = new NotificationGroup(
//             "Gitflow Errors", NotificationDisplayType.STICKY_BALLOON, true);
//     private static final NotificationGroup BALLOON_NOTIFICATION = new NotificationGroup(
//             "Gitflow Notifications", NotificationDisplayType.BALLOON, true);
// 
//     public static void notifySuccess(Project project, String title, String message) {
//         notify(NotificationType.INFORMATION, BALLOON_NOTIFICATION, project, title, message);
//     }
// 
// 	public static void notifyInfo(Project project, String title, String message) {
// 		notify(NotificationType.INFORMATION, TOOLWINDOW_NOTIFICATION, project, title, message);
// 	}
// 
//     public static void notifyError(Project project, String title, String message) {
//         notify(NotificationType.ERROR, TOOLWINDOW_NOTIFICATION, project, title, message);
//     }
// 
//     public static void notifyError(Project project, String title, Exception exception) {
//         notify(NotificationType.ERROR, STICKY_NOTIFICATION, project, title, exception.getMessage());
//     }
// 
//     private static void notify(NotificationType type, NotificationGroup group, Project project, String title, String message) {
//         group.createNotification(title, message, type, null).notify(project);
//     }
// }


// Path: src/main/java/gitflow/GitflowConfigUtil.java
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.vcs.VcsException;
import com.intellij.openapi.vfs.VirtualFile;
import git4idea.config.GitConfigUtil;
import git4idea.repo.GitRepository;
import gitflow.ui.NotifyUtil;
import org.jetbrains.annotations.NotNull;
import java.util.HashMap;
import java.util.Map;

            Disposer.register(project_, () -> gitflowConfigUtilMap.remove(project_));
        }

        return instance;
    }

    GitflowConfigUtil(Project project_, GitRepository repo_){
        project = project_;
        repo = repo_;

        update();
    }

    public void update(){
        VirtualFile root = repo.getRoot();

        try{
            Future<Void> f = (Future<Void>) ApplicationManager.getApplication().executeOnPooledThread(new Runnable() {
                @Override
                public void run() {
                    try{
                        masterBranch = GitConfigUtil.getValue(project, root, BRANCH_MASTER);
                        developBranch = GitConfigUtil.getValue(project, root, BRANCH_DEVELOP);
                        featurePrefix = GitConfigUtil.getValue(project,root,PREFIX_FEATURE);
                        releasePrefix = GitConfigUtil.getValue(project,root,PREFIX_RELEASE);
                        hotfixPrefix = GitConfigUtil.getValue(project,root,PREFIX_HOTFIX);
                        bugfixPrefix = GitConfigUtil.getValue(project,root,PREFIX_BUGFIX);
                        supportPrefix = GitConfigUtil.getValue(project,root,PREFIX_SUPPORT);
                        versiontagPrefix = GitConfigUtil.getValue(project,root,PREFIX_VERSIONTAG);
                    } catch (VcsException e) {
                        NotifyUtil.notifyError(project, "Config error", e);