mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
vcs: cleanup - add threading assertions
GitOrigin-RevId: 5612562714722b533cfbb9a2e321ca6897eb1a5a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7f3234a888
commit
c430ee0155
@@ -1,10 +1,12 @@
|
||||
// Copyright 2000-2020 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.impl;
|
||||
|
||||
import com.intellij.util.concurrency.annotations.RequiresEdt;
|
||||
import com.intellij.util.messages.Topic;
|
||||
|
||||
public interface LineStatusTrackerSettingListener {
|
||||
Topic<LineStatusTrackerSettingListener> TOPIC = new Topic<>(LineStatusTrackerSettingListener.class, Topic.BroadcastDirection.TO_DIRECT_CHILDREN);
|
||||
|
||||
@RequiresEdt
|
||||
void settingsUpdated();
|
||||
}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
// Copyright 2000-2019 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.changes;
|
||||
|
||||
import com.intellij.util.concurrency.annotations.RequiresEdt;
|
||||
import com.intellij.vcs.commit.ChangesViewCommitWorkflowHandler;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public interface ChangesViewEx extends ChangesViewI {
|
||||
void refreshImmediately();
|
||||
|
||||
@RequiresEdt
|
||||
void updateCommitWorkflow();
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -581,6 +581,9 @@ public class ChangesViewManager implements ChangesViewEx,
|
||||
}
|
||||
|
||||
public void updateCommitWorkflow(boolean isNonModal) {
|
||||
ApplicationManager.getApplication().assertIsDispatchThread();
|
||||
if (myDisposed) return;
|
||||
|
||||
if (isNonModal) {
|
||||
if (myCommitPanel == null) {
|
||||
myChangesPanel.setToolbarHorizontal(isToolbarHorizontalSetting.asBoolean());
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
// Copyright 2000-2020 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.changes.ui
|
||||
|
||||
import com.intellij.util.concurrency.annotations.RequiresEdt
|
||||
import com.intellij.util.messages.Topic
|
||||
|
||||
interface ChangesViewContentManagerListener {
|
||||
@RequiresEdt
|
||||
fun toolWindowMappingChanged()
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.intellij.openapi.vcs.changes.ui.ChangesViewContentManagerListener
|
||||
import com.intellij.openapi.vcs.impl.LineStatusTrackerSettingListener
|
||||
import com.intellij.openapi.vcs.impl.VcsInitObject
|
||||
import com.intellij.openapi.vcs.impl.VcsStartupActivity
|
||||
import com.intellij.util.concurrency.annotations.RequiresEdt
|
||||
import com.intellij.util.messages.Topic
|
||||
import com.intellij.vcs.commit.CommitWorkflowManager
|
||||
import git4idea.GitVcs
|
||||
@@ -34,7 +35,10 @@ internal class GitStageManager(private val project: Project) : Disposable {
|
||||
}, this)
|
||||
}
|
||||
|
||||
@RequiresEdt
|
||||
private fun onAvailabilityChanged() {
|
||||
ApplicationManager.getApplication().assertIsDispatchThread()
|
||||
|
||||
if (isStagingAreaAvailable(project)) {
|
||||
GitStageTracker.getInstance(project).scheduleUpdateAll()
|
||||
}
|
||||
|
||||
@@ -138,6 +138,7 @@ internal class GitStagePanel(private val tracker: GitStageTracker, isEditorDiffP
|
||||
}
|
||||
|
||||
fun setDiffPreviewInEditor(isInEditor: Boolean, force: Boolean = false) {
|
||||
if (Disposer.isDisposed(this)) return
|
||||
if (!force && (isInEditor == (editorTabPreview != null))) return
|
||||
|
||||
if (diffPreviewProcessor != null) Disposer.dispose(diffPreviewProcessor!!)
|
||||
|
||||
Reference in New Issue
Block a user