Make CTabFolder.setItemOrder package-private again, keep moveItem#3352
Conversation
Following review feedback, setItemOrder(int[]) should not be exposed as public API. Demote it back to a package-private helper and drop its @SInCE tag, but keep the public moveItem(int, int) method as the supported single-tab reorder primitive. The priority[]/firstIndex remap fix is retained since moveItem relies on it for correct chevron and scroll state. Removes the now-uncompilable setItemOrder unit tests.
Test Results 182 files ± 0 182 suites ±0 27m 37s ⏱️ +54s Results for commit 12b780e. ± Comparison against base commit 42b9859. This pull request removes 5 tests. |
|
The removed tests are due to the removal of the API. The fix in the incorrect handling of reordering in setItemOrder is of course left in the code and is indirectly tested via the moveItem method. FYI - @HeikoKlare I plan to merge this today, to avoid having a SWT release with unwanted API. |
Would it make sense to preserve the tests as unit tests instead of API tests? |
I would say no, we didn't have them before and the new moveItem API is well-tested. |
Following review feedback on #3350,
CTabFolder.setItemOrder(int[])should not be exposed as public API. This demotes it back to a package-private helper and drops its@sincetag, while keeping the publicmoveItem(int, int)method as the supported primitive for the common single-tab reorder (drag) gesture.The
priority[]/firstIndexremap fix from #3350 is retained, sincemoveItemdelegates tosetItemOrderand relies on it to keep the chevron and scroll state correct after a reorder. The unit tests that calledsetItemOrderdirectly are removed (they can no longer compile from the test package); themoveItemtests stay and continue to exercise the remap logic.