mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-12 22:31:24 +00:00
fix: JetBrains internal API usage warnings
This commit is contained in:
parent
624180a626
commit
06ad159adf
2 changed files with 16 additions and 31 deletions
|
|
@ -1,5 +1,8 @@
|
|||
package ee.carlrobert.codegpt;
|
||||
|
||||
import static ee.carlrobert.codegpt.CodeGPTPlugin.CODEGPT_ID;
|
||||
|
||||
import com.intellij.ide.plugins.InstalledPluginsState;
|
||||
import com.intellij.notification.NotificationAction;
|
||||
import com.intellij.notification.NotificationType;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
|
|
@ -50,18 +53,19 @@ public class CodeGPTUpdateStartupActivity implements StartupActivity.Background
|
|||
|
||||
public void run(@NotNull ProgressIndicator indicator) {
|
||||
if (!myProject.isDisposed()) {
|
||||
CodeGPTPlugin.tryFindAvailableUpdate(indicator)
|
||||
.ifPresent((update) -> OverlayUtil.getDefaultNotification(
|
||||
CodeGPTBundle.get("checkForUpdatesTask.notification.message"),
|
||||
NotificationType.IDE_UPDATE)
|
||||
.addAction(NotificationAction.createSimpleExpiring(
|
||||
CodeGPTBundle.get("checkForUpdatesTask.notification.installButton"),
|
||||
() -> ApplicationManager.getApplication()
|
||||
.executeOnPooledThread(() -> installCodeGPTUpdate(myProject))))
|
||||
.addAction(NotificationAction.createSimpleExpiring(
|
||||
CodeGPTBundle.get("checkForUpdatesTask.notification.hideButton"),
|
||||
() -> ConfigurationState.getInstance().setCheckForPluginUpdates(false)))
|
||||
.notify(myProject));
|
||||
if (InstalledPluginsState.getInstance().hasNewerVersion(CODEGPT_ID)) {
|
||||
OverlayUtil.getDefaultNotification(
|
||||
CodeGPTBundle.get("checkForUpdatesTask.notification.message"),
|
||||
NotificationType.IDE_UPDATE)
|
||||
.addAction(NotificationAction.createSimpleExpiring(
|
||||
CodeGPTBundle.get("checkForUpdatesTask.notification.installButton"),
|
||||
() -> ApplicationManager.getApplication()
|
||||
.executeOnPooledThread(() -> installCodeGPTUpdate(myProject))))
|
||||
.addAction(NotificationAction.createSimpleExpiring(
|
||||
CodeGPTBundle.get("checkForUpdatesTask.notification.hideButton"),
|
||||
() -> ConfigurationState.getInstance().setCheckForPluginUpdates(false)))
|
||||
.notify(myProject);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue