Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339880 - To be able to edit derived facet attributes and derived facet references
Summary: To be able to edit derived facet attributes and derived facet references
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: Gregoire Dupe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-14 09:19 EDT by Gregoire Dupe CLA
Modified: 2020-05-01 11:27 EDT (History)
1 user (show)

See Also:
gdupe: indigo+


Attachments
Patch for Bug 339880 (35.99 KB, patch)
2011-04-06 04:06 EDT, Nicolas Guyomar CLA
gdupe: iplog+
Details | Diff
Patch for Bug 339880 Unit test (10.65 KB, patch)
2011-04-06 04:07 EDT, Nicolas Guyomar CLA
gdupe: iplog+
Details | Diff
Patch for Bug 339880 Facet Editor (1.96 KB, patch)
2011-04-11 11:07 EDT, Nicolas Guyomar CLA
gdupe: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gregoire Dupe CLA 2011-03-14 09:19:23 EDT
Hello,

Some use cases require to be able to edit derived facet attribute and derived facet references.

To satisfy this requirement we have to modify the facet metamodel to add a "set" query on derived structural features. This has to be done before the API freeze.

Regards,
Gregoire Dupe
Comment 1 Gregoire Dupe CLA 2011-03-14 09:58:04 EDT
I’ve committed the meta-model modification. (Committed revision 391)

I've added the operation org.eclipse.emf.facet.infra.facet.core.FacetContext.set(EObject, EStructuralFeature, Object). (Committed revision 392)

Next step: implementation.

Regards,
Gregoire Dupe
Comment 2 Nicolas Guyomar CLA 2011-04-06 04:06:46 EDT
Created attachment 192618 [details]
Patch for Bug 339880

Hi,

Please find attached the implementation of the method FacetContext.set(...)

In order to be able to use this method, I had to remove some validation rules in plug-in org.eclipse.emf.facet.infra.facet. A facet can now be derived and changeable. I've added IJavaModelQueryWithEditingDomain in the validation process, so that the builder does not add error marker on the SetQuery with an editingDomain

I've also regenerated the org.eclipse.emf.facet.infra.facet.edit and org.eclipse.emf.facet.infra.facet.editor plug-ins so that we can set the newly added setQuery.


(a) I, Nicolas Guyomar, 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,
Nicolas Guyomar
Comment 3 Nicolas Guyomar CLA 2011-04-06 04:07:43 EDT
Created attachment 192619 [details]
Patch for Bug 339880 Unit test

Hi,

Please find attached a first JUnit Test for the new implementation of FacetContext.set(...) method.

(a) I, Nicolas Guyomar, 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,
Nicolas Guyomar
Comment 4 Gregoire Dupe CLA 2011-04-06 11:50:20 EDT
Comment on attachment 192618 [details]
Patch for Bug 339880

Here is a contribution from one employee of Mia-Software, targeting future
Indigo release. The company has signed a Member Commiter Agreement. The
contribution does not need a CQ (see bug 322327).

I've committed this contribution.

Committed revision 497.
Comment 5 Gregoire Dupe CLA 2011-04-06 11:50:42 EDT
Comment on attachment 192619 [details]
Patch for Bug 339880 Unit test

Here is a contribution from one employee of Mia-Software, targeting future
Indigo release. The company has signed a Member Commiter Agreement. The
contribution does not need a CQ (see bug 322327).

I've committed this contribution.

Committed revision 497.
Comment 6 Gregoire Dupe CLA 2011-04-06 11:58:07 EDT
This bug can be marked as fixed.
Comment 7 Nicolas Guyomar CLA 2011-04-11 11:07:25 EDT
Created attachment 192938 [details]
Patch for Bug 339880 Facet Editor

Hi,

Since this evolution was made, we should be able to set the newly added "SetQuery" through the Facet Editor.

Here is a patch which modify the editor properties view.

(a) I, Nicolas Guyomar, 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,
Nicolas Guyomar
Comment 8 Gregoire Dupe CLA 2011-04-12 12:21:25 EDT
Comment on attachment 192938 [details]
Patch for Bug 339880 Facet Editor

Here is a contribution from one employee of Mia-Software, targeting future
Indigo release. The company has signed a Member Commiter Agreement. The
contribution does not need a CQ (see bug 322327).

I've committed this contribution.

Committed revision 510.
Comment 9 Gregoire Dupe CLA 2011-05-27 12:25:37 EDT
This bug can be closed.