Create coroutine/method from text selection


A feature that would bring the IDE closer to the BP editor would be the ability to create a coroutine/method from a section of highlighted text:

The user would right-click and select either ‘Create coroutine’ or ‘Create method’, on doing so, the highlighted text would be moved and the user would be prompted to enter a new name for the coroutine/method.
Where the hightlighted text was, a call to the new coroutine/method would be placed.
A modifier key could be used to take the user to the newly created coroutine/method’s definition.

The two options could be condensed into one as the preceeding _ could be used when naming to specify whether a coroutine or method is desired.

Addtionally, an similar option called ‘Insert’ (or somthing of that nature) could be added, it would allow the user to create a new coroutine/method in the editor window where the user right-clicked. The user would then be taken to the coroutine/methods definition like previously mentioned.
This would work better if it was given a keyboard shortcut.


I’ve been wanting to make this feature for ages! :madsci:

Most of the code is already written. :nerd_face:

We just haven’t prioritized it over basic IDE editor features. (Find in an edit control is going to be available in the next update for example.)

Creating a routine from a selection of text will be pretty slick. It should automatically figure out any needed parameters for you too and optionally replace the selection with a call to the new routine.

Since this is the first time someone has thought to publicly request it, I will bump up its priority.