Hey guys, what is the simplest way to get the foll...
# intellij-plugins
e
Hey guys, what is the simplest way to get the following behaviour: • a context menu/hotkey action which gets the string under the cursor in the kotlin code and replaces it with some other string + adds some content to the xml resource file in the project folder (it extracts string resource and replaces it with some code which will be generated by a gradle plugin [this generation already works])?
Looking into Flora plugin, but can’t find how to add a context menu item
b
I haven't played with Flora yet, but what you probably want is an Intention.
🔥 1
e
Thank you for the link! It really looks like a good start. Do you know how can I run the plugin from the sample? I built the project but don’t follow what should I do next.
b
After building the plugin you should find a zip in the build/dist folder. You can install that on your IDE in the plugins settings, "install from disk".
e
@bod I don’t have
dist
folder inside the build folder. Should I use some special gradle task to build? I’m building from IDE: Build->Build Project.
b
I'm not 100% sure if the sample is using the gradle plugin but if yes, then you should run
./gradlew buildPlugin
e
@bod That worked! Thank you so much.
b
Great! 🎉