mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
correctly handle inner classes removal
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
Cleaning output files:
|
||||
out/production/DeleteInnerClass/A$Inner.class
|
||||
out/production/DeleteInnerClass/A.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/A.java
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/DeleteInnerClass/B.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/B.java
|
||||
End of files
|
||||
@@ -0,0 +1,5 @@
|
||||
public class A {
|
||||
public static class Inner {
|
||||
public static final Integer field = new Integer(10);
|
||||
}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public class A {
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
public class B {
|
||||
Integer foo () {
|
||||
return A.Inner.field;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
Cleaning output files:
|
||||
out/production/DeleteInnerClass1/A$Inner.class
|
||||
out/production/DeleteInnerClass1/A.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/A.java
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/DeleteInnerClass1/B.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/B.java
|
||||
End of files
|
||||
@@ -0,0 +1,6 @@
|
||||
public class A {
|
||||
public static class Inner {
|
||||
public static void method(){
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public class A {
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
public class B {
|
||||
void foo () {
|
||||
A.Inner.method();
|
||||
}
|
||||
}
|
||||
@@ -1752,6 +1752,8 @@ public class Mappings {
|
||||
myPresent.appendDependents(c, state.myDependants);
|
||||
debug("Adding usages of class ", c.name);
|
||||
state.myAffectedUsages.add(c.createUsage());
|
||||
debug("Affecting usages of removed class ", c.name);
|
||||
affectAll(c.name, myAffectedFiles, myFilter);
|
||||
}
|
||||
}
|
||||
debug("End of removed classes processing.");
|
||||
|
||||
@@ -50,7 +50,7 @@ public class CommonTest extends IncrementalTestCase {
|
||||
|
||||
public void testDeleteClassAfterCompileErrors() throws Exception {
|
||||
setupInitialProject();
|
||||
|
||||
|
||||
doTestBuild(2);
|
||||
}
|
||||
|
||||
@@ -91,18 +91,26 @@ public class CommonTest extends IncrementalTestCase {
|
||||
}
|
||||
|
||||
public void testDeleteClass3() throws Exception {
|
||||
doTest();
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testDeleteClass4() throws Exception {
|
||||
doTest();
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testDeleteInnerClass() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testDeleteInnerClass1() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testAddClass() throws Exception {
|
||||
doTest();
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testAddDuplicateClass() throws Exception {
|
||||
doTest();
|
||||
doTest();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user