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

Bug 365429

Summary: DerivedTypedElementManager : re-implement batch evaluation
Product: z_Archived Reporter: Nicolas Bros <nicolas.bros>
Component: EMF-FacetAssignee: Project Inbox <emft.facet-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P2 CC: gdupe
Version: unspecifiedFlags: gdupe: juno+
gdupe: luna+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Nicolas Bros CLA 2011-12-02 08:49:14 EST
When the IDerivedTypedElementManager interface was simplified, the implementation was broken. I have fixed the evaluation on single elements, but I have disabled the batch evaluation for now since it does not have priority.

What's more, there is a problem with IDerivedTypedElementManager#batchEvaluate :
It is not possible to assign the result to a typed list, so we get a warning from the compiler:

List<DerivedTypedElementPrimitiveTypeResult> result = IDerivedTypedElementManager.INSTANCE.batchEvaluate(
  derivedTypedElement, sourceCollection, null, 
  DerivedTypedElementPrimitiveTypeResult.class);

=> DerivedTypedElementPrimitiveTypeResult is a raw type. References to generic type DerivedTypedElementPrimitiveTypeResult<T> should be parameterized

And if we try to use a wildcard, we get an error this time, because the lvalue is not a subtype of AbstractDerivedTypedElementResult anymore, because AbstractDerivedTypedElementResult is not parameterized with a generic type:

List<DerivedTypedElementPrimitiveTypeResult<?>> result = IDerivedTypedElementManager.INSTANCE.batchEvaluate(
  derivedTypedElement, sourceCollection, null,
  derivedTypedElementPrimitiveTypeResult.class);

=> Type mismatch: cannot convert from List<DerivedTypedElementPrimitiveTypeResult> to List<DerivedTypedElementPrimitiveTypeResult<?>>

I think we should add a type parameter to AbstractDerivedTypedElementResult in the metamodel.