CodeEditUtil#removeChildren: fixed nextLeaf determination

Before when removing more than one element, nextLeaf was invalid as well. The invalidation check below did not work as parent might still exist (element might be relinked to dummy file)

Fixes IDEA-187531 "Add on demand static import" with intervening comment and an empty line breaks code
This commit is contained in:
Tagir Valeev
2018-03-03 15:47:21 +07:00
parent 48848a8a7b
commit 43b86a988e
51 changed files with 77 additions and 63 deletions
@@ -0,0 +1,9 @@
// "Add on demand static import for 'java.lang.annotation.ElementType'" "true"
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
@Target({//simple end comment
METHOD})
@interface F {}
@@ -0,0 +1,8 @@
// "Add on demand static import for 'java.lang.annotation.ElementType'" "true"
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
@Target({Element<caret>Type.//simple end comment
METHOD})
@interface F {}
@@ -2,7 +2,7 @@
abstract class AsyncTask<A, B, C> {
abstract C doin(A... a);
}
class AAsync extends AsyncTask<String,Integer,Integer> {
class AAsync extends AsyncTask<String, Integer, Integer> {
@Override
Integer doin(String... a) {
return 1;
@@ -4,7 +4,7 @@ interface Main<A, B> {
List<A> foo();
}
class MainImpl implements Main<Integer,String> {
class MainImpl implements Main<Integer, String> {
@Override
public List<Integer> foo() {
return bar();