Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 487130 - Trigger for Command gets lost
Summary: Trigger for Command gets lost
Status: CLOSED DUPLICATE of bug 391344
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 4.5.1   Edit
Hardware: PC Windows 8
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: platform-runtime-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-03 09:56 EST by David Gonzalez CLA
Modified: 2016-02-03 15:41 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Gonzalez CLA 2016-02-03 09:56:02 EST
Hi there,

our product is based on Eclipse RCP and we have a problem we couldn't solve yet after a migration from Eclipse 3.7.2 to 4.5.1.

When calling command the trigger gets lost. Here is an example of the code we run to programmatically call a command:

ICommandService cmdService = (ICommandService) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(ICommandService.class);
Command cmd = cmdService.getCommand("commandId");
Parameterization param = new Parameterization(cmd.getParameter("parameterId"), "value");
ParameterizedCommand pc = new ParameterizedCommand(cmd, new Parameterization[] { param });
pc.executeWithChecks("Trigger", null);

In version 3.7.2 the handler gets the ExecutionEvent with the correct trigger object in its execute-Method. In version 4.5.1 the trigger in the ExecutionEvent is always null.

We need to set the trigger to determine who called the handler if it's called programmatically.

Hope you can help us with that!
David
Comment 1 Brian de Alwis CLA 2016-02-03 15:41:48 EST

*** This bug has been marked as a duplicate of bug 391344 ***