void () { TaskProjectConfiguration projectConfiguration = getProjectConfiguration(); servers: for (TaskProjectConfiguration.SharedServer server : projectConfiguration.servers) { if (server.type == null || server.url == null) { continue; } for (TaskRepositoryType<?> repositoryType : TaskRepositoryType.getRepositoryTypes()) { if (repositoryType.getName().equals(server.type)) { for (TaskRepository repository : myRepositories) { if (!repositoryType.equals(repository.getRepositoryType())) { continue; } if (server.url.equals(repository.getUrl())) { continue servers; } } TaskRepository repository = repositoryType.createRepository(); repository.setUrl(server.url); repository.setShared(true); myRepositories.add(repository); } } } // make sure the task is associated with default changelist LocalTask defaultTask = findTask(LocalTaskImpl.DEFAULT_TASK_ID); ChangeListManager changeListManager = ChangeListManager.getInstance(myProject); LocalChangeList defaultList = changeListManager.findChangeList(LocalChangeList.getDefaultName()); if (defaultList != null && defaultTask != null) { ChangeListInfo listInfo = new ChangeListInfo(defaultList); if (!defaultTask.getChangeLists().contains(listInfo)) { defaultTask.addChangelist(listInfo); } } // remove already not existing changelists from tasks changelists for (LocalTask localTask : getLocalTasks()) { for (Iterator<ChangeListInfo> iterator = localTask.getChangeLists().iterator(); iterator.hasNext(); ) { final ChangeListInfo changeListInfo = iterator.next(); if (changeListManager.getChangeList(changeListInfo.id) == null) { iterator.remove(); } } } changeListManager.addChangeListListener(myChangeListListener, myProject); if (!ApplicationManager.getApplication().isUnitTestMode()) { ProjectUtilKt.executeOnPooledThread(myProject, () -> { WorkingContextManager.getInstance(myProject).pack(200, 50); }); } if (!ApplicationManager.getApplication().isUnitTestMode()) { startRefreshTimer(); } }