Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365429 - DerivedTypedElementManager : re-implement batch evaluation
Summary: DerivedTypedElementManager : re-implement batch evaluation
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EMF-Facet (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-02 08:49 EST by Nicolas Bros CLA
Modified: 2020-05-01 11:26 EDT (History)
1 user (show)

See Also:
gdupe: juno+
gdupe: luna+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.