generated from JetBrains/intellij-platform-plugin-template
-
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.
🔥 Pick the closest reasonable commit if the current one was not pushed
After this change there are now 3 actions: - generating a link to the currently checked out commit - generating a link to the latest commit from the remote's default branch - generating a link to some parent commit that is definitely available at the remote ...with the last one becoming the default assigned to `Cmd`+`Shift`+`L`. The main use cases are generating a link to whatever I see in my IDE (so, close commits tend to also be acceptable since the code hasn't changed much) or showing something that is currently in the latest master. Also, I expect there to be not that many users relying on the plugin generating a link to exactly the current commit in scenarios when it has not been pushed, thought I don't really have any statistics. I assume no one has tried automating anything by calling the action or the default shortcut.
- Loading branch information
Showing
7 changed files
with
178 additions
and
62 deletions.
There are no files selected for viewing
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
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
11 changes: 11 additions & 0 deletions
11
src/main/kotlin/org/lunakoly/quicklink/utils/ThreadingHelpers.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,11 @@ | ||
package org.lunakoly.quicklink.utils | ||
|
||
import com.intellij.openapi.progress.ProgressManager | ||
import com.intellij.openapi.project.Project | ||
import com.intellij.openapi.util.ThrowableComputable | ||
|
||
fun Project?.runInBackground(progressTitle: String, block: () -> Unit) { | ||
ProgressManager.getInstance().runProcessWithProgressSynchronously( | ||
ThrowableComputable(block), progressTitle, true, this, | ||
) | ||
} |
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