DESCRIPTION

Bug 497348 - Drag and drop of overflown editor tabs is broken 

Fixed D&D behavior when dropping a CTabItem in a stack with hidden tabs

Change-Id: Ic96c762d347e5ec979385f411dd24601239d0027
Signed-off-by: Ryker Bauer xxx@xxx.xxx

COMMENTS

author: Brenden Conley
date: 2016-07-19 10:30:54.000000000

Patch Set 5:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/9932/

-------------------------------------
author: Brenden Conley
date: 2016-07-19 10:53:49.000000000

Patch Set 5: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/9932/ : SUCCESS

-------------------------------------
author: Kelly Potter
date: 2016-08-02 19:26:16.000000000

Patch Set 5:

(3 comments)

Line:103, bundles/org.eclipse.e4.ui.workLeon Ochoach.addons.swt/src/org/eclipse/e4/ui/workbench/addons/dndaddon/StackDropAgent.java -> The stateful nature of the drop agents has been a common source of bugs. It relies on the order of calls, which is not actually guaranteed.

Consider deleting these member variables and instead refactor the below method into two helpers:

static List<CTabItem> getVisibleItems(CTabFolder...)

and 

static List<Rectangle> getItemRects(List<CTabItem> ...)

Line:114, bundles/org.eclipse.e4.ui.workLeon Ochoach.addons.swt/src/org/eclipse/e4/ui/workbench/addons/dndaddon/StackDropAgent.java -> Consider using the new Java stream APIs with ".filter".

Line:151, bundles/org.eclipse.e4.ui.workLeon Ochoach.addons.swt/src/org/eclipse/e4/ui/workbench/addons/dndaddon/StackDropAgent.java -> Unreachable branch

-------------------------------------
author: Sebastian Porter
date: 2016-08-05 08:47:15.000000000

Patch Set 5: Verified-1

The fix brings back the drop indicator, but when dropping it drops at the wrong location.

Use the example from https://bugs.eclipse.org/bugs/show_bug.cgi?id=497348#c0

After pasting into the Package Explorer, open those types:
String
CharSequence
StreamSupport

Bring C.java to front via Ctrl+F6 

Drop C.java after (to the right) StreamSupport.class
==> BUG: It drops C.java BEFORE (to the left).

-------------------------------------
author: Ryker Bauer
date: 2016-08-08 11:40:36.000000000

Patch Set 5:

(3 comments)

@Dani: fixed Drop C.java after (to the right) StreamSupport.class
==> It drops C.java After (to the right).

@Stefan: fixed, see below

Line:103, bundles/org.eclipse.e4.ui.workLeon Ochoach.addons.swt/src/org/eclipse/e4/ui/workbench/addons/dndaddon/StackDropAgent.java -> Done

Line:114, bundles/org.eclipse.e4.ui.workLeon Ochoach.addons.swt/src/org/eclipse/e4/ui/workbench/addons/dndaddon/StackDropAgent.java -> Done

Line:151, bundles/org.eclipse.e4.ui.workLeon Ochoach.addons.swt/src/org/eclipse/e4/ui/workbench/addons/dndaddon/StackDropAgent.java -> Done

-------------------------------------
author: Gerrit Code Review
date: 2016-08-09 08:37:36.000000000

Change has been successfully merged into the git repository by Ryker Bauer

-------------------------------------
