Menu

#17 Copy and Paste "NotEnabledException: Trying to execute the disabled command""

v1.0_(example)
closed
Ernest
None
8
2014-08-18
2013-12-12
No

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"

Related

Bugs: #17

Discussion

  • Ernest

    Ernest - 2013-12-14

    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.

     
    • Malcolm Boekhoff

      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:

      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.


      Status: open
      Created: Thu Dec 12, 2013 03:13 AM UTC by Malcolm Boekhoff
      Last Updated: Thu Dec 12, 2013 03:13 AM UTC
      Owner: nobody

      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"

      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/practicalmacro/bugs/17/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #17

  • Ernest

    Ernest - 2013-12-15

    Okay, 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.

     
  • Ernest

    Ernest - 2013-12-22

    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.

     
  • Ernest

    Ernest - 2013-12-28

    I have uploaded a new version to the update site that should fix this problem. Closing this bug.

     
  • Ernest

    Ernest - 2013-12-28
    • status: open --> closed
    • assigned_to: Ernest
    • Priority: 5 --> 8
     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.