diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/ProjectLevelVcsManager.java b/platform/vcs-api/src/com/intellij/openapi/vcs/ProjectLevelVcsManager.java index 28e4f9425f59..0121f9d910b4 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/ProjectLevelVcsManager.java +++ b/platform/vcs-api/src/com/intellij/openapi/vcs/ProjectLevelVcsManager.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2013 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.openapi.vcs; import com.intellij.execution.ui.ConsoleViewContentType; @@ -244,7 +230,11 @@ public abstract class ProjectLevelVcsManager { @NotNull public abstract VcsRoot[] getAllVcsRoots(); - public abstract void updateActiveVcss(); + /** + * @deprecated Use just {@link #setDirectoryMappings(List)}. + */ + @Deprecated + public void updateActiveVcss() {} public abstract List getDirectoryMappings(); public abstract List getDirectoryMappings(AbstractVcs vcs); diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/ModuleVcsDetector.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/ModuleVcsDetector.java index e80b8d1e4b0b..d18727e5772b 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/ModuleVcsDetector.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/ModuleVcsDetector.java @@ -38,7 +38,6 @@ public class ModuleVcsDetector { if (myVcsManager.needAutodetectMappings()) { autoDetectVcsMappings(true); } - myVcsManager.updateActiveVcss(); }); startupManager.registerPostStartupActivity(() -> { MessageBusConnection connection = myProject.getMessageBus().connect(); diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/ProjectLevelVcsManagerImpl.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/ProjectLevelVcsManagerImpl.java index de5292bc8a03..b0edbb90b019 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/ProjectLevelVcsManagerImpl.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/ProjectLevelVcsManagerImpl.java @@ -675,11 +675,6 @@ public class ProjectLevelVcsManagerImpl extends ProjectLevelVcsManagerEx impleme return vcsRoots.toArray(new VcsRoot[0]); } - @Override - public void updateActiveVcss() { - // not needed - } - @Override public void notifyDirectoryMappingChanged() { BackgroundTaskUtil.syncPublisher(myProject, VCS_CONFIGURATION_CHANGED).directoryMappingChanged(); diff --git a/platform/vcs-impl/src/com/intellij/platform/PlatformVcsDetector.java b/platform/vcs-impl/src/com/intellij/platform/PlatformVcsDetector.java index 844def7734f5..95081d5764eb 100644 --- a/platform/vcs-impl/src/com/intellij/platform/PlatformVcsDetector.java +++ b/platform/vcs-impl/src/com/intellij/platform/PlatformVcsDetector.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.platform; import com.intellij.openapi.application.ApplicationManager; @@ -48,7 +34,6 @@ public class PlatformVcsDetector implements ProjectComponent { myVcsManager.removeDirectoryMapping(new VcsDirectoryMapping("", "")); myVcsManager.setAutoDirectoryMapping(file.getPath(), vcs.getName()); myVcsManager.cleanupMappings(); - myVcsManager.updateActiveVcss(); } } }; diff --git a/platform/vcs-tests/src/com/intellij/testFramework/vcs/AbstractVcsTestCase.java b/platform/vcs-tests/src/com/intellij/testFramework/vcs/AbstractVcsTestCase.java index 9fd536742740..ddf74df697fd 100644 --- a/platform/vcs-tests/src/com/intellij/testFramework/vcs/AbstractVcsTestCase.java +++ b/platform/vcs-tests/src/com/intellij/testFramework/vcs/AbstractVcsTestCase.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2016 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.testFramework.vcs; import com.intellij.execution.process.ProcessOutput; @@ -77,7 +63,6 @@ public abstract class AbstractVcsTestCase { protected void setVcsMappings(List mappings) { ProjectLevelVcsManager vcsManager = ProjectLevelVcsManager.getInstance(myProject); vcsManager.setDirectoryMappings(mappings); - vcsManager.updateActiveVcss(); ChangeListManagerImpl.getInstanceImpl(myProject).waitUntilRefreshed(); } @@ -107,7 +92,6 @@ public abstract class AbstractVcsTestCase { protected void activateVCS(final String vcsName) { ProjectLevelVcsManager vcsManager = ProjectLevelVcsManager.getInstance(myProject); vcsManager.setDirectoryMapping(myWorkingCopyDir.getPath(), vcsName); - vcsManager.updateActiveVcss(); AbstractVcs vcs = vcsManager.findVcsByName(vcsName); Assert.assertEquals(1, vcsManager.getRootsUnderVcs(vcs).length); diff --git a/platform/vcs-tests/testSrc/com/intellij/openapi/vcs/IgnoreIdeaLevelTest.java b/platform/vcs-tests/testSrc/com/intellij/openapi/vcs/IgnoreIdeaLevelTest.java index 60e3ea85eca6..6687d42bb3f7 100644 --- a/platform/vcs-tests/testSrc/com/intellij/openapi/vcs/IgnoreIdeaLevelTest.java +++ b/platform/vcs-tests/testSrc/com/intellij/openapi/vcs/IgnoreIdeaLevelTest.java @@ -48,7 +48,6 @@ public class IgnoreIdeaLevelTest extends PlatformTestCase { myVcsManager.registerVcs(myVcs); myVcsManager.setDirectoryMapping("", myVcs.getName()); myVcsManager.setDirectoryMapping(myModuleRootFile.getAbsolutePath(), myVcs.getName()); - myVcsManager.updateActiveVcss(); myClManager = ChangeListManagerImpl.getInstanceImpl(myProject); diff --git a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/actions/ImportAction.java b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/actions/ImportAction.java index a6828a6efe5d..2326662a60f3 100644 --- a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/actions/ImportAction.java +++ b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/actions/ImportAction.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2014 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.cvsSupport2.actions; import com.intellij.CvsBundle; @@ -111,7 +97,6 @@ public class ImportAction extends ActionOnSelectedElement { final String path = mapRoot.equals(projectBaseDir) ? "" : mapRoot.getPath(); ProjectLevelVcsManager manager = ProjectLevelVcsManager.getInstance(project); manager.setDirectoryMappings(VcsUtil.addMapping(manager.getDirectoryMappings(), path, CvsVcs2.getInstance(project).getName())); - manager.updateActiveVcss(); } }; } diff --git a/plugins/git4idea/src/git4idea/actions/GitInit.java b/plugins/git4idea/src/git4idea/actions/GitInit.java index 0335cb15c8ce..4d4270b125e1 100644 --- a/plugins/git4idea/src/git4idea/actions/GitInit.java +++ b/plugins/git4idea/src/git4idea/actions/GitInit.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2012 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package git4idea.actions; import com.intellij.openapi.actionSystem.AnActionEvent; @@ -92,7 +78,6 @@ public class GitInit extends DumbAwareAction { VfsUtil.markDirtyAndRefresh(false, true, false, root); ProjectLevelVcsManager manager = ProjectLevelVcsManager.getInstance(project); manager.setDirectoryMappings(VcsUtil.addMapping(manager.getDirectoryMappings(), path, GitVcs.NAME)); - manager.updateActiveVcss(); VcsDirtyScopeManager.getInstance(project).dirDirtyRecursively(root); } } diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/action/HgInit.java b/plugins/hg4idea/src/org/zmlx/hg4idea/action/HgInit.java index 6b68b2b4883b..ccb0108c152a 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/action/HgInit.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/action/HgInit.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2014 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.zmlx.hg4idea.action; import com.intellij.openapi.actionSystem.AnActionEvent; @@ -102,7 +88,6 @@ public class HgInit extends DumbAwareAction { final String path = mapRoot.equals(myProject.getBaseDir()) ? "" : mapRoot.getPath(); ProjectLevelVcsManager manager = ProjectLevelVcsManager.getInstance(myProject); manager.setDirectoryMappings(VcsUtil.addMapping(manager.getDirectoryMappings(), path, HgVcs.VCS_NAME)); - manager.updateActiveVcss(); } } diff --git a/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnLocalChangesAndRootsTest.java b/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnLocalChangesAndRootsTest.java index 12d02981a099..ccfe471dd793 100644 --- a/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnLocalChangesAndRootsTest.java +++ b/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnLocalChangesAndRootsTest.java @@ -29,7 +29,6 @@ public class SvnLocalChangesAndRootsTest extends SvnTestCase { myProjectLevelVcsManager = (ProjectLevelVcsManagerImpl) ProjectLevelVcsManager.getInstance(myProject); myProjectLevelVcsManager.setDirectoryMapping(myAlienRoot.getAbsolutePath(), SvnVcs.VCS_NAME); - myProjectLevelVcsManager.updateActiveVcss(); myClManager = ChangeListManager.getInstance(myProject);*/ } @@ -142,7 +141,6 @@ public class SvnLocalChangesAndRootsTest extends SvnTestCase { } newMappings.add(new VcsDirectoryMapping(myMappingTarget.getPath(), SvnVcs.VCS_NAME)); myProjectLevelVcsManager.setDirectoryMappings(newMappings); - myProjectLevelVcsManager.updateActiveVcss(); sleep100(); } diff --git a/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnRootAboveTest.java b/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnRootAboveTest.java index efeed9c04731..4ff71b915c2f 100644 --- a/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnRootAboveTest.java +++ b/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnRootAboveTest.java @@ -64,7 +64,6 @@ public class SvnRootAboveTest extends SvnTestCase { myProjectLevelVcsManager = (ProjectLevelVcsManagerImpl) ProjectLevelVcsManager.getInstance(myProject); myProjectLevelVcsManager.setDirectoryMapping(myLocalWcRoot.getAbsolutePath(), SvnVcs.VCS_NAME); - myProjectLevelVcsManager.updateActiveVcss(); final SvnVcs vcs = SvnVcs.getInstance(myProject); ((SvnFileUrlMappingImpl) vcs.getSvnFileUrlMapping()).realRefresh(myRefreshCopiesStub); @@ -108,7 +107,6 @@ public class SvnRootAboveTest extends SvnTestCase { } newMappings.add(new VcsDirectoryMapping(myMappingTarget.getPath(), SvnVcs.VCS_NAME)); myProjectLevelVcsManager.setDirectoryMappings(newMappings); - myProjectLevelVcsManager.updateActiveVcss(); sleep100(); }