Author Topic: Enable Brief emulation in Edit Perspective & Disable it in Debug Perspective  (Read 7389 times)

gfinlay

  • Community Member
  • Posts: 12
  • Hero Points: 1
I typically don't need the Brief emulation of SE Core for Eclipse when I am in an Eclipse Debug perspective -- only while I am in an Edit Perspective.
The problem I have is that the Brief bindings for function keys like F5, F6, etc conflict with the gdb debugger key bindings when I am in the Debug Perspective (see image below).  Is there a way that I can make the Brief keyboard bindings for SE only work in the Edit Perspective, and to use the default Eclipse gdb debugger bindings when I'm in the Debug Perspective?
 


Perhaps what I want could be done by using a keystroke that would toggle (enable/disable) Brief emulation on and off or switch temporarily to Eclipse default editor key bindings and back. Then I could use this keystroke when switching perspectives in Eclipse.


Any suggestions would be much appreciated.

Gordon



Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Unfortunately we don't currently have any type of listener for changing perspectives in Eclipse, so there's nothing I can really come up with right now that will be done automatically for you.  I can provide you with a somewhat hacky SlickC command which toggles between the standard Eclipse debug key bindings, and the default Brief key bindings for those same keys.

I didn't want to just change the emulation from Brief to Eclipse and back, because there are side effects of changing emulations in SlickEdit that you would most likely not want to keep happening.

If you save and load the attached test.e file (Macro > Load Module, browse to test.e) you can use the command toggle_debug_bindings to toggle the key bindings.  You can rename the command if you want.  You can bind the command to a key (just don't make it one of the affected key bindings in the command) so that you can quickly switch back and forth when debugging.  One thing to note is that the command cues off of the binding for F5, so if you have changed that binding from the default command for F5 in Brief (gui_find), you'll have to alter the macro slightly to get this to work.

Let me know if it works for you, and if you have any questions.  Hope this helps.

- Ryan

gfinlay

  • Community Member
  • Posts: 12
  • Hero Points: 1
Ryan,

Thanks for your help. I didn't have much luck with your macro. However, I did have success with Eclipse by using Window \ Customize Perspective while the Code Composer Studio "CCS Debug" perspective is the current perspective. I clicked on the Command Groups Availability tab, and unchecked the SlickEdit group so that the SlickEdit plugin is not active when in Debug perspective (modal). By doing this, I was able to get the F5 and F6 and other debug key bindings to work properly in CCS Debug perspective without any conflicts. The Brief mappings are still active while in the CCS Edit perspective.

Thanks
Gord

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
I wanted to try this out because I didn't know you could do this, but I can't get to work as it appears it's working for you :-\.  When you uncheck/disable the SlickEdit command groups for the Debug perspective, does that result in files not opening in the SlickEdit editor when debugging?  I'm not seeing that behavior...Eclipse still seems to remember what editor I've used to open certain files.  Just wanted to ask, in case I was missing something.

Glad you found a suitable workaround!

- Ryan