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

Bug 361794

Summary: [Restructuring] EMF Facet customization meta-model
Product: z_Archived Reporter: Gregoire Dupe <gdupe>
Component: EMF-FacetAssignee: Gregoire Dupe <gdupe>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P1 CC: emft.facet-inbox, foilivier
Version: unspecifiedFlags: gdupe: juno+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 361823    
Bug Blocks: 352718    
Attachments:
Description Flags
Customization test plug-in initial contribution
gdupe: iplog+
Patch for Facet override mechanism gdupe: iplog+

Description Gregoire Dupe CLA 2011-10-24 07:37:12 EDT
Hello,

We need a new customization meta-model based on the last version of the facet meta-model (efacet2).

This new meta-model must allow to create additional customization properties without having to modify the meta-model.

Regards,
Grégoire Dupé
Comment 2 Gregoire Dupe CLA 2011-10-26 08:33:55 EDT
I've added a reexport flag on the dependency to org.eclipse.emf.facet.util.emf.catalog because some classes of org.eclipse.emf.facet.util.emf.catalog are used in the API of org.eclipse.emf.facet.util.emf.core.

Committed revision 1037.
Comment 3 Gregoire Dupe CLA 2011-10-26 08:36:12 EDT
I've modified the feature org.eclipse.emf.facet.common.feature to add the new plug-ins in the build (org.eclipse.emf.facet.custom.core, org.eclipse.emf.facet.custom.metamodel, org.eclipse.emf.facet.custom.ui).

Next step: implementation of the core plug-in.
Comment 4 Gregoire Dupe CLA 2011-10-28 03:30:21 EDT
There is a problem with the provider name of custom.metamodel:
"""
java.lang.AssertionError: Wrong Bundle-Vendor in:
org.eclipse.emf.facet.custom.metamodel -> www.example.org
"""

The tag "Incubation" in the name of custom.core -> EMF Facet Customization Core
Comment 5 Gregoire Dupe CLA 2011-11-07 11:28:56 EST
(In reply to comment #4)
> There is a problem with the provider name of custom.metamodel:
> """
> java.lang.AssertionError: Wrong Bundle-Vendor in:
> org.eclipse.emf.facet.custom.metamodel -> www.example.org
> """
> 
> The tag "Incubation" in the name of custom.core -> EMF Facet Customization Core

I've tryed to fixe that in the commit 1062, 1063 and 1064.
Comment 6 Gregoire Dupe CLA 2011-11-09 09:23:11 EST
Created attachment 206690 [details]
Customization test plug-in initial contribution

Here is the initial contribution of the test plug-in org.eclipse.emf.facet.custom.tests.
(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 7 Gregoire Dupe CLA 2011-11-09 09:36:31 EST
Comment on attachment 206690 [details]
Customization test plug-in initial contribution

I've committed this contribution.

Committed revision 1075.
Comment 8 Gregoire Dupe CLA 2011-11-09 09:40:17 EST
I've committed the catalog implementation.
Committed revision 1076.
Comment 9 Gregoire Dupe CLA 2011-11-16 09:02:33 EST
I’ve removed the EnumeLiteral CustomizationPropertyScope::All and switch the upper bound value of CustomizationProperty::scope to -1, because we can have customization properties applicable on (for examlpe) EAttribut and EReference.

Committed revision 1095.
Comment 10 Gregoire Dupe CLA 2011-11-29 15:04:25 EST
I had to deeply refactor the customization meta-model because the CustomizationPropertySetting instances were not contained in a Facet instance or in an ETypedElement instance. This was not conform to the query mechanism which was assuming that an IDerivedTypedElement instance is contained in a Facet instance or in an ETypedElement instance (cf. org.eclipse.emf.facet.efacet2.metamodel.efacet.extensible.impl.QueryImpl.basicGetSourceType())(CustomizationPropertySetting is a kind of IDerivedTypedElement)

The new customization meta-model is an extension of the facet meta-model. A CustomizationProperty declaration is now represented by a FacetAttribute and a CustomizationPropertySetting is now represented by FacetAttribute overriding the FacetAttribute corresponding to CustomizationProperty.

The interface ICustomizationManager and its implementation have then be modified.

I’ve begin to write the model declaring the CustomizationProperty (FacetAtribute). This model can be found at /org.eclipse.emf.facet.custom.ui/resources/customproperties.efacet.

I’ve implemented a catalog to store the  customization property declaration (FacetSet), cf. org.eclipse.emf.facet.custom.core.ICustomizationPropertiesCatalogManager

And of course, I’ve begin to modify the unit tests.

Committed revision 1184.
Comment 11 Gregoire Dupe CLA 2011-11-29 15:41:46 EST
To implements the EMF Facet customization features, I need to have the capability override a facet attributes. (I have extended this requirement to all the DerivedTypedElements)

That's why I've committed an update of the efacet2 meta-model.

Committed revision 1185.
Comment 12 Gregoire Dupe CLA 2011-11-30 08:18:16 EST
In the commit 1185, I made a mistake. The type of the reference extendedFacet must be Facet and not EClass.

I fixed that.

Committed revision 1186.
Comment 13 Gregoire Dupe CLA 2012-01-26 13:17:20 EST
I've begin to implement the customizable label provider.

Committed revision 1514.
Comment 14 Olivier Remaud CLA 2012-01-27 07:04:26 EST
Created attachment 210178 [details]
Patch for Facet override mechanism

(a) I, Olivier Remaud, 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 15 Gregoire Dupe CLA 2012-01-27 11:56:28 EST
I've committed some more modifications to implements the customizable label provider. 

A unique resource set must be used by the client component (unit test for instance), the customization manager and the facet manager.

Committed revision 1516.
Comment 16 Gregoire Dupe CLA 2012-02-27 05:20:53 EST
The CQ https://dev.eclipse.org/ipzilla/show_bug.cgi?id=6085 has been approved.
Comment 17 Gregoire Dupe CLA 2012-02-27 08:53:25 EST
Comment on attachment 210178 [details]
Patch for Facet override mechanism

I've committed this patch.

Committed revision 1669.
Comment 18 Gregoire Dupe CLA 2012-05-23 12:20:06 EDT
This bug can be closed.