Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Problem with command handlers
Problem with command handlers [message #684544] Wed, 15 June 2011 19:15 Go to next message
Olli Aalto is currently offline Olli AaltoFriend
Messages: 2
Registered: June 2011
Junior Member
Hi!

I'm trying to create a simple application with the latest e4 on the latest eclipse 4.1.
I've added a menubar to my window and written and configured handlers for the menuitems. Now when I run the application I get a ClassNotFoundException for each handler I have.

I don't have this problem when running the generated example e4 application project.

I've tried using both handled menuitems and direct menuitems. What's the difference between those anyway?

Any ideas why my handler classes are not found at runtime? It's a single plugin project.
Re: Problem with command handlers [message #685741 is a reply to message #684544] Sat, 18 June 2011 23:07 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

What does your handler URI look like in your model?

Check out the org.eclipse.e4.demo.contacts project for an example of an e4 RCP app that uses handlers.

:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse
e4/org.eclipse.e4.ui/examples/org.eclipse.e4.demo.contacts

Handled menu items and tool items refer to using commands, similar to the pattern in 3.x although the implementation is completely different.

A direct menu item is basically a step above an SWT.Selection event. The renderers wire the event directly to an @Execute call. No chance to change handlers, no keybindings, nothing. Just SWT.Selection -> @Execute.

PW


Re: Problem with command handlers [message #686356 is a reply to message #685741] Wed, 22 June 2011 04:58 Go to previous message
Olli Aalto is currently offline Olli AaltoFriend
Messages: 2
Registered: June 2011
Junior Member
Tried again and now it works. I don't think I did anything else than restarted eclipse. Maybe it was a build error or something, as it was a ClassNotFoundException that was thrown.

Thanks for the clarification on the handled and direct menuitems.
Previous Topic:Contribute from a fragment to a component in application
Next Topic:org.eclipse.ui.preferencePages example
Goto Forum:
  


Current Time: Sat Dec 20 11:32:23 GMT 2014

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

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