Skip to content

Commit

Permalink
Fixed an issue in startup notification component
Browse files Browse the repository at this point in the history
mwalter committed Aug 14, 2024
1 parent f5a9a43 commit 7c33565
Showing 3 changed files with 17 additions and 16 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,12 @@

## [Unreleased]

## [1.13.1] - 2024-08-13

### Fixed

- Fixed an issue in startup notification component

## [1.13.0] - 2024-08-12

### Fixed
@@ -169,7 +175,9 @@

- Initial release.

[Unreleased]: https://github.com/mwalter/MavenDependencyChecker/compare/v1.11.0...HEAD
[Unreleased]: https://github.com/mwalter/MavenDependencyChecker/compare/v1.13.0...HEAD
[1.13.0]: https://github.com/mwalter/MavenDependencyChecker/compare/v1.12.0...v1.13.0
[1.12.0]: https://github.com/mwalter/MavenDependencyChecker/compare/v1.11.0...v1.12.0
[1.11.0]: https://github.com/mwalter/MavenDependencyChecker/compare/v1.10.2...v1.11.0
[1.10.2]: https://github.com/mwalter/MavenDependencyChecker/compare/v1.10.1...v1.10.2
[1.10.1]: https://github.com/mwalter/MavenDependencyChecker/compare/v1.10.0...v1.10.1
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ pluginGroup = ch.newinstance.plugin.mavendependencychecker
pluginName = MavenDependencyChecker
pluginRepositoryUrl = https://github.com/mwalter/MavenDependencyChecker
# SemVer format -> https://semver.org
pluginVersion = 1.13.0
pluginVersion = 1.13.1

# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
@@ -14,7 +14,7 @@ pluginUntilBuild = 242.*

# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
platformType = IC
platformVersion = 2023.2.2
platformVersion = 2024.2.0.1

# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
Original file line number Diff line number Diff line change
@@ -12,21 +12,15 @@
import com.intellij.openapi.extensions.PluginId;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.startup.ProjectActivity;
import com.intellij.openapi.startup.StartupActivity;
import com.intellij.openapi.util.IconLoader;
import com.intellij.util.text.VersionComparatorUtil;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public class StartupNotification implements ProjectActivity, DumbAware {
public class StartupNotification implements StartupActivity, DumbAware {

private static final NotificationGroup GROUP = NotificationGroupManager.getInstance().getNotificationGroup("MavenDependencyChecker");

@Nullable
@Override
public Object execute(@NotNull Project project, @NotNull Continuation<? super Unit> continuation) {
public void runActivity(@NotNull Project project) {
IdeaPluginDescriptor plugin = PluginManagerCore.getPlugin(PluginId.getId("ch.newinstance.plugin.mavendependencychecker"));
MavenDependencyCheckerSettings settings = ApplicationManager.getApplication().getService(MavenDependencyCheckerSettings.class);
String installedVersion = settings.getInstalledVersion();
@@ -38,15 +32,14 @@ public Object execute(@NotNull Project project, @NotNull Continuation<? super Un

if (compareResult < 0) {
Notification notification = createNotification();
notification.notify(project);
notification.notify(null);
settings.setInstalledVersion(plugin.getVersion());
}

return null;
}

private Notification createNotification() {
return GROUP.createNotification(
NotificationGroup group = NotificationGroupManager.getInstance().getNotificationGroup("MavenDependencyChecker");
return group.createNotification(
"Maven Dependency Checker",

Check warning on line 43 in src/main/java/ch/newinstance/plugin/mavendependencychecker/ui/StartupNotification.java

GitHub Actions / Qodana Community for JVM

Incorrect string capitalization

String 'Maven Dependency Checker' is not properly capitalized. It should have sentence capitalization
"Thank you for using my plugin! If you like it, please add a rating or write a review.",
NotificationType.INFORMATION)

0 comments on commit 7c33565

Please sign in to comment.