PsiJavaCodeReferenceElementImpl: preserve tokens (comments/whitespace) between name element and parameter list

This commit is contained in:
Tagir Valeev
2018-07-11 14:43:42 +07:00
parent fc9ed3f447
commit 3fad9a22f4
3 changed files with 35 additions and 3 deletions
@@ -0,0 +1,13 @@
// "Replace with forEach" "true"
import java.util.*;
public class Test {
void test(Collection<String> obj) {
obj.forEach(str -> {
List// declaration
<String> s2 = Collections.singleton(str);
System.out.println(str + s2);
});
}
}
@@ -0,0 +1,13 @@
// "Replace with forEach" "true"
import java.util.*;
public class Test {
void test(Collection<String> obj) {
for(String str : <caret>obj) {
List// declaration
<String> s2 = Collections.singleton(str);
System.out.println(str+s2);
}
}
}