Bug 428348 - [Commands] parameters in converters (for commands) needs compatibility layer
Summary: [Commands] parameters in converters (for commands) needs compatibility layer
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-17 07:32 EST by Beat Schaller CLA
Modified: 2016-02-22 12:44 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Beat Schaller CLA 2014-02-17 07:32:34 EST
As described in Eclipse 4 forum 
http://www.eclipse.org/forums/index.php/mv/tree/648658/

If I want to define a command with parameter and converter (AbstractParameterValueConverter) I have to define the extension point org.eclipse.ui.commands. In the model editor I have only the possibility to define the TypeId but not the converter.

For a pure Eclipse 4 application it's not a way to define the extension point because org.eclipse.ui... needs the compytibility layer.
Comment 1 Peter Schulz CLA 2015-02-26 08:06:54 EST
Hi, it's possible to define a ParameterType programmatically like so:

final Command command = this.commandService.getCommand(ENABLE);
final IParameter parameter = command.getParameter(ENABLE_PARAMETER);
final ParameterType parameterType = command.getParameterType(ENABLE_PARAMETER);
if (parameterType != null) {           
    parameterType.define(java.lang.Boolean.class.getCanonicalName(), new BooleanParameterValueConverter());
}

However, that is only possible if the TypeID has been set for the parameter.

Instead of TypeID, which is no longer used, I'd prefer a class URI pointing to an implementation of org.eclipse.core.commands.AbstractParameterValueConverter. What do you think?
Comment 2 Milankumar Ardeshana CLA 2016-02-22 07:46:47 EST
Without extention point in pure e4 application i can create parametrized command with object and execute it with help of AbstractParameterValueConverter

Reference : https://github.com/kirillzotkin/DomainWorkbench
Comment 3 Milankumar Ardeshana CLA 2016-02-22 12:44:18 EST
Sorry that was not complete e4 approach, here u can have a look. http://wp.me/p7dtOH-24.