@Override
  public void activate() {
    Disposable disposable = Disposer.newDisposable();
    // do not leak Project if 'deactivate' is never called
    Disposer.register(SvnDisposable.getInstance(myProject), disposable);
    // workaround the race between 'activate' and 'deactivate'
    Disposable oldDisposable = myDisposable.getAndSet(disposable);
    if (oldDisposable != null) Disposer.dispose(oldDisposable);


    MessageBusConnection busConnection = myProject.getMessageBus().connect();
    busConnection.subscribe(ChangeListListener.TOPIC, new SvnChangelistListener(this));
    busConnection.subscribe(ProjectLevelVcsManager.VCS_CONFIGURATION_CHANGED, () -> invokeRefreshSvnRoots());

    SvnFileSystemListener fileOperationsHandler = new SvnFileSystemListener(this);
    Disposer.register(disposable, fileOperationsHandler);

    VirtualFileManager.getInstance().addVirtualFileListener(new SvnEntriesFileListener(myProject), disposable);

    // this will initialize its inner listener for committed changes upload
    LoadedRevisionsCache.getInstance(myProject);
    Topics.subscribe(ApplicationActivationListener.TOPIC, disposable,
                     new MyFrameStateListener(ChangeListManager.getInstance(myProject), VcsDirtyScopeManager.getInstance(myProject)));

    mySvnBranchPointsCalculator = new SvnBranchPointsCalculator(this);

    if (!ApplicationManager.getApplication().isHeadlessEnvironment()) {
      BackgroundTaskUtil.executeOnPooledThread(disposable, () -> checkCommandLineVersion());
    }

    RootsToWorkingCopies rootsToWorkingCopies = RootsToWorkingCopies.getInstance(myProject);
    SvnAuthenticationNotifier svnAuthenticationNotifier = SvnAuthenticationNotifier.getInstance(myProject);
    SvnLoadedBranchesStorage svnLoadedBranchesStorage = SvnLoadedBranchesStorage.getInstance(myProject);
    svnLoadedBranchesStorage.activate();
    Disposer.register(disposable, () -> {
      rootsToWorkingCopies.clear();
      svnAuthenticationNotifier.clear();
      svnLoadedBranchesStorage.deactivate();
    });

    ProjectLevelVcsManager.getInstance(myProject).runAfterInitialization(() -> setupChangeLists());
    StartupManager.getInstance(myProject).runAfterOpened(() -> postStartup());
  }
@Override
  public void activate()