Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 366367 - To be able to change the "CanBePresentedInTheTable" query
Summary: To be able to change the "CanBePresentedInTheTable" query
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EMF-Facet (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Nicolas Bros CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 369117 367335 367341
Blocks:
  Show dependency tree
 
Reported: 2011-12-12 05:05 EST by Gregoire Dupe CLA
Modified: 2020-05-01 11:26 EDT (History)
2 users (show)

See Also:
gdupe: juno+


Attachments
patch (185.56 KB, patch)
2011-12-20 11:21 EST, Nicolas Bros CLA
no flags Details | Diff
resources (62.11 KB, application/octet-stream)
2011-12-20 11:23 EST, Nicolas Bros CLA
nicolas.bros: iplog+
Details
modified files (188.08 KB, application/octet-stream)
2011-12-21 05:07 EST, Nicolas Bros CLA
no flags Details
patch v2 (183.33 KB, patch)
2011-12-21 06:24 EST, Nicolas Bros CLA
no flags Details | Diff
modified files v2 (163.19 KB, application/octet-stream)
2011-12-21 06:26 EST, Nicolas Bros CLA
no flags Details
patch v3 (189.51 KB, patch)
2011-12-21 09:01 EST, Nicolas Bros CLA
no flags Details | Diff
modified files v3 (167.56 KB, application/octet-stream)
2011-12-21 09:02 EST, Nicolas Bros CLA
no flags Details
selectPresentabilityQueryButton.png (4.75 KB, image/png)
2011-12-21 10:04 EST, Nicolas Bros CLA
nicolas.bros: iplog+
Details
patch for Table v2 (168.63 KB, patch)
2012-01-20 11:26 EST, Nicolas Bros CLA
no flags Details | Diff
patch v2 for table v2 (167.00 KB, patch)
2012-01-23 08:12 EST, Nicolas Bros CLA
no flags Details | Diff
patch v3 for table v2 (141.85 KB, patch)
2012-01-24 08:41 EST, Nicolas Bros CLA
nicolas.bros: 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-12-12 05:05:13 EST
It would be useful to be able to change the "CanBePresentedInTheTable" query during the execution.

A canBePresentedInTheTable query presented query is used to now if a model element can be presented in the table. For instance, this query is to know if the table must accept a model element form a drag and drop.

If model elements already presented in the table are not conform to the new canBePresentedInTheTable query, then the user will have to choose if he wants to remove them from the table.
Comment 1 Gregoire Dupe CLA 2011-12-12 05:14:10 EST
I’ve committed a new version of the INatTableWidget interface. This new interface contains the methods which have to be implemented to satisfy this enhancement.

Committed revision 1264.
Comment 2 Gregoire Dupe CLA 2011-12-13 05:27:08 EST
I’ve committed the interfaces which must be used to implement the GUI dialogs needed to select a “canBePresentedInTheTable” query.

I’ve also committed a partially implemented unit test to illustrate the use of the dialogs.

Committed revision 1267.
Comment 3 Gregoire Dupe CLA 2011-12-13 05:28:01 EST
(In reply to comment #2)
> I’ve also committed a partially implemented unit test to illustrate the use of
> the dialogs.

Cf. org.eclipse.emf.facet.widgets.nattable.tests.internal.CanBePresentedInTheTableDialogTest
Comment 4 Nicolas Bros CLA 2011-12-20 11:21:34 EST
Created attachment 208630 [details]
patch

Here is a patch that implements the functionality and unit tests, with dialogs designed to be testable with pure JUnit tests.
Comment 5 Nicolas Bros CLA 2011-12-20 11:23:44 EST
Created attachment 208632 [details]
resources

Here are the accompanying images.
Comment 6 Nicolas Bros CLA 2011-12-21 05:07:11 EST
Created attachment 208665 [details]
modified files

There seems to be a bug that prevents the patch from being applied properly. So, here are the modified files in a zip: you can unzip it at the root of your workspace, replacing the previous files.
Comment 7 Nicolas Bros CLA 2011-12-21 06:24:16 EST
Created attachment 208669 [details]
patch v2

Here is an updated patch that adds the possibility to reset the presentability query through a checkbox on the query selection dialog.
Comment 8 Nicolas Bros CLA 2011-12-21 06:26:57 EST
Created attachment 208670 [details]
modified files v2

And since I suspect that this patch won't want to apply cleanly either, here are the modified files.
Comment 9 Nicolas Bros CLA 2011-12-21 09:01:03 EST
Created attachment 208677 [details]
patch v3

In this patch, I added unit tests to check that undo-redo can be used after changing a presentability query, and I externalized a UI string.
Comment 10 Nicolas Bros CLA 2011-12-21 09:02:05 EST
Created attachment 208678 [details]
modified files v3

The corresponding zip of modified files.
Comment 11 Nicolas Bros CLA 2011-12-21 10:04:15 EST
Created attachment 208681 [details]
selectPresentabilityQueryButton.png

Here is a cleaned up version of a screenshot of the presentability query button in the toolbar, without the Facet icons that shouldn't be there.

org.eclipse.emf.facet.widgets.nattable.doc/selectPresentabilityQueryButton.png
Comment 12 Nicolas Bros CLA 2012-01-20 11:26:09 EST
Created attachment 209837 [details]
patch for Table v2

I have adapted the patch for the Table v2.
Comment 13 Nicolas Bros CLA 2012-01-23 08:12:51 EST
Created attachment 209907 [details]
patch v2 for table v2

Here is a new version of the patch. I cleaned up some code, added missing copyrights and externalized strings.
Comment 14 Nicolas Bros CLA 2012-01-24 08:41:39 EST
Created attachment 209967 [details]
patch v3 for table v2

Here is a new cleaned up version of the patch.
Comment 15 Nicolas Bros CLA 2012-02-01 11:58:05 EST
Committed in revision 1560.
Comment 16 Gregoire Dupe CLA 2012-05-23 08:58:34 EDT
This bug can be closed.