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

Bug 339650

Summary: [Enhancement][Table Editor] Table editor should be synchronized with the table context using filling queries.
Product: [Modeling] Papyrus Reporter: Vincent Lorenzo <vincent.lorenzo>
Component: CoreAssignee: Vincent Lorenzo <vincent.lorenzo>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.8.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 345747, 346640, 369116, 372223    
Bug Blocks: 334240    

Description Vincent Lorenzo CLA 2011-03-11 03:26:25 EST
We should add the possibility to synchronize tables with the context using filling queries. 
These queries should provide the content of the table, that is to say, each time the context is modified by the user, the queries should be executed again.
The following actions should be provided : 
	1/ the user can synchronized/unsynchronized the table
	2/ the user can add/remove filling queries  (with the table property view)
	3/ the user can remove dropped objects which don't comes with the filling queries
	4/ the user can refresh the table
	5/ the programmer can define filling queries during the table creation
    6/ the user can return to the default table configuration ?
Comment 1 Vincent Lorenzo CLA 2011-03-11 03:44:13 EST
In R4283 : 
Add the methods to manage filling queries and synchronization during the creation of the table. (the synchronization itself is not yet done)
Comment 2 Vincent Lorenzo CLA 2011-05-13 10:06:36 EDT
In R4686 : 
	provide the autofill for the table : 
		- works when new elements are created
		- doesn't work when an element change of container (the nattable API doesn' t provide method to delete a line)
Comment 3 Vincent Lorenzo CLA 2011-05-13 12:29:50 EDT
In R4687 : commit the code to remove lines from the table (which the lines commented and marked TODO. 
it will be finished, when 345747 will be done.
Comment 4 Vincent Lorenzo CLA 2011-05-15 12:33:29 EDT
In R4689 : add the boolean editor in the table editor to edit IsSynchronized.
Comment 5 Vincent Lorenzo CLA 2011-05-15 13:33:36 EDT
In R4690 : create a new interface for the table widget : IPapyrusNaTableWidget : this inteface provides new methods to add rows and delete rows without execute the command in the command stack. If we use the commands addRows and deleteRows provided by INatTableWidget, we will have problems between the Undo/Redo and the synchronization, because we will have this behavior : 
	- A command to add/delete an element in the model (executed in the command stack)
	- A command to synchronize the table  (executed in the command stack)
	
So we will have 2 commands for the Undo. Moreover, thanks to the listener, the Undo action will probably add a new Command in the CommandStack...

This change allows to avoid this problem.
Comment 6 Vincent Lorenzo CLA 2011-09-29 09:10:21 EDT
Minor change in R5634 (branch) and R5634 (trunk) : we remove a listener when the table editor is disposed
Comment 7 Vincent Lorenzo CLA 2013-02-07 04:24:55 EST
This bug can be marked as closed fixed.