Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322243 - [Shell] moveAbove and moveBelow with parent throws IllegalArgumentException
Summary: [Shell] moveAbove and moveBelow with parent throws IllegalArgumentException
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: 2.3 M2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-10 11:00 EDT by Artur Kronenberg CLA
Modified: 2014-03-03 07:33 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Artur Kronenberg CLA 2010-08-10 11:00:38 EDT
Test case to reproduce: 

public void testShellMoveAboveWithParent() {
    Display display = new Display();
    Shell shell = new Shell( display );
    Shell shell2 = new Shell( shell );
    shell2.moveAbove( null );
  }
  
Stack Trace:

java.lang.IllegalArgumentException: The control was not added to this control holder.
	at org.eclipse.swt.widgets.ControlHolder.remove(ControlHolder.java:62)
	at org.eclipse.swt.widgets.ControlHolder.removeControl(ControlHolder.java:116)
	at org.eclipse.swt.widgets.Control.moveAbove(Control.java:1401)
	at org.eclipse.swt.widgets.Control_Test.testShellMoveAboveWithParent(Control_Test.java:529)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at junit.framework.TestCase.runTest(TestCase.java:164)
	at junit.framework.TestCase.runBare(TestCase.java:130)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:120)
	at junit.framework.TestSuite.runTest(TestSuite.java:230)
	at junit.framework.TestSuite.run(TestSuite.java:225)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Comment 1 Ivan Furnadjiev CLA 2013-06-12 07:53:33 EDT
Still valid with RAP 2.1.
Comment 2 Ivan Furnadjiev CLA 2014-03-03 07:33:11 EST
Made Control#moveAbove/moveBelow no-op for Shell with change https://git.eclipse.org/r/22763. We still have bug 322511 for shell reordering not implemented.