First up: Good Work, love the interface.
Now, there seems to be a problem with Copy & Paste (recorded using CTRL-C and CTRL-V), whereby the exception "org.eclipse.core.commands.NotEnabledException: Trying to execute the disabled command" is generated.
--Finished executing macro: myname2
Executing macro: myname2
--Executing command: Go to Previous Member
--Executing command: Select Next Element
--Executing command: Copy
org.eclipse.core.commands.NotEnabledException: Trying to execute the disabled command org.eclipse.ui.edit.copy
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:490)
at practicallymacro.commands.EclipseCommand.execute(EclipseCommand.java:57)
...
It may be significant that I have installed "MoreClipboard", which hooks into the CTRL-C and CTRL-V keys, although I got the same error after manually removing those key bindings.
My Eclipse version is kepler:
Eclipse Java EE IDE for Web Developers.
Version: Kepler Service Release 1
Build id: 20130919-0819
"eclipse-jee-kepler-SR1-win32-x86_64"
Anonymous
Hmm...I'm a little confused. It looks to me like "Go to Previous Member" and "select next element" aren't editor commands. What is the purpose of this macro? I am using an earlier version of Kepler (looks like 20130605), but I can play the editor copy command okay it looks like.
Hi Ernest
The purpose of the macro is to insert the string:
final String sMyName = "<name of="" member="" function="">";</name>
at the start of the method.
Goto previous member is the CTRL+SHIFT+UP editor action to put the cursor
on the previous member function.
Select next element is an editor method to highlight the next 'element',
which is not quite the same as SHIFT+RIGHT arrow, as the next element gets
the whole method name highlighted, rather than just the first word of the
method name.
Copy and paste is what I was using to try and get the method name in the
String declaration above.
Cheers.
On Sun, Dec 15, 2013 at 10:03 AM, Ernest ernestpasour@users.sf.net wrote:
Related
Bugs:
#17Okay, gotcha. I see the same error in my version of Kepler. Not sure why though. I tried editing the command to replace "Copy (Edit)" with "Copy (Styled text commands)". This seems to execute okay, so that's at least a workaround for macros that you plan to save and use multiple times.
I'm sure ctrl+C used to work (pre-Kepler), but it's been awhile since I used it. I will have to see if I can debug and figure out why it's going wrong. However, I can't guarantee a fix since Eclipse may have changed something under the covers that is a problem.
I have opened an Eclipse bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=424576
Also, I have hacked in a fix in my testbed...but I'm still trying to figure out if it is safe or if there are other commands that have a similar problem.
I have uploaded a new version to the update site that should fix this problem. Closing this bug.