Community
Participate
Working Groups
This bug has been opened as a continuation of Bug #551135 Drillstack#goHome() should get the last element in the Deque, not the fisrt Currently: public DrillFrame goHome() { DrillFrame aFrame = fStack.getFirst(); reset(); return aFrame; } Should be this: public DrillFrame goHome() { DrillFrame aFrame = fStack.getLast(); reset(); return aFrame; }
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/165853
Thanks, Phil. How can I test your fix?
(In reply to Lars Vogel from comment #2) > Thanks, Phil. How can I test your fix? Lars, are there unit tests for the Drillstack class to test it when it was changed to use an ArrayDegue rather than a Stack class? Or does Eclipse or one of its plug-ins use the DrillDownAdapter with "Home"? Otherwise, we can see from the documentation and source code of the Degue Interface and ArrayDeque class that it pushes elements in the following order (so that the most recent node pushed is at position zero): [0] Node 2 [1] Node 1 [2] Home Node So we have to get the last one when we call goHome(). (This is the opposite to the Stack class)
See the comments here about reverse iteration orders: https://stackoverflow.com/questions/12524826/why-should-i-use-deque-over-stack
Created attachment 283520 [details] Snippet that shows the problem Lars, attached is a snippet that shows the problem. Try it before and after my patch.
Thanks Phil, I check later this week and if all is good, I merge it early next week (this week is M1 freeze week).
Phil, could you try to translate your snippet into a test case? I think it is pretty close to one. For Drillstack there is no test case yet. As this is closely related to TreeViewer org.eclipse.jface.tests might be the appropriate place, and org.eclipse.jface.tests.viewers.interactive looks as an appropriate package.
Karsten, I'm not sure if I can do that. I already had big problems getting the Eclipse code to compile when I got it from Gerrit. So many dependencies would not compile.
OK, let me see what I can do. I'll try to find time to add a test to your change. FYI: Setting up a working dev env is quite easy using Oomph: https://wiki.eclipse.org/Platform_UI/How_to_Contribute/Oomph For "Product" I use Eclipse IDE for Eclipse Committers" For "Projects" I typically choose "JDT, Equinox, Platform, PDE".
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/165853 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=51c08254c166928960c0a328d7bd7228fdd8f4d3
Thanks Phil for your contribution! The snippet was quite helpful, I've created the test case from it.
Thanks for that, Karsten.
(In reply to Phil Beauvoir from comment #12) > Thanks for that, Karsten. Thanks to Phil and Karsten for this fix.