New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ACT: introduce Share in Playground
action
#6563
Conversation
6fbeb53
to
9289c21
Compare
Probably it's worth showing a confirmation modal window before sending the code to the server. I'm afraid someone might accidentally invoke this action, and some potentially proprietary code will immediately go to the server. In the modal window, we can also provide some information like "entire file |
@ortem done |
@@ -286,6 +286,7 @@ project(":") { | |||
exclude(module = "kotlin-stdlib") | |||
} | |||
testImplementation(project(":common", "testOutput")) | |||
testImplementation("com.squareup.okhttp3:mockwebserver:4.9.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, it's cool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except for several minor comments
src/main/kotlin/org/rust/ide/actions/ShareInPlaygroundAction.kt
Outdated
Show resolved
Hide resolved
It encapsulates helper code for checking network interactions via mock web server
636308b
to
e0f676a
Compare
bors r=ortem |
Build succeeded: |
Changes reflected in docs: https://plugins.jetbrains.com/plugin/8182-rust/docs/rust-quick-start.html#share-in-playground |
These changes:
Share in Playground
action to share your code in https://play.rust-lang.org/. The action correctly handles selected text in editor (i.e. share only selected text), current edition and toolchain channel.Rust
action group to have a single item in context menus for util Rust actions.Reformat File with Rustfmt
,Reformat Cargo Project with Rustfmt
,Rust REPL
,Share in Playground
are placed into this group as well asShow expanded Macro
actions. Also, the group is added toTools
menu.MockServerFixture
to help setting up mock web server in test to check network interactionsScreen.Recording.2020-12-28.at.02.39.43.mov
changelog: Introduce
Share in Playground
action to share your code in https://play.rust-lang.org/. You can invoke it viaTools | Rust | Share in Playground
or via context menu