Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354224 - mutually exclusive Facets
Summary: mutually exclusive Facets
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EMF-Facet (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Gregoire Dupe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-09 05:16 EDT by Nicolas Bros CLA
Modified: 2020-05-01 11:27 EDT (History)
3 users (show)

See Also:
gdupe: indigo+
Ed.Merks: pmc_approved+


Attachments
movie showing what happens (912.18 KB, application/x-shockwave-flash)
2011-08-09 05:18 EDT, Nicolas Bros CLA
no flags Details
Unit test (19.87 KB, patch)
2011-08-25 11:07 EDT, Gregoire Dupe CLA
gdupe: iplog+
nicolas.bros: review+
Details | Diff
Patch (6.39 KB, text/plain)
2011-08-25 11:08 EDT, Gregoire Dupe CLA
gdupe: iplog+
nicolas.bros: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Bros CLA 2011-08-09 05:16:48 EDT
I apply 2 Facets from the same FacetSet in the table editor. One Facet is applicable to a uml.NamedElement, and the other is applicable to a uml.Class.

When I apply both, only one facet column appears (instead of two). When I apply only one of both, it always appears correctly.
Comment 1 Nicolas Bros CLA 2011-08-09 05:18:33 EDT
Created attachment 201124 [details]
movie showing what happens
Comment 2 Gregoire Dupe CLA 2011-08-25 11:07:57 EDT
Created attachment 202158 [details]
Unit test

Here is a unit test for this bug.

(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 3 Gregoire Dupe CLA 2011-08-25 11:08:51 EDT
Created attachment 202159 [details]
Patch

Here is a patch for this bug.

(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 4 Nicolas Bros CLA 2011-08-26 04:02:10 EDT
Comment on attachment 202159 [details]
Patch

The patch adds a few Java and checkstyle warnings in NatTableWidget.java around line 453.
Apart from this, it looks good to me.
Comment 5 Nicolas Bros CLA 2011-08-26 04:20:50 EDT
Comment on attachment 202158 [details]
Unit test

In Bug354224Test, it took me a while to understand why finalNatTableWidgetList was an ArrayList.
What I usually do to return an instance from a Runnable is to pass it through a primitive array of size 1. I think it makes the purpose clearer.

Even better is the way it's done in SWTBot, with syncExec defined as:
<T> T syncExec(final Result<T> runnable)
Maybe we could make it a utility in EMF Facet.
Comment 6 Gregoire Dupe CLA 2011-08-29 12:30:14 EDT
(In reply to comment #4) and (In reply to comment #5)
> Comment on attachment 202158 [details]
> Comment on attachment 202159 [details] 

Ok, I'll applied the Nicolas' recommendation before to commit.

Ed, do you agree to commit those patches before RC2 ?

Regards,
Gregoire
Comment 7 Gregoire Dupe CLA 2011-08-31 04:51:33 EDT
Comment on attachment 202158 [details]
Unit test

I've committed this patch on the branch 0_1.
Comment 8 Gregoire Dupe CLA 2011-08-31 04:51:54 EDT
Comment on attachment 202159 [details]
Patch

I've committed this patch on the branch 0_1.
Comment 9 Gregoire Dupe CLA 2011-08-31 05:59:54 EDT
Comment on attachment 202159 [details]
Patch

I've committed this patch in the trunk.

Committed revision 806.
Comment 10 Gregoire Dupe CLA 2011-08-31 06:00:25 EDT
Comment on attachment 202158 [details]
Unit test

I've committed this patch in the trunk.

Committed revision 807.
Comment 11 Gregoire Dupe CLA 2011-08-31 06:00:53 EDT
This bug can be marked as fixed.
Comment 12 Gregoire Dupe CLA 2012-05-23 08:10:02 EDT
This bug can be closed.