Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
dkandalov committed Sep 21, 2024
1 parent 58ffa87 commit 90b3192
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import static liveplugin.PluginUtil.*

// depends-on-plugin Git4Idea

// Prints a class defined in the Github plugin.
// Prints a class defined in the GitHub plugin.
show(git4idea.GitUtil)
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import static liveplugin.PluginUtil.*

// depends-on-plugin Git4Idea

// Prints a class defined in the Github plugin.
// Prints a class defined in the GitHub plugin.
show(git4idea.GitUtil::class)
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ class AddPluginFromGistAction : AnAction("Copy from Gist", "Copy from Gist", All
override fun actionPerformed(event: AnActionEvent) {
val project = event.project
val gistUrl = project.showInputDialog(
message = "Enter gist URL:",
message = "Enter Gist URL:",
dialogTitle,
inputValidator { if (extractGistIdFrom(it) == null) "Couldn't parse gist URL" else null }
inputValidator { if (extractGistIdFrom(it) == null) "Couldn't parse Gist URL" else null }
) ?: return

fetchGist(
Expand All @@ -46,7 +46,7 @@ class AddPluginFromGistAction : AnAction("Copy from Gist", "Copy from Gist", All
}
},
onFailure = { e ->
project.showError("Failed to fetch gist: ${e.message}", e)
project.showError("Failed to fetch Gist: ${e.message}", e)
}
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class SharePluginAsGistAction : AnAction("Share as Gist", "Share as plugin files
override fun actionPerformed(event: AnActionEvent) {
val project = event.project ?: return
val livePlugin = event.livePlugins().firstOrNull() ?: return
val account = GHAccountsUtil.getSingleOrDefaultAccount(project) ?: return project.showError("Please configure Github account to share gists.")
val account = GHAccountsUtil.getSingleOrDefaultAccount(project) ?: return project.showError("Please configure GitHub account to share gists.")
val authToken = runBlocking { githubAccountManager().findCredentials(account) } ?: return project.showError("Couldn't get authentication for ${account.name}")

val dialog = GithubCreateGistDialog(project)
Expand All @@ -65,7 +65,7 @@ class SharePluginAsGistAction : AnAction("Share as Gist", "Share as plugin files
@Suppress("DEPRECATION")
livePluginNotificationGroup.createNotification(
"Gist created successfully",
HtmlChunk.link(newGist.htmlUrl, "Your gist url").toString(),
HtmlChunk.link(newGist.htmlUrl, "Your Gist URL").toString(),
INFORMATION
).setListener(URL_OPENING_LISTENER).notify(project)
}
Expand Down

0 comments on commit 90b3192

Please sign in to comment.