mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-382688 Muted flaky WorkspaceTabTitleTest
trying to fix + diagnostics GitOrigin-RevId: 0d442320816011a3a340add7625e38587fa91e30
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8676996feb
commit
c0e48cf676
@@ -107,12 +107,14 @@ f:com.intellij.ide.bookmarks.Bookmark
|
||||
- setDescription(java.lang.String):V
|
||||
- setMnemonic(C):V
|
||||
f:com.intellij.ide.bookmarks.BookmarkManager
|
||||
- com.intellij.openapi.Disposable
|
||||
- com.intellij.openapi.components.PersistentStateComponent
|
||||
- <init>(com.intellij.openapi.project.Project):V
|
||||
- addFileBookmark(com.intellij.openapi.vfs.VirtualFile,java.lang.String):V
|
||||
- addTextBookmark(com.intellij.openapi.vfs.VirtualFile,I,java.lang.String):com.intellij.ide.bookmarks.Bookmark
|
||||
- applyNewStateInTestMode(java.util.List):V
|
||||
- deleteMnemonic(com.intellij.ide.bookmarks.Bookmark):V
|
||||
- dispose():V
|
||||
- findBookmarkForMnemonic(C):com.intellij.ide.bookmarks.Bookmark
|
||||
- findEditorBookmark(com.intellij.openapi.editor.Document,I):com.intellij.ide.bookmarks.Bookmark
|
||||
- findElementBookmark(com.intellij.psi.PsiElement):com.intellij.ide.bookmarks.Bookmark
|
||||
|
||||
@@ -4,6 +4,7 @@ package com.intellij.ide.bookmarks;
|
||||
import com.intellij.ide.bookmark.BookmarkType;
|
||||
import com.intellij.ide.ui.UISettings;
|
||||
import com.intellij.ide.ui.UISettingsListener;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ModalityState;
|
||||
import com.intellij.openapi.components.PersistentStateComponent;
|
||||
@@ -48,7 +49,7 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||
*/
|
||||
@State(name = "BookmarkManager", storages = @Storage(StoragePathMacros.PRODUCT_WORKSPACE_FILE))
|
||||
@Deprecated
|
||||
public final class BookmarkManager implements PersistentStateComponent<Element> {
|
||||
public final class BookmarkManager implements PersistentStateComponent<Element>, Disposable {
|
||||
private record BookmarkInfo(Bookmark bookmark, int line, String text) {
|
||||
}
|
||||
|
||||
@@ -75,7 +76,7 @@ public final class BookmarkManager implements PersistentStateComponent<Element>
|
||||
MessageBusConnection connection = project.getMessageBus().connect();
|
||||
connection.subscribe(EditorColorsManager.TOPIC, __ -> colorsChanged());
|
||||
EditorEventMulticaster multicaster = EditorFactory.getInstance().getEventMulticaster();
|
||||
multicaster.addDocumentListener(new MyDocumentListener(), myProject);
|
||||
multicaster.addDocumentListener(new MyDocumentListener(), this);
|
||||
|
||||
mySortedState = UISettings.getInstance().getSortBookmarks();
|
||||
connection.subscribe(UISettingsListener.TOPIC, uiSettings -> {
|
||||
@@ -413,6 +414,10 @@ public final class BookmarkManager implements PersistentStateComponent<Element>
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
}
|
||||
|
||||
private final class MyDocumentListener implements DocumentListener {
|
||||
@Override
|
||||
public void beforeDocumentChange(@NotNull DocumentEvent e) {
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.intellij.testFramework;
|
||||
|
||||
import com.intellij.openapi.editor.EditorFactory;
|
||||
import com.intellij.openapi.editor.impl.event.EditorEventMulticasterImpl;
|
||||
import com.intellij.openapi.project.ProjectManager;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.encoding.EncodingManager;
|
||||
import com.intellij.psi.PsiDocumentManager;
|
||||
import com.intellij.psi.impl.PsiDocumentManagerBase;
|
||||
@@ -60,7 +62,9 @@ public final class EditorListenerTracker {
|
||||
for (Map.Entry<Class<? extends EventListener>, List<? extends EventListener>> entry : leaked.entrySet()) {
|
||||
Class<? extends EventListener> aClass = entry.getKey();
|
||||
List<? extends EventListener> list = entry.getValue();
|
||||
Assert.fail("Listeners leaked for " + aClass+":\n"+list);
|
||||
String projectNames =
|
||||
StringUtil.join(ContainerUtil.map(ProjectManager.getInstance().getOpenProjects(), project -> project.getName()), ", ");
|
||||
Assert.fail("Listeners leaked for " + aClass+":\n"+list + "\nOpened projects: " + projectNames);
|
||||
}
|
||||
}
|
||||
finally {
|
||||
|
||||
Reference in New Issue
Block a user