mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
show tooltips for all infos in editor as it is done on right gutter (IDEA-99011)
This commit is contained in:
+13
-1
@@ -598,12 +598,24 @@ public class DaemonCodeAnalyzerImpl extends DaemonCodeAnalyzer implements JDOMEx
|
||||
|
||||
@Nullable
|
||||
public HighlightInfo findHighlightByOffset(@NotNull Document document, final int offset, final boolean includeFixRange) {
|
||||
return findHighlightByOffset(document, offset, includeFixRange, true);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public HighlightInfo findHighlightByOffset(@NotNull Document document,
|
||||
final int offset,
|
||||
final boolean includeFixRange,
|
||||
final boolean includeAllButInformation) {
|
||||
final List<HighlightInfo> foundInfoList = new SmartList<HighlightInfo>();
|
||||
processHighlightsNearOffset(document, myProject, HighlightSeverity.INFORMATION, offset, includeFixRange,
|
||||
new Processor<HighlightInfo>() {
|
||||
@Override
|
||||
public boolean process(@NotNull HighlightInfo info) {
|
||||
if (!foundInfoList.isEmpty()) {
|
||||
if (includeAllButInformation) {
|
||||
if (HighlightSeverity.INFORMATION.compareTo(info.getSeverity()) >= 0) {
|
||||
return true;
|
||||
}
|
||||
} else if (!foundInfoList.isEmpty()) {
|
||||
HighlightInfo foundInfo = foundInfoList.get(0);
|
||||
int compare = foundInfo.getSeverity().compareTo(info.getSeverity());
|
||||
if (compare < 0) {
|
||||
|
||||
@@ -94,7 +94,7 @@ public class StatusBarUpdater implements Disposable {
|
||||
|
||||
int offset = editor.getCaretModel().getOffset();
|
||||
DaemonCodeAnalyzer codeAnalyzer = DaemonCodeAnalyzer.getInstance(myProject);
|
||||
HighlightInfo info = ((DaemonCodeAnalyzerImpl)codeAnalyzer).findHighlightByOffset(document, offset, false);
|
||||
HighlightInfo info = ((DaemonCodeAnalyzerImpl)codeAnalyzer).findHighlightByOffset(document, offset, false, false);
|
||||
String text = info != null && info.description != null ? info.description : "";
|
||||
|
||||
StatusBar statusBar = WindowManager.getInstance().getStatusBar(editor.getContentComponent(), myProject);
|
||||
|
||||
Reference in New Issue
Block a user