Macros

The current Macro functionality is too limited. First and foremost, it should be possible to edit a macro (as in an editor). Second, macros should be more than just a string of Idea actions. If while recording a macro I open a dialog (i.e. Introduce Variable) and I hit OK on the dialog I would expect to not have to hit OK when playing back the macro. It should be possible for macros to manipulate the dialogs' input values and also to invoke them. We need some basic variable support so that it's possible to create a macro that will create a test case class for the current class. In order to do that, your macro would need access to the current class name, package name, and info like that.

The macro functionality in MS Word is by far the best that I've ever seen, and anything that gets Idea closer to that level of functionality would be golden. Everything I've mentioned above is stuff that's been old hat in Word for many years.

2
Avatar
Permanently deleted user

It sounds like IDEA only allows the actions to 'launched' and doesn't allow for it's parameters to be serialized so they can be passed back to it later. The 'ReFormat Code' action, for example just fires off the dialog. The user's choice cannot be recorded for later playback because the actions did not support this behavior when they were originally created.

For this reason, if a macro were created to combine 'ReFormat Code' with 'optimize imports', the user would still have to interact with two dialogs. I don't see this as being especially useful (at least not nearly as useful as being able to record the user's feedback along with the action).

If the actions were retrofitted with new automation some manner of getting and setting user input information (eg. getUserInput() setUserInput()), then actions could be altered one-by-one to support this feature.

When recording macros, Actions that support this interface would ask 'would you like to record these settings'. Actions that don't yet support this feature would prompt the user at playback time (as macros do now).

I know it doesn't save any time, but it gives you a less painful migration path. And it give users much more useful macros.

0
Avatar
Permanently deleted user

And out of curiosity, what would you suggest the editing language be?

R

Paul Bradshaw wrote:

More than just word... Visual Studio does the same thing. You record a
"macro" and can bind it, but if you want to edit it, it's vbscript just like
in Word.

"Kirk Woll" <kirk@digimax.com> wrote in message
news:18273856.1059077945227.JavaMail.itn@is.intellij.net...

>>Sure, call it by a different name. It's semantics. As I stated before, I


was using Word as my previous experience with macros and that is in fact
what they called this functionality. If you want to reserve the word
"macro" for what Idea currently does that's fine.


0
Avatar
Permanently deleted user

Robert S. Sfeir wrote:

And out of curiosity, what would you suggest the editing language be?


It could be JavaScript. A language which many has experience with and
that has good and simple Java bindings. There's a JavaScript
interpreter/compiler for and in Java at http://www.mozilla.org/rhino/

/Daniel

0

I have two use cases that could use some macro help:
1.- generated-sources is not being marked as generated sources directory: I have to go one by one of the components marking the folders as generated-sources because there is no way to mark them all at once automatically. I cant edit the pom.xml because it does not belong to me, neither does the code... (Waste of my time #1, a few hours once every few weeks)

2.- I have to mvn clean install, import mvn config, convert to exploded jar, start web logic, deploy. I need to separate the first 3 steps, cant do it on a macro, so either I have them on my debug pipeline always or I do them manually (waste of time #2 I can't have both pipelines separated, this is every time I deal with web logic, every day u.u ). 

0

请先登录再写评论。