Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » simple text field widget does not work(at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.isPartialMatch(KeyBindingDispatcher.java:462))
simple text field widget does not work [message #1032071] Tue, 02 April 2013 10:32 Go to next message
Eclipse UserFriend
In my try to move an 3.x RCP Application to 4 I managed to bump into another issue. I created a simple test part with a simple Text on it. When I start the application, it displays fine and does not show any errors. But when I try typing in the field I get a null pointer in the KeyBindingDispatcher.

my code:

public class DpeEditorPart {
	
	private Text someText;

	@PostConstruct
	public void createPartControl(Composite parent) {
        parent.setLayout(new GridLayout(3, false));
        someText = new Text(parent, SWT.BORDER);

        someText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
        
    }	
@Focus
    private void setFocus(IEclipseContext context) {
       // someText.setFocus();
    }
}


the problem seams to be that the call below in the
org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher

returns null here:

private EBindingService getBindingService() {
		if (bindingService == null) {
			bindingService = (EBindingService) context.get(EBindingService.class.getName());
		}
		return bindingService;
	}



Which might be, because this service is never put into the context. My guess is, that I missed some dependencies/imports here...?

Thanks.
Re: simple text field widget does not work [message #1032074 is a reply to message #1032071] Tue, 02 April 2013 10:37 Go to previous messageGo to next message
Eclipse UserFriend
Well not quite sure if I'm correct, but it seems you are missing some addons. Especially the BindingServiceAddon. How did you create your sample application? Using a wizard or from scratch?

Some information on the addons can be found here: http://www.vogella.com/articles/EclipseRCP/article.html#modeladdons_standard
Re: simple text field widget does not work [message #1032077 is a reply to message #1032074] Tue, 02 April 2013 10:43 Go to previous messageGo to next message
Eclipse UserFriend
Well, that is exactly the thing bothering me. When I create a sample application with the wizard and simply add a field, it works. But when I use my application which I want to move from 3.x to 4 it doesn't.
Re: simple text field widget does not work [message #1032079 is a reply to message #1032077] Tue, 02 April 2013 10:44 Go to previous messageGo to next message
Eclipse UserFriend
Then the addons seem to be missing. Try to compare the addons section of your application model with the one created by the wizard.
Re: simple text field widget does not work [message #1032085 is a reply to message #1032079] Tue, 02 April 2013 10:51 Go to previous message
Eclipse UserFriend
Solved... the addons your were right. THANKS! ... Smile
Previous Topic:How to manage the parts
Next Topic:performance problems with editor
Goto Forum:
  


Current Time: Wed Jul 23 16:40:16 EDT 2025

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

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

Back to the top