mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
DocumentationManager: make text final in doFetchDocInfo
GitOrigin-RevId: ba754c2dbc3c4d927df2bacd353675aaf199a527
This commit is contained in:
committed by
intellij-monorepo-bot
parent
dfac40c744
commit
a0fa18fe2c
+4
-5
@@ -1094,7 +1094,7 @@ public class DocumentationManager extends DockablePopupManager<DocumentationComp
|
||||
}
|
||||
component.startWait();
|
||||
|
||||
String text = null;
|
||||
final String text;
|
||||
try {
|
||||
text = collector.getDocumentation();
|
||||
}
|
||||
@@ -1114,7 +1114,6 @@ public class DocumentationManager extends DockablePopupManager<DocumentationComp
|
||||
|
||||
LOG.debug("Documentation fetched successfully:\n", text);
|
||||
|
||||
String finalText = text;
|
||||
PsiDocumentManager.getInstance(myProject).performLaterWhenAllCommitted(modality, () -> {
|
||||
if (!element.isValid()) {
|
||||
LOG.debug("Element for which documentation was requested is not valid");
|
||||
@@ -1122,14 +1121,14 @@ public class DocumentationManager extends DockablePopupManager<DocumentationComp
|
||||
return;
|
||||
}
|
||||
String currentText = component.getText();
|
||||
if (finalText == null) {
|
||||
if (text == null) {
|
||||
component.setText(CodeInsightBundle.message("no.documentation.found"), element, collector.provider);
|
||||
}
|
||||
else if (finalText.isEmpty()) {
|
||||
else if (text.isEmpty()) {
|
||||
component.setText(currentText, element, collector.provider);
|
||||
}
|
||||
else {
|
||||
component.setData(element, finalText, collector.effectiveUrl, collector.ref, collector.provider);
|
||||
component.setData(element, text, collector.effectiveUrl, collector.ref, collector.provider);
|
||||
}
|
||||
if (wasEmpty) {
|
||||
component.clearHistory();
|
||||
|
||||
Reference in New Issue
Block a user