mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
when showing file-level annotation, also set label tooltip to passed highlighting info value (usage: user can better see the automatically created long error, for instance, with file path) for WEB-24210 Internal TS Lint Problem
This commit is contained in:
@@ -107,6 +107,7 @@ public class HighlightInfo implements Segment {
|
||||
setFlag(FROM_INJECTION_MASK, fromInjection);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getToolTip() {
|
||||
String toolTip = this.toolTip;
|
||||
String description = this.description;
|
||||
|
||||
+1
-1
@@ -223,7 +223,7 @@ public class DaemonCodeAnalyzerImpl extends DaemonCodeAnalyzerEx implements Pers
|
||||
if (fileEditor instanceof TextEditor) {
|
||||
FileLevelIntentionComponent component = new FileLevelIntentionComponent(info.getDescription(), info.getSeverity(),
|
||||
info.getGutterIconRenderer(), info.quickFixActionRanges,
|
||||
project, psiFile, ((TextEditor)fileEditor).getEditor());
|
||||
project, psiFile, ((TextEditor)fileEditor).getEditor(), info.getToolTip());
|
||||
manager.addTopComponent(fileEditor, component);
|
||||
List<HighlightInfo> fileLevelInfos = fileEditor.getUserData(FILE_LEVEL_HIGHLIGHTS);
|
||||
if (fileLevelInfos == null) {
|
||||
|
||||
+2
-1
@@ -56,7 +56,7 @@ public class FileLevelIntentionComponent extends EditorNotificationPanel {
|
||||
@Nullable final List<Pair<HighlightInfo.IntentionActionDescriptor, TextRange>> intentions,
|
||||
@NotNull final Project project,
|
||||
@NotNull final PsiFile psiFile,
|
||||
@NotNull final Editor editor) {
|
||||
@NotNull final Editor editor, @Nullable String tooltip) {
|
||||
myProject = project;
|
||||
myBackground = getColor(severity);
|
||||
|
||||
@@ -79,6 +79,7 @@ public class FileLevelIntentionComponent extends EditorNotificationPanel {
|
||||
}
|
||||
|
||||
myLabel.setText(description);
|
||||
myLabel.setToolTipText(tooltip);
|
||||
if (gutterMark != null) {
|
||||
myLabel.setIcon(gutterMark.getIcon());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user