Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337717

Summary: Allow setting Parameter values via a Map<String, Object>
Product: [Modeling] EMFT.Henshin Reporter: Felix Rieger <riegerf>
Component: InterpreterAssignee: Enrico Biermann <enrico>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Felix Rieger CLA 2011-02-21 08:38:04 EST
Currently, Parameters can be passed to RuleApplications/UnitApplications via either:
1) setParameterValue(String, Object)
2) setParameterValues(Map<Parameter, Object>)

(1) searches for a named Parameter and sets its value
(2) has to be given the actual Parameter objects, which have to be created or extracted from the Rule/Unit first, making setting multiple Parameters at once somewhat cumbersome.

I suggest introducing a new method to allow setting multiple parameters at once (as in (2), but using a Map<String,Object>), by just using their names, as in (1).
Comment 1 Enrico Biermann CLA 2011-03-01 04:40:54 EST
I replaced setParameterValues(Map<Parameter,Object>) with setParameterValues(Map<String,Object>). The former method was too cumbersome to use anyway.