Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361985 - ITable: more flexibility to discard deleted rows in tables
Summary: ITable: more flexibility to discard deleted rows in tables
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Scout (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-25 14:03 EDT by Jeremie Bresson CLA
Modified: 2021-08-19 11:22 EDT (History)
2 users (show)

See Also:
zimmermann: juno+


Attachments
Patch for bug 361985 (2.49 KB, patch)
2011-12-31 04:38 EST, Jeremie Bresson CLA
no flags Details | Diff
Patch for bug 361985 (v2) (2.51 KB, patch)
2012-01-04 15:18 EST, Jeremie Bresson CLA
stephan.leichtvogt: iplog+
Details | Diff
Test for Bug 361985 (5.83 KB, application/octet-stream)
2012-01-04 15:24 EST, Jeremie Bresson CLA
stephan.leichtvogt: iplog+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremie Bresson CLA 2011-10-25 14:03:55 EDT
Build Identifier: 

Bug following the discussion here:
http://www.eclipse.org/forums/index.php/t/210744/

* Naming consistency:
clearDeletedRows() => discardAllDeletedRows()


* Add the possibility to discard a specific deleted row
discardDeleteRow(TableRow deletedRow)
discardDeleteRows(TableRow deletedRow)

discarding a DeletedRow by index (or array of indexes) makes no sense, because if the row is deleted, the row do not have an index anymore.

Reproducible: Always
Comment 1 Jeremie Bresson CLA 2011-12-31 04:38:46 EST
Created attachment 208888 [details]
Patch for bug 361985

Patch that implements the proposed modifications.

new methods:
- discardAllDeletedRows();
- discardDeletedRow(ITableRow deletedRow);
- discardDeletedRows(ITableRow[] deletedRows);

deprecated:
- clearDeletedRows() [use discardAllDeletedRows() instead]



MIGRATION:
ITable#clearDeletedRows() is deprecated, use ITable#discardAllDeletedRows() instead.



How can I test this modification (and write a test) to ensure that the methods work as expected ?
Comment 2 Jeremie Bresson CLA 2012-01-04 15:18:20 EST
Created attachment 209033 [details]
Patch for bug 361985 (v2)

Patch for bug 361985. Version 2.

Fix a NPE: 
call setTableInternal(null)
after getRowKeys(row)
Comment 3 Jeremie Bresson CLA 2012-01-04 15:24:19 EST
Created attachment 209034 [details]
Test for Bug 361985

Test for this bug.

To run this class with JUnit, a test infrastructure as described in [1] is needed.
This is not a plain JUnit test, because the Scout Runtime/Equinox need to be started.

[1] http://www.eclipse.org/forums/index.php/mv/msg/262115/757087/#msg_757087
Comment 4 Stephan Leicht Vogt CLA 2012-04-10 03:42:16 EDT
Patch slightly modified and applied on trunk for Juno.
Thank you Jeremie.
Comment 5 Matthias Zimmermann CLA 2012-07-09 06:50:39 EDT
ticket closed.
deliverd as part of eclipse scout 3.8.0 (juno release train)