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

Bug 250266

Summary: Straightforward black-box library implementation support
Product: [Modeling] QVTo Reporter: Radomil Dvorak <dvorak.radek>
Component: EngineAssignee: Radomil Dvorak <dvorak.radek>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 Keywords: plan
Version: 1.0   
Target Milestone: 2.0 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard: Usability

Description Radomil Dvorak CLA 2008-10-09 08:43:16 EDT
The current support of black-box libraries is tricky to setup, contains weird Metainfo class keeping type resolution info for operations.
This is a legacy feature from the inital contribution, kept as the only mechanism to plugin in external java coded libraries.

Provide pure (annotated) Java approach, to allow writing a java impl right away. IOW, deduce the OCL types from java binary types in operation signatures.

1) Use MDT defined OCL binary mapping of OCL collection types to Java collections, derive the OCL element type from the actual types of generics.

2) Make use of OCL defined Primitive types mapping to java binary types

3) The OCL type for user model elements can be derived by searching the 'instanceClass' attribute of EClassifiers in the referenced metamodel package, 
declared in the library extention point.

The approach above supports the most common usecases.

Eventually, for complementary info like param names, doc etc., java annotations 
can be used.
Comment 1 Radomil Dvorak CLA 2008-10-27 21:13:39 EDT
Committed.
Comment 2 Radomil Dvorak CLA 2008-10-28 04:29:41 EDT
Test: /org.eclipse.m2m.tests.qvt.oml/parserTestData/models/blackboxlib_annotation_java