mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
[python] inline notification group initialization (PY-75446)
GitOrigin-RevId: a3061571c4ad943e7e28abd7d0f08cd55e400c81
This commit is contained in:
committed by
intellij-monorepo-bot
parent
927ebdeddd
commit
2f96b83aa2
@@ -8,7 +8,6 @@ import com.intellij.codeInspection.ex.InspectionProfileImpl;
|
|||||||
import com.intellij.codeInspection.ex.InspectionToolWrapper;
|
import com.intellij.codeInspection.ex.InspectionToolWrapper;
|
||||||
import com.intellij.lang.annotation.AnnotationHolder;
|
import com.intellij.lang.annotation.AnnotationHolder;
|
||||||
import com.intellij.lang.annotation.Annotator;
|
import com.intellij.lang.annotation.Annotator;
|
||||||
import com.intellij.notification.NotificationGroup;
|
|
||||||
import com.intellij.notification.NotificationGroupManager;
|
import com.intellij.notification.NotificationGroupManager;
|
||||||
import com.intellij.notification.NotificationListener;
|
import com.intellij.notification.NotificationListener;
|
||||||
import com.intellij.notification.NotificationType;
|
import com.intellij.notification.NotificationType;
|
||||||
@@ -45,7 +44,6 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public final class PyCompatibilityInspectionAdvertiser implements Annotator {
|
public final class PyCompatibilityInspectionAdvertiser implements Annotator {
|
||||||
|
|
||||||
private static final NotificationGroup BALLOON_NOTIFICATIONS = NotificationGroupManager.getInstance().getNotificationGroup("Python Compatibility Inspection Advertiser");
|
|
||||||
private static final Key<Boolean> DONT_SHOW_BALLOON = Key.create("showingPyCompatibilityAdvertiserBalloon");
|
private static final Key<Boolean> DONT_SHOW_BALLOON = Key.create("showingPyCompatibilityAdvertiserBalloon");
|
||||||
|
|
||||||
// Allow to show declined suggestion multiple times to ease debugging
|
// Allow to show declined suggestion multiple times to ease debugging
|
||||||
@@ -176,7 +174,8 @@ public final class PyCompatibilityInspectionAdvertiser implements Annotator {
|
|||||||
@NotNull @NotificationContent String htmlContent,
|
@NotNull @NotificationContent String htmlContent,
|
||||||
@NotNull NotificationListener listener) {
|
@NotNull NotificationListener listener) {
|
||||||
project.putUserData(DONT_SHOW_BALLOON, true);
|
project.putUserData(DONT_SHOW_BALLOON, true);
|
||||||
BALLOON_NOTIFICATIONS.createNotification(title, htmlContent, NotificationType.INFORMATION)
|
NotificationGroupManager.getInstance().getNotificationGroup("Python Compatibility Inspection Advertiser")
|
||||||
|
.createNotification(title, htmlContent, NotificationType.INFORMATION)
|
||||||
.setSuggestionType(true)
|
.setSuggestionType(true)
|
||||||
.setListener((notification, event) -> {
|
.setListener((notification, event) -> {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user