-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bring back RunOnce, add action to manually install or update hotswap-…
…agent.jar in case of issues (#72)
- Loading branch information
1 parent
f312ca3
commit 915672d
Showing
4 changed files
with
51 additions
and
7 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
src/main/kotlin/com/vaadin/plugin/actions/InstallOrUpdateHotSwapAction.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.vaadin.plugin.actions | ||
|
||
import com.intellij.notification.NotificationType | ||
import com.intellij.openapi.actionSystem.AnAction | ||
import com.intellij.openapi.actionSystem.AnActionEvent | ||
import com.vaadin.plugin.copilot.CopilotPluginUtil | ||
import com.vaadin.plugin.utils.VaadinHomeUtil | ||
|
||
class InstallOrUpdateHotSwapAction : AnAction() { | ||
|
||
override fun actionPerformed(p0: AnActionEvent) { | ||
val version = VaadinHomeUtil.updateOrInstallHotSwapJar() | ||
if (version != null) { | ||
CopilotPluginUtil.notify("hotswap-agent.jar:$version installed", NotificationType.INFORMATION, p0.project) | ||
} else { | ||
CopilotPluginUtil.notify( | ||
"Installation of hotswap-agent.jar failed, see logs for details", | ||
NotificationType.ERROR, | ||
p0.project | ||
) | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters