Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361823 - [Restructuring] eFacet2 meta-model
Summary: [Restructuring] eFacet2 meta-model
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EMF-Facet (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P1 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Nicolas Bros CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 361897
Blocks: 352718 361794
  Show dependency tree
 
Reported: 2011-10-24 11:48 EDT by Nicolas Bros CLA
Modified: 2020-05-01 11:26 EDT (History)
3 users (show)

See Also:
gdupe: juno+


Attachments
org.eclipse.emf.facet.custom.metamodel initial contribution (61.89 KB, application/zip)
2011-10-26 07:56 EDT, Gregoire Dupe CLA
gdupe: iplog+
Details
org.eclipse.emf.facet.custom.core initial contribution (8.63 KB, application/zip)
2011-10-26 07:58 EDT, Gregoire Dupe CLA
gdupe: iplog+
Details
org.eclipse.emf.facet.custom.ui initial contribution (14.04 KB, application/zip)
2011-10-26 08:00 EDT, Gregoire Dupe CLA
gdupe: iplog+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Bros CLA 2011-10-24 11:48:34 EDT
There is a new version of the Facet metamodel which we call eFacet2, and which brings the following main changes:
- Facet features (attributes, references and operations) directly contain their queries
- Queries become a second-level concept (no more QuerySets), that are only used through Facet attributes, references and operations
- Facets can now contain operations in addition to attributes and references
- The source type of a query is automatically inferred from its containing Facet's extended metaclass
- The return type of a query is automatically inferred from the query's parent Facet attribute, reference or operation


This bug tracks modifications of this metamodel.
Comment 1 Gregoire Dupe CLA 2011-10-25 05:01:34 EDT
Hello,

In revision 1012, there is a problem in the file /org.eclipse.emf.facet.efacet2/plugin.xml. The URI http://www.eclipse.org/emf/facet/efacet/0.2.incubation/efacet/declaration refers to a removed ePackage and the ePackage http://www.eclipse.org/emf/facet/efacet/0.2.incubation/efacet/ in not declared.

Regards,
Grégoire
Comment 2 Gregoire Dupe CLA 2011-10-25 05:17:53 EDT
Hello,

1) I need an x-friend from org.eclipse.emf.facet.efacet2.efacet.impl to org.eclipse.emf.facet.custom.metamodel.

2) The plug-in org.eclipse.emf.facet.efacet2 should be named org.eclipse.emf.facet.efacet2.metamodel.

Regards,
Grégoire
Comment 3 Gregoire Dupe CLA 2011-10-25 09:56:54 EDT
DerivedTypedElement should refer only one Query. The query will have to be able to deal with a set behavior and a get behavior.
Comment 4 Nicolas Bros CLA 2011-10-25 10:49:54 EDT
> DerivedTypedElement should refer only one Query. The query will have to be able
> to deal with a set behavior and a get behavior.
Fixed in revision 1020.

>In revision 1012, there is a problem in the file
>/org.eclipse.emf.facet.efacet2/plugin.xml
Fixed in revision 1021.

>I need an x-friend from org.eclipse.emf.facet.efacet2.efacet.impl to
>org.eclipse.emf.facet.custom.metamodel.
x-friend added in revision 1022.

>The plug-in org.eclipse.emf.facet.efacet2 should be named
>org.eclipse.emf.facet.efacet2.metamodel.
refactoring done in revisions 1023 to 1027.
Comment 5 Gregoire Dupe CLA 2011-10-25 11:15:45 EDT
There still have 2 warning on the plug-in. Warning must be disable on EMF generated code (in  the plug-in properties).
Comment 6 Gregoire Dupe CLA 2011-10-25 11:26:52 EDT
(In reply to comment #4)

One of those commits braked the build cf. https://hudson.eclipse.org/hudson/job/emffacet-nightly/522/
Comment 7 Gregoire Dupe CLA 2011-10-26 07:56:19 EDT
Created attachment 205976 [details]
org.eclipse.emf.facet.custom.metamodel initial contribution

Here is the EMF implementation of the new customization meta-model.

(a) I, Gregoire Dupe, wrote 100% of the code I've provided.
(b) I have the right to contribute the code to Eclipse.
(c) I contribute the content under the EPL.
(d) This contribution contains no Cryptography features.
Comment 8 Gregoire Dupe CLA 2011-10-26 07:58:44 EDT
Created attachment 205977 [details]
org.eclipse.emf.facet.custom.core initial contribution

Here is the the initial contribution of the org.eclipse.emf.facet.custom.core. Only API have been provided (no implementation).

(a) I, Gregoire Dupe, wrote 100% of the code I've provided.
(b) I have the right to contribute the code to Eclipse.
(c) I contribute the content under the EPL.
(d) This contribution contains no Cryptography features.
Comment 9 Gregoire Dupe CLA 2011-10-26 08:00:43 EDT
Created attachment 205978 [details]
org.eclipse.emf.facet.custom.ui initial contribution

Here is the the initial contribution of the org.eclipse.emf.facet.custom.ui. Only API have been provided (no implementation).

(a) I, Gregoire Dupe, wrote 100% of the code I've provided.
(b) I have the right to contribute the code to Eclipse.
(c) I contribute the content under the EPL.
(d) This contribution contains no Cryptography features.
Comment 10 Gregoire Dupe CLA 2011-10-26 08:18:22 EDT
Comment on attachment 205977 [details]
org.eclipse.emf.facet.custom.core initial contribution

I've committed this plug-in.

Committed revision 1032.
Comment 11 Gregoire Dupe CLA 2011-10-26 08:19:47 EDT
Comment on attachment 205976 [details]
org.eclipse.emf.facet.custom.metamodel initial contribution

I've committed this plug-in.

Committed revision 1034.
Comment 12 Gregoire Dupe CLA 2011-10-26 08:21:07 EDT
Comment on attachment 205978 [details]
org.eclipse.emf.facet.custom.ui initial contribution

I've committed this plug-in.

Committed revision 1036.
Comment 14 Nicolas Bros CLA 2011-10-26 09:22:15 EDT
I finished work on the metamodel in revision 1039, at least until the rest of the features that depend on this metamodel exhibit a need for further modifications.

So I'm marking this bug as fixed for now.
Comment 15 Nicolas Bros CLA 2011-10-26 10:59:05 EDT
I noticed that in order for the Query extension mechanism to work, implementors must create a new metamodel with a new metaclass that extends Query. When doing that, the implementation generated by EMF makes the new metaclass's Java class extend QueryImpl. That means QueryImpl must also be in the API.
So, in order to avoid exposing the whole metamodel implementation, I isolated "Query" in a new "extensible" sub-package of the efacet metamodel.

Also, in order to clean up the metamodel, I removed the metaclasses "Literal" and "OppositeReference", that are not yet clearly defined.

And for more consistency, I renamed "QueryResult" to "DerivedTypedElementResult", to better convey its new purpose, which is to represent the result of evaluating the value of a DerivedTypedElement, which is incidentally computed by a query.
And DerivedTypedElementResult now points to a DerivedTypedElement instead of a Query (which can be found on the DerivedTypedElement).

Committed in revision 1041.
Comment 16 Nicolas Bros CLA 2011-11-03 06:33:10 EDT
In revision 1048, I added AbstractDerivedTypedElementResult and two concrete sub-classes with a generic type parameter to correctly type both multiplicity-one and multiplicity-many results.

In revision 1056, I added metamodel documentation and a DocumentedElement metaclass, so that elements from the Facet metamodel can be documented.
Comment 17 Nicolas Bros CLA 2011-11-04 11:31:43 EDT
In revision 1059 I modified the serialization package of the eFacet2 metamodel to be able to serialize both single- and multi-valued attributes and references.
Comment 18 Nicolas Bros CLA 2011-12-05 12:03:19 EST
I renamed org.eclipse.emf.facet.efacet2.metamodel to org.eclipse.emf.facet.efacet.metamodel, and I added a version suffix to the ecore and genmodel files and the generated packages, in order to follow the new EMF Facet conventions.
Committed in revisions 1221, 1222, 1223.
Comment 19 Nicolas Bros CLA 2011-12-06 05:00:49 EST
In revision 1226, I fixed the reference to the metamodel in "org.eclipse.emf.facet.common.feature/feature.xml".
Comment 20 Gregoire Dupe CLA 2012-05-23 07:49:24 EDT
This bug can be marked as closed.