Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » ParameterizedCommand not being executed after update to 4.3M4
ParameterizedCommand not being executed after update to 4.3M4 [message #998210] Wed, 09 January 2013 15:16 Go to next message
Emilio Sansano is currently offline Emilio Sansano
Messages: 2
Registered: December 2012
Junior Member
Hello,

I'm developing a pure e4 application. Working with eclipse 4.3M3 this code was working fine:

Map<String, String> parameter = new HashMap<String, String>();
ParameterizedCommand command;
String perspective_id = PERSPECTIVE_ID;
parameter.put(PARAMETER_SWITCHPERSPECTIVE_ID, perspective_id);
command = commandService.createCommand(COMMAND_SWITCHPERSPECTIVE_ID, parameter);
handlerService.executeHandler(command);


but now, after upgrading eclipse to 4.3M4, it doesn't work anymore. The method execute in the handler is not called:

public class SwitchPerspectiveHandler {
	@Execute
	public static void execute(@Named(PARAMETER_SWITCHPERSPECTIVE_ID) String perspective, MApplication app,
			EModelService modelService, EPartService partService) {
		MPerspective thisElement = (MPerspective) modelService.find(perspective, app);
		partService.switchPerspective(thisElement);
	}
}


Has the eclipse API been changed? How should I execute a command with a parameter?

Thank you.
Re: ParameterizedCommand not being executed after update to 4.3M4 [message #998587 is a reply to message #998210] Thu, 10 January 2013 09:57 Go to previous messageGo to next message
sumit singh is currently offline sumit singh
Messages: 131
Registered: October 2012
Location: Bangalore
Senior Member

Can you please rise a bug in https://bugs.eclipse.org/bugs/enter_bug.cgi
Re: ParameterizedCommand not being executed after update to 4.3M4 [message #998601 is a reply to message #998587] Thu, 10 January 2013 10:33 Go to previous message
Emilio Sansano is currently offline Emilio Sansano
Messages: 2
Registered: December 2012
Junior Member
Ok, bug submitted. https://bugs.eclipse.org/bugs/show_bug.cgi?id=397837]]

Best regards.

UPDATE: As Paul Webster points in the bug thread, to make it work again you only have to add this addon:
bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.HandlerProcessingAddon

to your model in the Application.e4xmi file.

[Updated on: Fri, 11 January 2013 14:37]

Report message to a moderator

Previous Topic:Creating a console view in the RCP Application
Next Topic:Dynamic menuitems in partmenu does not show up
Goto Forum:
  


Current Time: Wed Oct 01 16:15:57 GMT 2014

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

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