diff --git a/platform/platform-resources/src/META-INF/VcsExtensions.xml b/platform/platform-resources/src/META-INF/VcsExtensions.xml
index 3723eef9d95a..94bd592c3e77 100644
--- a/platform/platform-resources/src/META-INF/VcsExtensions.xml
+++ b/platform/platform-resources/src/META-INF/VcsExtensions.xml
@@ -53,6 +53,12 @@
serviceImplementation="com.intellij.openapi.vcs.impl.FileStatusManagerImpl"/>
+
+
+
+
+
diff --git a/platform/platform-resources/src/componentSets/VCS.xml b/platform/platform-resources/src/componentSets/VCS.xml
index b9255be7640a..fd6b879c24ed 100644
--- a/platform/platform-resources/src/componentSets/VCS.xml
+++ b/platform/platform-resources/src/componentSets/VCS.xml
@@ -22,15 +22,6 @@
com.intellij.openapi.vcs.changes.patch.CreatePatchCommitExecutor
-
- com.intellij.openapi.vcs.changes.shelf.ShelveChangesManager
-
-
-
- com.intellij.openapi.vcs.changes.shelf.ShelvedChangesViewManager
-
-
-
com.intellij.openapi.vcs.changes.VcsIgnoreFilesChecker
diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelveChangesManager.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelveChangesManager.java
index 494d9e80447f..ab3e1740f647 100644
--- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelveChangesManager.java
+++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelveChangesManager.java
@@ -21,6 +21,7 @@ import com.intellij.openapi.progress.ProgressIndicator;
import com.intellij.openapi.progress.ProgressManager;
import com.intellij.openapi.progress.Task;
import com.intellij.openapi.project.Project;
+import com.intellij.openapi.startup.StartupActivity;
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.util.*;
import com.intellij.openapi.util.io.FileUtil;
@@ -79,8 +80,11 @@ import static com.intellij.openapi.vcs.changes.ui.ChangesViewContentManager.getT
import static com.intellij.util.containers.ContainerUtil.*;
import static java.util.Objects.requireNonNull;
-@State(name = "ShelveChangesManager", storages = {@Storage(StoragePathMacros.WORKSPACE_FILE)})
-public final class ShelveChangesManager implements PersistentStateComponent, ProjectComponent {
+@State(
+ name = "ShelveChangesManager",
+ storages = @Storage(StoragePathMacros.WORKSPACE_FILE)
+)
+public final class ShelveChangesManager implements PersistentStateComponent {
private static final Logger LOG = Logger.getInstance(ShelveChangesManager.class);
@NonNls private static final String ELEMENT_CHANGELIST = "changelist";
@NonNls private static final String ELEMENT_RECYCLED_CHANGELIST = "recycled_changelist";
@@ -101,7 +105,7 @@ public final class ShelveChangesManager implements PersistentStateComponent myShelvingFiles;
public static ShelveChangesManager getInstance(@NotNull Project project) {
- return project.getComponent(ShelveChangesManager.class);
+ return project.getService(ShelveChangesManager.class);
}
public static final class State {
@@ -210,7 +214,6 @@ public final class ShelveChangesManager implements PersistentStateComponent grouping) {
myState.groupingKeys = grouping;
}
+
+ public static class PostStartupActivity implements StartupActivity.DumbAware {
+ @Override
+ public void runActivity(@NotNull Project project) {
+ getInstance(project).projectOpened();
+ }
+ }
}
diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChangesViewManager.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChangesViewManager.java
index 7b3f4bcbb3e4..7648e773a452 100644
--- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChangesViewManager.java
+++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChangesViewManager.java
@@ -115,7 +115,7 @@ public class ShelvedChangesViewManager implements Disposable {
public static final DataKey> SHELVED_BINARY_FILE_KEY = DataKey.create("ShelveChangesManager.ShelvedBinaryFile");
public static ShelvedChangesViewManager getInstance(Project project) {
- return project.getComponent(ShelvedChangesViewManager.class);
+ return project.getService(ShelvedChangesViewManager.class);
}
public ShelvedChangesViewManager(Project project) {