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

Bug 322511

Summary: [Shell] moveAbove and moveBelow should reorder the Shells on the display
Product: [RT] RAP Reporter: Artur Kronenberg <artur.kronenberg>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: ASSIGNED --- QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
Patch proposal none

Description Artur Kronenberg CLA 2010-08-12 07:47:30 EDT
On SWT moveAbove and moveBelow on Shells has a different separate implementation that reorders the Shells based on the argument. Null will reorder them to the top/bottom while an argument specifies the control that will be above/below.

Test case to test that behaviour on RAP:

public void testMoveAboveNull() {
    Display display = new Display();
    Shell shell = new Shell( display );
    Shell shell2 = new Shell( display );
    shell2.moveAbove( null );
    assertEquals( shell2, display.getShells()[ 0 ] );
  }
Comment 1 Artur Kronenberg CLA 2010-08-12 10:45:17 EDT
Created attachment 176473 [details]
Patch proposal

Overwritten the methods in Shell and added a addShell( Object, index) in Display class. 
Also, this bug should fix the two following bugs as well:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=229265
and
https://bugs.eclipse.org/bugs/show_bug.cgi?id=322243
Comment 2 Ivan Furnadjiev CLA 2013-06-12 07:54:22 EDT
Still valid with RAP 2.1.