mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vcs-log] remove listeners when tool window is unregistered
If tool window is unregistered before VcsLogTabsWatcher is disposed, stateChanged is called. Instead of processing the event normally, listeners should be removed in this case. EA-105323
This commit is contained in:
@@ -88,6 +88,10 @@ public class VcsLogTabsWatcher implements Disposable {
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
removeListeners();
|
||||
}
|
||||
|
||||
private void removeListeners() {
|
||||
myToolWindowManager.removeToolWindowManagerListener(myPostponedEventsListener);
|
||||
|
||||
if (myToolWindow != null) {
|
||||
@@ -172,7 +176,10 @@ public class VcsLogTabsWatcher implements Disposable {
|
||||
|
||||
@Override
|
||||
public void stateChanged() {
|
||||
if (myToolWindow != null && myIsVisible != myToolWindow.isVisible()) {
|
||||
if (myToolWindow == null) return;
|
||||
if (myToolWindowManager.getToolWindow(TOOLWINDOW_ID) == null) {
|
||||
removeListeners();
|
||||
} else if (myIsVisible != myToolWindow.isVisible()) {
|
||||
myIsVisible = myToolWindow.isVisible();
|
||||
selectionChanged();
|
||||
}
|
||||
|
||||
@@ -254,9 +254,9 @@ public class CommitPanel extends JBPanel {
|
||||
String subject = separator > 0 ? fullMessage.substring(0, separator) : fullMessage;
|
||||
String description = fullMessage.substring(subject.length());
|
||||
return "<b>" +
|
||||
getHtmlWithFonts(escapeMultipleSpaces(IssueLinkHtmlRenderer.formatTextWithLinks(myProject, subject)), Font.BOLD) +
|
||||
escapeMultipleSpaces(IssueLinkHtmlRenderer.formatTextWithLinks(myProject, subject)) +
|
||||
"</b>" +
|
||||
getHtmlWithFonts(escapeMultipleSpaces(IssueLinkHtmlRenderer.formatTextWithLinks(myProject, description)));
|
||||
escapeMultipleSpaces(IssueLinkHtmlRenderer.formatTextWithLinks(myProject, description));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user