Strange Del keystroke behavior [message #120777] |
Thu, 14 July 2005 07:17  |
Eclipse User |
|
|
|
Hi all,
I have subclassed the class
'org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEdito rPart' and added
a third page with an embedded GEF graphical editorpart. I have also
subclassed the corresponding ActionBarContributor class :
XMLMultiPageEditorActionBarContributor and provided a contributor for my new
editor page. The only action I contribute at present is the GEF
DeleteRegargetAction which I have attributed to the global action handler :
ActionFactory.DELETE.getId().
Now the following weird thing happens.
- If I add something to my GEF editor part and press the Del key, this added
thing is removed as expected.
- If I add something to the GEF editor part, switch to the XML source tab
and back to the GEF editor tab and then press the DEL key, the editor
deletes the character at the current location in the XML source tab.
- Strangely, if I add something to the GEF editor, switch to the XML source
tab, then to the XML design tab and finally back to the GEF editor tab, the
Del key behaves again as expected.
- Even more strangely, the Delete functionality available through the
Eclipse menu works in all three scenario's above as expected.
Would there be anyone here who has an idea what I am overlooking or where I
should go to fix this?
Regards,
Koen
|
|
|
|
Re: Strange Del keystroke behavior [message #120978 is a reply to message #120858] |
Fri, 15 July 2005 04:08  |
Eclipse User |
|
|
|
No I am using Eclipse 3.1, and WTP 0.7M5 with all its required drivers... As
a matter of fact I just found the problem and the solution I figured out
seems to work.
I found out that the setFocus method of the class
org.eclipse.ui.part.MultiPageEditorPart does all kinds of stuff with
INestableKeyBindingServices. So I basically did override the pageChange
method of the multipage editor and inserted following code when switching to
the GEF diagram page :
IKeyBindingService service = getSite().getKeyBindingService();
if (service instanceof INestableKeyBindingService) {
INestableKeyBindingService nestableService =
(INestableKeyBindingService) service;
nestableService.activateKeyBindingService(null);
}
This change seems to do the trick.
Regards,
Koen
|
|
|
Powered by
FUDForum. Page generated in 0.03179 seconds