Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2010-04-02 11:29:49 +0000
committerStephan Herrmann2010-04-02 11:29:49 +0000
commit26da8859db038a267881744b802738ded6a36f39 (patch)
treedeef7bf85fb0ed005180e21fb5e29c0e698a0df8 /testplugins/org.eclipse.jdt.ui.tests.refactoring
parent13a070b9f9759d52b4fc3ee1d3aa35b29c2867d7 (diff)
downloadorg.eclipse.objectteams-26da8859db038a267881744b802738ded6a36f39.tar.gz
org.eclipse.objectteams-26da8859db038a267881744b802738ded6a36f39.tar.xz
org.eclipse.objectteams-26da8859db038a267881744b802738ded6a36f39.zip
completing the update to helios M6 (version numbers of original changesets in old svn):
r23587 change one import (see Bug 301020 - JDT debug UI should use SWTFactory from debug UI) r23592 new in tests.compiler: src/org/eclipse/jdt/core/tests/dom/StandAloneASTParserTest.java r23595 harness new resolve method with Dependencies, fixes new tests in StandAloneASTParserTest r23596 add new test resource, fixes new test in FormatterRegressionTest. r23597 fix an update-bug (ImportRewriteAnalyzer v_A39) witnessed by three failures in ImportRewriteTest r23598 add new test resource, fixes new test in MoveInnerToToplevel
Diffstat (limited to 'testplugins/org.eclipse.jdt.ui.tests.refactoring')
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_0/in/A.java9
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_0/out/A.java5
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_0/out/Secondary.java4
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_1/in/A.java13
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_1/out/A.java7
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_1/out/Secondary.java6
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_2/in/A.java15
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_2/out/A.java10
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_2/out/Secondary.java7
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_3/in/A.java18
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_3/in/S.java5
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_3/out/A.java13
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_3/out/S.java5
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_3/out/Secondary.java9
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_4/in/A.java11
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_4/out/A.java6
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_4/out/Secondary.java7
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_5/in/A.java13
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_5/out/A.java7
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_5/out/Secondary.java7
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_6/in/A.java17
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_6/out/A.java10
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_6/out/Secondary.java10
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/in/A.java20
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/in/S.java5
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/in/T.java5
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/out/A.java15
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/out/S.java5
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/out/Secondary.java9
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/out/T.java5
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/in/A.java24
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/in/S.java5
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/in/T.java5
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/out/A.java13
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/out/S.java5
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/out/Secondary.java13
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/out/T.java5
-rw-r--r--testplugins/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/MoveInnerToTopLevelTests.java53
38 files changed, 401 insertions, 0 deletions
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_0/in/A.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_0/in/A.java
new file mode 100644
index 000000000..f957c4ca9
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_0/in/A.java
@@ -0,0 +1,9 @@
+package p;
+
+public class A {
+
+}
+
+class Secondary {
+
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_0/out/A.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_0/out/A.java
new file mode 100644
index 000000000..e9f460b11
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_0/out/A.java
@@ -0,0 +1,5 @@
+package p;
+
+public class A {
+
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_0/out/Secondary.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_0/out/Secondary.java
new file mode 100644
index 000000000..0ad739974
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_0/out/Secondary.java
@@ -0,0 +1,4 @@
+package p;
+class Secondary {
+
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_1/in/A.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_1/in/A.java
new file mode 100644
index 000000000..fff8f884a
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_1/in/A.java
@@ -0,0 +1,13 @@
+package p;
+
+public class A {
+ void f(){
+ new Secondary();
+ }
+}
+
+class Secondary {
+ void f(){
+
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_1/out/A.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_1/out/A.java
new file mode 100644
index 000000000..f482072db
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_1/out/A.java
@@ -0,0 +1,7 @@
+package p;
+
+public class A {
+ void f(){
+ new Secondary();
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_1/out/Secondary.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_1/out/Secondary.java
new file mode 100644
index 000000000..0da6c3582
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_1/out/Secondary.java
@@ -0,0 +1,6 @@
+package p;
+class Secondary {
+ void f(){
+
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_2/in/A.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_2/in/A.java
new file mode 100644
index 000000000..656b5701a
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_2/in/A.java
@@ -0,0 +1,15 @@
+package p;
+
+public class A {
+ class B {
+ void B(){
+ Secondary s= new Secondary();
+
+ }
+ }
+}
+final class Secondary {
+ void f(){
+ new A().new B();
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_2/out/A.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_2/out/A.java
new file mode 100644
index 000000000..5272c5297
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_2/out/A.java
@@ -0,0 +1,10 @@
+package p;
+
+public class A {
+ class B {
+ void B(){
+ Secondary s= new Secondary();
+
+ }
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_2/out/Secondary.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_2/out/Secondary.java
new file mode 100644
index 000000000..365545610
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_2/out/Secondary.java
@@ -0,0 +1,7 @@
+package p;
+
+final class Secondary {
+ void f(){
+ new A().new B();
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_3/in/A.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_3/in/A.java
new file mode 100644
index 000000000..0060c64bb
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_3/in/A.java
@@ -0,0 +1,18 @@
+package p;
+
+import q.S;
+
+public class A {
+ S s= new S();
+ class B {
+ public B(){
+ Secondary sec= new Secondary();
+ sec.f(s);
+ }
+ }
+}
+final class Secondary {
+ void f(S s){
+
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_3/in/S.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_3/in/S.java
new file mode 100644
index 000000000..50cb8c1b9
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_3/in/S.java
@@ -0,0 +1,5 @@
+package q;
+
+public class S {
+
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_3/out/A.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_3/out/A.java
new file mode 100644
index 000000000..f70a7707b
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_3/out/A.java
@@ -0,0 +1,13 @@
+package p;
+
+import q.S;
+
+public class A {
+ S s= new S();
+ class B {
+ public B(){
+ Secondary sec= new Secondary();
+ sec.f(s);
+ }
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_3/out/S.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_3/out/S.java
new file mode 100644
index 000000000..50cb8c1b9
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_3/out/S.java
@@ -0,0 +1,5 @@
+package q;
+
+public class S {
+
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_3/out/Secondary.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_3/out/Secondary.java
new file mode 100644
index 000000000..a2e3a39ce
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_3/out/Secondary.java
@@ -0,0 +1,9 @@
+package p;
+
+import q.S;
+
+final class Secondary {
+ void f(S s){
+
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_4/in/A.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_4/in/A.java
new file mode 100644
index 000000000..f5c5f1153
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_4/in/A.java
@@ -0,0 +1,11 @@
+package p;
+
+class A{
+ class Inner{
+ }
+}
+class Secondary extends A{
+ void f(){
+ new Inner();
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_4/out/A.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_4/out/A.java
new file mode 100644
index 000000000..cd5600eb8
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_4/out/A.java
@@ -0,0 +1,6 @@
+package p;
+
+class A{
+ class Inner{
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_4/out/Secondary.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_4/out/Secondary.java
new file mode 100644
index 000000000..7bcfc9cca
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_4/out/Secondary.java
@@ -0,0 +1,7 @@
+package p;
+
+class Secondary extends A{
+ void f(){
+ new Inner();
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_5/in/A.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_5/in/A.java
new file mode 100644
index 000000000..85d5fe5ee
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_5/in/A.java
@@ -0,0 +1,13 @@
+package p;
+
+class A{
+ A a;
+ class Inner {
+ }
+}
+
+class Secondary {
+ void f(A a){
+ a.a.a.new Inner();
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_5/out/A.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_5/out/A.java
new file mode 100644
index 000000000..ba2337de1
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_5/out/A.java
@@ -0,0 +1,7 @@
+package p;
+
+class A{
+ A a;
+ class Inner {
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_5/out/Secondary.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_5/out/Secondary.java
new file mode 100644
index 000000000..6d88f1b02
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_5/out/Secondary.java
@@ -0,0 +1,7 @@
+package p;
+
+class Secondary {
+ void f(A a){
+ a.a.a.new Inner();
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_6/in/A.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_6/in/A.java
new file mode 100644
index 000000000..e971e0508
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_6/in/A.java
@@ -0,0 +1,17 @@
+package p;
+
+import p.A.X.Inner;
+
+class A {
+ class X {
+ class Inner {
+
+ }
+ }
+}
+class Secondary {
+ void f(){
+ Inner x= new A().new X().new Inner();
+
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_6/out/A.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_6/out/A.java
new file mode 100644
index 000000000..84a3fed91
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_6/out/A.java
@@ -0,0 +1,10 @@
+package p;
+
+
+class A {
+ class X {
+ class Inner {
+
+ }
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_6/out/Secondary.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_6/out/Secondary.java
new file mode 100644
index 000000000..a7ca00215
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_6/out/Secondary.java
@@ -0,0 +1,10 @@
+package p;
+
+import p.A.X.Inner;
+
+class Secondary {
+ void f(){
+ Inner x= new A().new X().new Inner();
+
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/in/A.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/in/A.java
new file mode 100644
index 000000000..6a889333a
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/in/A.java
@@ -0,0 +1,20 @@
+package p;
+
+import q.S;
+import q.T;
+
+public class A {
+ S s= new S();
+ T t= new T();
+ class B {
+ public B(){
+ Secondary sec= new Secondary();
+ sec.f(s);
+ }
+ }
+}
+final class Secondary {
+ void f(S s){
+
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/in/S.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/in/S.java
new file mode 100644
index 000000000..50cb8c1b9
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/in/S.java
@@ -0,0 +1,5 @@
+package q;
+
+public class S {
+
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/in/T.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/in/T.java
new file mode 100644
index 000000000..d49d13172
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/in/T.java
@@ -0,0 +1,5 @@
+package q;
+
+public class T {
+
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/out/A.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/out/A.java
new file mode 100644
index 000000000..82ef532b9
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/out/A.java
@@ -0,0 +1,15 @@
+package p;
+
+import q.S;
+import q.T;
+
+public class A {
+ S s= new S();
+ T t= new T();
+ class B {
+ public B(){
+ Secondary sec= new Secondary();
+ sec.f(s);
+ }
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/out/S.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/out/S.java
new file mode 100644
index 000000000..50cb8c1b9
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/out/S.java
@@ -0,0 +1,5 @@
+package q;
+
+public class S {
+
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/out/Secondary.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/out/Secondary.java
new file mode 100644
index 000000000..d71bd83e2
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/out/Secondary.java
@@ -0,0 +1,9 @@
+package p;
+
+import q.S;
+
+final class Secondary {
+ void f(S s){
+
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/out/T.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/out/T.java
new file mode 100644
index 000000000..d49d13172
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_7/out/T.java
@@ -0,0 +1,5 @@
+package q;
+
+public class T {
+
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/in/A.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/in/A.java
new file mode 100644
index 000000000..070f4b668
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/in/A.java
@@ -0,0 +1,24 @@
+package p;
+
+import q.S;
+import q.T;
+
+public class A {
+
+ class B {
+ public B(){
+ Secondary sec= new Secondary();
+ sec.f();
+ sec.g();
+ }
+ }
+}
+
+final class Secondary {
+ void f(){
+ S s= new S();
+ }
+ void g(){
+ T t= new T();
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/in/S.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/in/S.java
new file mode 100644
index 000000000..50cb8c1b9
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/in/S.java
@@ -0,0 +1,5 @@
+package q;
+
+public class S {
+
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/in/T.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/in/T.java
new file mode 100644
index 000000000..d49d13172
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/in/T.java
@@ -0,0 +1,5 @@
+package q;
+
+public class T {
+
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/out/A.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/out/A.java
new file mode 100644
index 000000000..6b3def548
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/out/A.java
@@ -0,0 +1,13 @@
+package p;
+
+
+public class A {
+
+ class B {
+ public B(){
+ Secondary sec= new Secondary();
+ sec.f();
+ sec.g();
+ }
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/out/S.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/out/S.java
new file mode 100644
index 000000000..50cb8c1b9
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/out/S.java
@@ -0,0 +1,5 @@
+package q;
+
+public class S {
+
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/out/Secondary.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/out/Secondary.java
new file mode 100644
index 000000000..33fd1722b
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/out/Secondary.java
@@ -0,0 +1,13 @@
+package p;
+
+import q.S;
+import q.T;
+
+final class Secondary {
+ void f(){
+ S s= new S();
+ }
+ void g(){
+ T t= new T();
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/out/T.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/out/T.java
new file mode 100644
index 000000000..d49d13172
--- /dev/null
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test_secondary_8/out/T.java
@@ -0,0 +1,5 @@
+package q;
+
+public class T {
+
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/MoveInnerToTopLevelTests.java b/testplugins/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/MoveInnerToTopLevelTests.java
index bea53e81f..12b7f915f 100644
--- a/testplugins/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/MoveInnerToTopLevelTests.java
+++ b/testplugins/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/MoveInnerToTopLevelTests.java
@@ -39,6 +39,8 @@ import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings;
public class MoveInnerToTopLevelTests extends RefactoringTest {
+ private static final boolean BUG_304827= true; // too many imports, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=304827
+
private static final String FIELD_COMMENT= "/** Comment */";
private static final Class clazz= MoveInnerToTopLevelTests.class;
private static final String REFACTORING_PATH= "MoveInnerToTopLevel/";
@@ -91,6 +93,12 @@ public class MoveInnerToTopLevelTests extends RefactoringTest {
return getType(createCUfromTestFile(pack, className), className);
}
+ private void validatePassingTestSecondaryType(String primaryTypeName, String secondaryTypeName, String packageName, String[] cuNames, String[] packageNames, String enclosingInstanceName, boolean makeFinal, boolean possible, boolean mandatory, boolean createFieldIfPossible) throws Exception {
+ ICompilationUnit cu= createCUfromTestFile(getPackage(packageName), primaryTypeName);
+ IType secType= getType(cu, secondaryTypeName);
+ validatePassingTest(secondaryTypeName, secType, cuNames, packageNames, enclosingInstanceName, makeFinal, possible, mandatory, createFieldIfPossible);
+ }
+
private void validatePassingTest(String parentClassName, String className, String packageName, String[] cuNames, String[] packageNames, String enclosingInstanceName, boolean makeFinal, boolean possible, boolean mandatory, boolean createFieldIfPossible) throws Exception {
IType parentClas= getClassFromTestFile(getPackage(packageName), parentClassName);
IType clas= parentClas.getType(className);
@@ -541,4 +549,49 @@ public class MoveInnerToTopLevelTests extends RefactoringTest {
MoveInnerToTopRefactoring ref= ((RefactoringAvailabilityTester.isMoveInnerAvailable(nestedLocal)) ? new MoveInnerToTopRefactoring(nestedLocal, JavaPreferencesSettings.getCodeGenerationSettings(parentClas.getJavaProject())) : null);
assertNull("refactoring was not supposed to be available", ref);
}
+
+ // --- Secondary classes
+ public void test_secondary_0() throws Exception {
+ validatePassingTestSecondaryType("A", "Secondary", "p", new String[] { "A" }, new String[] { "p" }, null, false, false, false, false);
+ }
+
+ public void test_secondary_1() throws Exception {
+ validatePassingTestSecondaryType("A", "Secondary", "p", new String[] { "A" }, new String[] { "p" }, null, false, false, false, false);
+ }
+
+ public void test_secondary_2() throws Exception {
+ if (BUG_304827)
+ return;
+ validatePassingTestSecondaryType("A", "Secondary", "p", new String[] { "A" }, new String[] { "p" }, null, false, false, false, false);
+ }
+
+ public void test_secondary_3() throws Exception {
+ validatePassingTestSecondaryType("A", "Secondary", "p", new String[] { "A", "S" }, new String[] { "p", "q" }, null, false, false, false, false);
+ }
+
+ public void test_secondary_4() throws Exception {
+ if (BUG_304827)
+ return;
+ validatePassingTestSecondaryType("A", "Secondary", "p", new String[] { "A" }, new String[] { "p" }, null, false, false, false, false);
+ }
+
+ public void test_secondary_5() throws Exception {
+ if (BUG_304827)
+ return;
+ validatePassingTestSecondaryType("A", "Secondary", "p", new String[] { "A" }, new String[] { "p" }, null, false, false, false, false);
+ }
+
+ public void test_secondary_6() throws Exception {
+ if (BUG_304827)
+ return;
+ validatePassingTestSecondaryType("A", "Secondary", "p", new String[] { "A" }, new String[] { "p" }, null, false, false, false, false);
+ }
+
+ public void test_secondary_7() throws Exception {
+ validatePassingTestSecondaryType("A", "Secondary", "p", new String[] { "A", "S", "T" }, new String[] { "p", "q", "q" }, null, false, false, false, false);
+ }
+
+ public void test_secondary_8() throws Exception {
+ validatePassingTestSecondaryType("A", "Secondary", "p", new String[] { "A", "S", "T" }, new String[] { "p", "q", "q" }, null, false, false, false, false);
+ }
}

Back to the top