Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Re: Accelerate Keys (CTRL+C,CTRL+V,CTRL+X) of Text widget do not work in MultipageEditorPart
Re: Accelerate Keys (CTRL+C,CTRL+V,CTRL+X) of Text widget do not work in MultipageEditorPart [message #252953] Tue, 15 June 2004 23:29 Go to next message
Eclipse UserFriend
Can somebody help? The original code is generated by EMF. What should do?
Should I add keylistener to the Text widget? But I think there must be a
simple way to do this, because accelerate keys are automatically enabled
when create a Text widget in a shell or WizardPage. How come it doesn't work
in MultipageEditorPart?
"Hank" <hzhou@actuate.com> wrote in message news:calicn$qfl$1@eclipse.org...
> Followed is the sample code. Accelerate keys do not work on "userText",
but
> the popup menu when right clicking the mouse can work.
> ---------------------------------------------------
> public class TestEditor
> extends MultiPageEditorPart
> implements IEditingDomainProvider, ISelectionProvider, IMenuListener
> {
> Text userText;
> ...
> public void createPages()
> {
> Composite composite = new Composite(getContainer(), SWT.NONE);
> GridLayout layout = new GridLayout();
> composite.setLayout(layout);
> layout.numColumns = 2;
>
> userText = new Text(composite, SWT.BORDER);
> userText.setVisible(true);
> userText.setEnabled(true);
> int index = addPage(composite);
> setPageText(index, "MyPage");
> setActivePage(index);
> }
> ...
> }
> ----------------------------------------------------------
>
> "Douglas Pollock" <douglas.pollock@magma.ca> wrote in message
> news:caks1c$1do$2@eclipse.org...
> > eclipse.platform wrote:
> > > I created a page (a Composit) in MultipageEditorPart, and added some
> Text
> > > to the page. But "CTRL+C", "CTRL+V" and other accelerate keys do not
> work
> > > on the Texts I added. Why?
> > > And it is wierd that it works well when right clicking the mouse, and
> > > choose "Copy"/"Paste" on the popup menu.
> > > What should I do to make those Texts respond to key events?
> >
> > Could you please attach some sample code showing the problem?
> >
> >
> >
> > cheers,
> > d.
>
>
Re: Accelerate Keys (CTRL+C,CTRL+V,CTRL+X) of Text widget do not work in MultipageEditorPart [message #253860 is a reply to message #252953] Fri, 18 June 2004 08:57 Go to previous message
Eclipse UserFriend
Originally posted by: douglas.pollock.magma.ca

Hank wrote:
> Can somebody help? The original code is generated by EMF. What should do?
> Should I add keylistener to the Text widget? But I think there must be a
> simple way to do this, because accelerate keys are automatically enabled
> when create a Text widget in a shell or WizardPage. How come it doesn't
> work in MultipageEditorPart?

Which version of Eclipse are you running?

I would recommend looking at the PDEFormEditor code. I worked with Dejan to
make sure that it works properly for cut/copy/paste/selectAll.

The tricky bits were the contributor, and to make sure that the
INestableKeyBindingService switching code is triggered properly.

Running with the UI tracing options on is a good way to see which handlers
are being considered as active. Putting breakpoints in KeyBindingService
is another good way to detect problems.



d.
Previous Topic:Eclipse 2.1.2 IAction.setAccelerator
Next Topic:"NoClassDefFoundError" despite of plugin dependencies
Goto Forum:
  


Current Time: Tue Jul 22 03:28:26 EDT 2025

Powered by FUDForum. Page generated in 0.29105 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top