Community
Participate
Working Groups
The new version of the Facet metamodel (eFacet2) leads to modifications in the core Facet plug-ins: - org.eclipse.emf.facet.efacet.core - org.eclipse.emf.facet.query.java.core - org.eclipse.emf.facet.efacet.catalog This bug is to track these modifications.
Created attachment 205697 [details] patch for org.eclipse.emf.facet.efacet.catalog
Created attachment 205698 [details] patch for org.eclipse.emf.facet.efacet.core
Created attachment 205699 [details] patch for org.eclipse.emf.facet.efacet2.tests
Created attachment 205700 [details] patch for org.eclipse.emf.facet.query.java.core
I committed these modifications in revision 996.
There is a warning in a section modified by the fixing of this bug (org.eclipse.emf.facet.efacet.core.FacetUtils, line 43). This must be fixed.
(In reply to comment #6) > There is a warning in a section modified by the fixing of this bug > (org.eclipse.emf.facet.efacet.core.FacetUtils, line 43). This must be fixed. This is because this method is a stub. I have commented out the unfinished code in revision 1030.
I committed an interface and implementation of the Facet manager (to get and set the values of Facet attributes and references, and evaluate Facet operations) in revision 1059.
I continued the implementation of the facet manager and I fixed the unit tests in org.eclipse.emf.facet.efacet2.tests by restoring the previous API and redirecting to the new implementation in revision 1069.
There is a warning on org.eclipse.emf.facet.efacet.core.internal.FacetManager.createAndCheckOperationParameterValues(EOperation, Class<T>, Object...)
To my mind EList should not be used in org.eclipse.emf.facet.efacet.core.IFacetManager because all the lists returned by this API are not real model links.
In revision 1088 I finished implementing the behaviors that were broken when moving to the new version of the metamodel : conformance tests for Facets using a boolean DerivedTypedElement, error checks
In revision 1091 I added a check for conformance of the Facet before each get or set, except in the get called from testConformance to avoid an infinite recursion
In revision 1090 I added a few more unit tests for error cases in the FacetManager
Created attachment 207686 [details] FacetManager.testConformance(EObject, Facet) patch Hello Nicolas, I think that in the method org.eclipse.emf.facet.efacet.core.internal.FacetManager.testConformance(EObject, Facet) the case of an EFacet extending the EObject class has not be managed. The attached patch proposes a fix of this method. Please, can you review this patch ? Regards, Grégoire
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. cf. Bug 361794: https://bugs.eclipse.org/bugs/show_bug.cgi?id=361794#c11
With Nicolas Bros, we have refactored the class FacetManager to improve its maintenability. Committed revision 1195.
revision 1200: - simplified the IDerivedTypedElementManager (patch from Gregoire) and refactored the corresponding implementation - disabled the batch evaluation for now (cf Bug 365429) - adapted the javadoc to the new interfaces
I fixed the javadoc of IDerivedTypedElementCollectionImplementation in revision 1201.
The class FacetManger is the main important class of EMF Facet, that why I began to clean it by following PMD recommandations. I expect that this work will improve the maintainability of EMF Facet. I haven’t fixed all the PMD warnings on this class. The main reaming warnings are the "Cyclomatic Complexity" ones. Committed revision 1206.
I added tests for the serialization of the DerivedTypedElement*Result in revision 1219.
I’ve continued to improve the FacetManger maintainability. I’ve solved the "Cyclomatic Complexity" warnings and moved some static methods the classes EmfUtils, CastUtils, SerializationUtils.
The meta-model move may have broken the build: MESSAGE ERROR [0033] : No suitable provider for component org.eclipse.emf.facet.efacet2.metamodel:osgi.bundle was found in resourceMap file:/opt/users/hudsonbuild/workspace/emffacet-nightly/sourceTree/releng/org.eclipse.emf.facet.releng.buckminster/emffacet.rmap
(In reply to comment #23) > The meta-model move may have broken the build: > > MESSAGE ERROR [0033] : No suitable provider for component > org.eclipse.emf.facet.efacet2.metamodel:osgi.bundle was found in resourceMap > file:/opt/users/hudsonbuild/workspace/emffacet-nightly/sourceTree/releng/org.eclipse.emf.facet.releng.buckminster/emffacet.rmap fixed: cf; https://bugs.eclipse.org/bugs/show_bug.cgi?id=361823#c19
I’ve finished to clean all PMD warnings in the class "FacetManager" Committed revisions: 1233-1244
The PMD warning cleaning of FacetManager has caused a change of exception type. That why I've modified the following unit test method: Committed revision 1245.
(In reply to comment #25) > Committed revisions: 1233-1244 In these commits, all the methods from SerializationUtils are duplicated in SerializationManager: createMultiValuedContainmentReferenceInstance getExtendedEObjectReference createMultiValuedAttributeInstance createMultiValuedReferenceInstance getSingleValuedAttributeInstance getMultiValuedAttributeInstance getSingleValuedReferenceInstance getSingleValuedContainmentReferenceInstance getMultiValuedReferenceInstance getMultiValuedContainmentReferenceInstance
(In reply to comment #27) I removed the class SerializationUtils. Committed revision 1272.
The file svn+ssh://dev.eclipse.org/svnroot/modeling/org.eclipse.emft.facet/trunk/tests/org.eclipse.emf.facet.efacet2.tests/src/org/eclipse/emf/facet/efacet2/tests/internal/DerivedTypedElementResultSerializationTests.java doesn't contains any copyright header.
I've committed a patch taking care that the conformance constraints are inherited from the super facet. Committed revision 1974.
The facet manager work well, so we can close this bug.