Bug 422269 - ExecutionContext does not provide an interface to set config properties
Summary: ExecutionContext does not provide an interface to set config properties
Status: NEW
Alias: None
Product: QVTo
Classification: Modeling
Component: Engine (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-21 11:24 EST by Christopher Gerking CLA
Modified: 2014-04-25 02:54 EDT (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 Christopher Gerking CLA 2013-11-21 11:24:18 EST
The interface org.eclipse.m2m.qvt.oml.ExecutionContext does not contain a method to set a config property. The implementation class ExecutionContextImpl provides such a method, but requires explicit type casting to make it accessible. Let's extend the ExecutionContext interface.
Comment 1 Christopher Gerking CLA 2014-04-14 15:27:30 EDT
Fixed as part of the patch for bug 391289. Besides setConfigProperty, also pulled up setLog to class ExecutionContext.
Comment 2 Sergey Boyko CLA 2014-04-15 06:50:30 EDT
(In reply to Christopher Gerking from comment #0)
> The interface org.eclipse.m2m.qvt.oml.ExecutionContext does not contain a
> method to set a config property. The implementation class
> ExecutionContextImpl provides such a method, but requires explicit type
> casting to make it accessible. Let's extend the ExecutionContext interface.

To me moving of setter methods into ExecutionContext interface is a questionable design. 
Methods setConfigProperty(), setLog(), setProgressMonitor() are used only upon context creation thus right after 'new ExecutionContextImpl()' expression. No type cast is needed (and in fact there wasn't any). 
Mentioned setters are not used during workflow. They just clutter ExecutionContext interface making the alternative implementation more difficult (like making the anonymous class instance of ExecutionContext).
Comment 3 Christopher Gerking CLA 2014-04-25 02:54:01 EDT
(In reply to Sergey Boyko from comment #2)
> Methods setConfigProperty(), setLog(), setProgressMonitor() are used only
> upon context creation thus right after 'new ExecutionContextImpl()'
> expression.

Not necessarily right after the creation. If the setter methods are called from a different place than the instantiation, this requires to pass the context using an ExecxutionContextImpl parameter. This reads quite strange, especially from the EMF viewpoint. Not a big deal, though.