mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
vcs: do not update ChangesView directly on ChangesViewModifier update
GitOrigin-RevId: cb6ebb745a8f25e75e9a515d12c5e4897217f221
This commit is contained in:
committed by
intellij-monorepo-bot
parent
dac5c481e5
commit
0a017b812c
@@ -425,6 +425,8 @@ public class ChangesViewManager implements ChangesViewEx,
|
||||
if (myChangeProcessor != null) myChangeProcessor.fireDiffSettingsChanged();
|
||||
});
|
||||
|
||||
busConnection.subscribe(ChangesViewModifier.TOPIC, () -> scheduleRefresh());
|
||||
|
||||
scheduleRefresh();
|
||||
myDiffPreview.updatePreview(false);
|
||||
}
|
||||
|
||||
@@ -3,13 +3,23 @@ package com.intellij.openapi.vcs.changes;
|
||||
|
||||
import com.intellij.openapi.extensions.ProjectExtensionPointName;
|
||||
import com.intellij.openapi.vcs.changes.ui.ChangesViewModelBuilder;
|
||||
import com.intellij.util.messages.Topic;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.EventListener;
|
||||
|
||||
/**
|
||||
* This extension point provides a plugin to modify parts of Local Changes.
|
||||
*/
|
||||
public interface ChangesViewModifier {
|
||||
ProjectExtensionPointName<ChangesViewModifier> KEY = new ProjectExtensionPointName<>("com.intellij.vcs.changes.changesViewModifier");
|
||||
|
||||
@Topic.ProjectLevel
|
||||
Topic<ChangesViewModifierListener> TOPIC = Topic.create("ChangesViewModifier update", ChangesViewModifierListener.class);
|
||||
|
||||
default void modifyTreeModelBuilder(@NotNull ChangesViewModelBuilder builder) { }
|
||||
|
||||
interface ChangesViewModifierListener extends EventListener {
|
||||
void updated();
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -51,7 +51,7 @@ internal class PredictionService(val project: Project) : Disposable {
|
||||
}
|
||||
}) {
|
||||
override fun inProgressChanged(value: Boolean) {
|
||||
changesViewManager.scheduleRefresh()
|
||||
project.messageBus.syncPublisher(ChangesViewModifier.TOPIC).updated()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ internal class PredictionService(val project: Project) : Disposable {
|
||||
|
||||
private fun setPrediction(newPrediction: PredictionData) {
|
||||
predictionData = newPrediction
|
||||
changesViewManager.scheduleRefresh()
|
||||
project.messageBus.syncPublisher(ChangesViewModifier.TOPIC).updated()
|
||||
}
|
||||
|
||||
override fun dispose() {
|
||||
|
||||
Reference in New Issue
Block a user