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

Bug 352618

Summary: [Restructuring] To be able to use non derived facet structural features and save them values.
Product: z_Archived Reporter: Gregoire Dupe <gdupe>
Component: EMF-FacetAssignee: Nicolas Bros <nicolas.bros>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P2 CC: erouille, jim.van.dam, nicolas.bros, roman.porotnikov
Version: unspecifiedFlags: gdupe: juno+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 352718    
Attachments:
Description Flags
New plug-in org.eclipse.emf.facet.efacet2
nicolas.bros: iplog+, nicolas.bros: review+
New plug-in org.eclipse.emf.facet.efacet2.examples.library
nicolas.bros: iplog+, nicolas.bros: review+
New plug-in org.eclipse.emf.facet.efacet2.examples
none
fix
nicolas.bros: iplog+, nicolas.bros: review+
fix
nicolas.bros: iplog+, nicolas.bros: review+
fix
nicolas.bros: iplog+, nicolas.bros: review+
fix
nicolas.bros: iplog+, nicolas.bros: review+
fix
nicolas.bros: iplog+, nicolas.bros: review+
New plug-in org.eclipse.emf.facet.efacet2.tests nicolas.bros: iplog+, nicolas.bros: review+

Description Gregoire Dupe CLA 2011-07-20 11:39:21 EDT
We need to be able to use non derived facet structural features and save them values.
Comment 1 Gregoire Dupe CLA 2011-07-21 04:52:25 EDT
*** Bug 346650 has been marked as a duplicate of this bug. ***
Comment 2 Emmanuelle Rouillé CLA 2011-07-22 09:32:39 EDT
Created attachment 200182 [details]
New plug-in org.eclipse.emf.facet.efacet2
Comment 3 Emmanuelle Rouillé CLA 2011-07-22 09:36:02 EDT
Hello,

The plug-in org.eclipse.emf.facet.efacet2 was added in the previous attachment (attachment 200182 [details]) to fix this bug. This is a new facet metamodel. It has been created in collaboration with Nicolas Guyomar who added classes ContainementReferenceInstance and AbstractReferenceInstance to be able to use "containment facet references".

(a) I, Emmanuelle Rouillé, 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.

Regards,
Emmanuelle Rouillé
Comment 4 Emmanuelle Rouillé CLA 2011-07-22 09:41:41 EDT
Created attachment 200185 [details]
New plug-in org.eclipse.emf.facet.efacet2.examples.library

Here is a new plug-in to fix this bug. This is a metamodel of library. It is useful to create tests cases. It has been created in collaboration with Nicolas Guyomar who modified toString() methods in order to allow a comparison between two files.

(a) I, Emmanuelle Rouillé, 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.

Regards,
Emmanuelle Rouillé
Comment 5 Emmanuelle Rouillé CLA 2011-07-22 09:50:14 EDT
Created attachment 200186 [details]
New plug-in org.eclipse.emf.facet.efacet2.examples

Here is a new plug-in containing examples of models conformed to the new facet metamodel and to the library metamodel. 

(a) I, Emmanuelle Rouillé, 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.

Regards,
Emmanuelle Rouillé
Comment 6 Emmanuelle Rouillé CLA 2011-07-22 10:29:29 EDT
Created attachment 200193 [details]
fix

Here is a patch to fix this bug. It contains the code to serialize the extension of a model with facets. It also contains code to apply a non-derived facet element to an eObject and to get its value. Classes referencing the previous version of the facet metamodel have also been duplicated when needed, in order to reference the new facet metamodel. 

(a) I, Emmanuelle Rouillé, 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.

Regards,
Emmanuelle Rouillé
Comment 7 Emmanuelle Rouillé CLA 2011-07-22 10:34:47 EDT
Created attachment 200196 [details]
fix

Here is a patch to fix this bug. It contains a duplication of the javaquery metamodel, which refers to the previous version of the facet metamodel in order to refer to the new facet metamodel. 

(a) I, Emmanuelle Rouillé, 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.

Regards,
Emmanuelle Rouillé
Comment 8 Emmanuelle Rouillé CLA 2011-07-22 10:37:41 EDT
Created attachment 200197 [details]
fix

Here is a patch to fix this bug. Classes referencing the previous version of the facet metamodel have been duplicated when needed, in order to reference the new facet metamodel. 

(a) I, Emmanuelle Rouillé, 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.

Regards,
Emmanuelle Rouillé
Comment 9 Emmanuelle Rouillé CLA 2011-07-22 10:40:25 EDT
Created attachment 200199 [details]
fix

Here is a patch to fix this bug. It contains a duplication of the efacetcatalog
metamodel, which refers to the previous version of the facet metamodel in order
to refer to the new facet metamodel. 

(a) I, Emmanuelle Rouillé, 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.

Regards,
Emmanuelle Rouillé
Comment 10 Emmanuelle Rouillé CLA 2011-07-22 10:42:56 EDT
Created attachment 200200 [details]
fix

Here is a patch to fix this bug. Code has been modified in order to return the bundle associated with a resource. 

(a) I, Emmanuelle Rouillé, 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.

Regards,
Emmanuelle Rouillé
Comment 11 Emmanuelle Rouillé CLA 2011-07-22 10:47:01 EDT
Created attachment 200201 [details]
New plug-in org.eclipse.emf.facet.efacet2.tests

Here is a new plug-in providing unit tests for this bug.

(a) I, Emmanuelle Rouillé, 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.

Regards,
Emmanuelle Rouillé
Comment 12 Nicolas Bros CLA 2011-09-22 09:49:35 EDT
Comment on attachment 200182 [details]
New plug-in org.eclipse.emf.facet.efacet2

This is a contribution from an employee of Mia-Software, targeting a future
Juno release. The company has signed a Member Committer Agreement. The
contribution does not need a CQ (see bug 322327).
Comment 13 Nicolas Bros CLA 2011-09-22 09:49:44 EDT
Comment on attachment 200185 [details]
New plug-in org.eclipse.emf.facet.efacet2.examples.library

This is a contribution from an employee of Mia-Software, targeting a future
Juno release. The company has signed a Member Committer Agreement. The
contribution does not need a CQ (see bug 322327).
Comment 14 Nicolas Bros CLA 2011-09-22 09:49:50 EDT
Comment on attachment 200193 [details]
fix

This is a contribution from an employee of Mia-Software, targeting a future
Juno release. The company has signed a Member Committer Agreement. The
contribution does not need a CQ (see bug 322327).
Comment 15 Nicolas Bros CLA 2011-09-22 09:49:54 EDT
Comment on attachment 200196 [details]
fix

This is a contribution from an employee of Mia-Software, targeting a future
Juno release. The company has signed a Member Committer Agreement. The
contribution does not need a CQ (see bug 322327).
Comment 16 Nicolas Bros CLA 2011-09-22 09:49:56 EDT
Comment on attachment 200197 [details]
fix

This is a contribution from an employee of Mia-Software, targeting a future
Juno release. The company has signed a Member Committer Agreement. The
contribution does not need a CQ (see bug 322327).
Comment 17 Nicolas Bros CLA 2011-09-22 09:49:59 EDT
Comment on attachment 200199 [details]
fix

This is a contribution from an employee of Mia-Software, targeting a future
Juno release. The company has signed a Member Committer Agreement. The
contribution does not need a CQ (see bug 322327).
Comment 18 Nicolas Bros CLA 2011-09-22 09:50:01 EDT
Comment on attachment 200200 [details]
fix

This is a contribution from an employee of Mia-Software, targeting a future
Juno release. The company has signed a Member Committer Agreement. The
contribution does not need a CQ (see bug 322327).
Comment 19 Nicolas Bros CLA 2011-09-22 09:50:05 EDT
Comment on attachment 200201 [details]
New plug-in org.eclipse.emf.facet.efacet2.tests

This is a contribution from an employee of Mia-Software, targeting a future
Juno release. The company has signed a Member Committer Agreement. The
contribution does not need a CQ (see bug 322327).
Comment 20 Nicolas Bros CLA 2011-09-22 10:11:05 EDT
I have reviewed these patches, and fixed a few things: missing about.html files, build.properties, externalization, spelling, javadoc comments, versions, added a test suite, fixed warnings, a few metamodel issues, recreated the metamodel diagram (which was empty when I opened it).

I have also modified IFacetManager2#get so that it returns a typed value instead of Object.

I have committed all these patches/new projects in revision 842. Except for org.eclipse.emf.facet.efacet2.examples, because its model files have references to attributes not (yet) in the metamodel, like Literal::value

This bug is not completely resolved though. I have noticed the serialization of multi-valued features is not yet implemented. So I'm leaving this bug open.



By the way, these patches were not in the Eclipse patch format, so Eclipse wouldn't apply them. 
For future reference: I fixed that with the following regex replacement on the patch files:
search: "^(--- ([\w/.\-]+)\t\(revision \d+\))$" 
replace by: "Index: \2\n===================================================================\n\1"
Comment 21 Gregoire Dupe CLA 2011-11-23 05:16:30 EST
The commit 842 has introduce the following warning. This has  to be fixed:

Missing @since tag on org.eclipse.emf.facet.query.java.core.IJavaQuery2	IJavaQuery2.java (line 27)
Comment 22 Gregoire Dupe CLA 2011-11-29 05:34:32 EST
I've fixed the "missing @since tag" described in Comment 21.

Committed revision 1170.
Comment 23 Gregoire Dupe CLA 2011-11-29 05:52:14 EST
I've also fixed "missing @since tag" in org.eclipse.emf.facet.query.java.core.
Comment 24 Gregoire Dupe CLA 2011-11-29 05:54:31 EST
Comment 23 -> Committed revision 1171.

I've also enable the API analysis builder on the org.eclipse.emf.facet.query.java.core project.
Comment 25 Gregoire Dupe CLA 2011-11-29 12:27:23 EST
org.eclipse.emf.facet.efacet.core.IFacetManagerFactory.createFacetManager(Resource) must be able to get a null parameter: the user may want to use the facet manager without to have to save additional structural features in a resource.

I've implemented this requirement.

Committed revision 1183.
Comment 26 Gregoire Dupe CLA 2012-05-23 12:21:53 EDT
This bug has to be closed.