[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Re: Limit Copy, Paste, Cut keyboard shortcuts to EMF tree only (not the entire editor)

Kind of makes your head spin. I know.

The original EMF templates are not enabled to create an EMF editor with Eclipse forms. However, with some support from this newsgroup, this is made possible. This improvement with the Eclipse forms puts a constraint to the copy, cut, paste EMF actions as their keyboard shortcuts must be bound to the tree area only.
Before, the properties view was used to input the model's attributes which was outside the editor's scope and the EMF actions's keyboard shortcuts did not apply. Since one might choose not to use the the properties view and customize an EMF-enabled editor, this keyboard shortcut problem can happen to others.

Mircea


Ed Merks wrote:
Mircea,

Gosh, I don't have a lot of experience with this type of thing.   I hope someone else has some clue, because I won't even know where to begin.  Maybe Tom will read this and have an idea...


M. Luchian wrote:
Hello,

The EditingDomainActionBarContributor.java class defined in the EMF plugins overrides the Windows CUT/COPY/PASTE actions' keyboard shortcuts (CTRL-X, CTRL-C, CTRL-V) with EMF's own.

This is correct as long as the actions are performed on the tree. However, I implemented an editor based on eclipse forms, with text widgets (Windows native) handling the COPY CUT PASTE actions with a right click of a mouse. As the mouse actions work fine and interact with the windows' clipboard, pressing the keyboard shortcuts for the same actions in the text widgets will call the actions reserved by EMF ... This is problematic as the CTRL-X, CTRL-C, CTRL-V shortcuts are overridden with the EMF copy, cut, paste actions for the entire editor.

Is there a possible way to register the actions for the editor's tree only? (See picture)



I have a CustomEditingDomainActionBarContributor.java replacing a few small things from the original EditingDomainActionBarContributor.java class, but I don't want to manage the registering / unregistering the copy, cut and paste actions when the tree is in focus or not.

Any help appreciated

Thanks,

Mircea