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

Bug 413077

Summary: [Table 2] The method getSelection in the table must be improved
Product: [Modeling] Papyrus Reporter: Vincent Lorenzo <vincent.lorenzo>
Component: TableAssignee: Vincent Lorenzo <vincent.lorenzo>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: juan.cadavid, rschnekenburger
Version: 0.10.0   
Target Milestone: M7   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 399838, 423451    

Description Vincent Lorenzo CLA 2013-07-16 10:17:08 EDT
The method getSelection in the table must be improved. 
In the returned selection, we must return : 
	- the selection of the selected cells (all selected cells or only for the last selected cell, the usecase is not yet clear for us) (when any columns/rows are selected)
    - the coordinate of all selected cell

    - the header of the columns/rows when the user select them AND the element represented by the axis when the user...
    	 	Currently, we don't know distinguish the axis fully selected by selecting the header AND the axis fully selected by selecting the cell one per one.
Comment 1 Vincent Lorenzo CLA 2013-07-24 05:27:46 EDT
	30a349771e210011375e11625418bc1439011e91 : 
	try to improve the getSelection (result is not very good...)
Comment 2 Vincent Lorenzo CLA 2013-09-17 04:30:32 EDT
A new Structured Selection has been created in commit 1b32c2d01a6864f7a06bf4da41d48c177a038a5c on branch only!!!!

We must merge the code on trunk!
impacted files : 
extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/AbstractTableHandler.java
extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableSelectionProvider.java
extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableStructuredSelection.java
Comment 3 Vincent Lorenzo CLA 2013-09-24 10:49:50 EDT
Commited on trunk in commit 866c81becbcc9586da4970a801214800a47e84e9

(In reply to comment #2)
> A new Structured Selection has been created in commit
> 1b32c2d01a6864f7a06bf4da41d48c177a038a5c on branch only!!!!
> 
> We must merge the code on trunk!
> impacted files :
> extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/AbstractTableHandler.java
> extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableSelectionProvider.java
> extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableStructuredSelection.java
Comment 4 Vincent Lorenzo CLA 2014-09-19 07:11:29 EDT
in commit a398c7a71967b519286c1c2e5209fb54af99e1d5 : improve the table selection with this behavior + JUnit tests
Correction required to implements the IRevealSemanticElement between ModelExplorer and Table

//we are not able to distinguish the 2 ways to select a full axis : 
			//- first way : clicking on axis header
			//- second way : clicking on first cell of the axis, Pressing SHIFT, clicking on the last cell of the axis (or selecting each cell of the axis pressing CTRL)
			//so we are not able to know if the user want to select the element represented by the axis OR all values displayed on the axis, without the element represented by the axis
			//we decided to implements this behavior for all kind of selection event : 
			// 1- we add in the selection elements represented by fully selected rows
			// 2- we add in the selection elements represented by fully selected columns
			// 3- we add in the selection the contents of selected cell which are not included in the fully selected axis

			
			This bug can be be marked as closed fixed