mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 08:50:57 +07:00
introduce functional variable: encode this (IDEA-174203)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import java.util.function.Function;
|
||||
|
||||
class Test {
|
||||
String string;
|
||||
void useThis() {
|
||||
Function<String, String> stringStringFunction = string -> string;
|
||||
System.out.println(stringStringFunction.apply(string));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class Test {
|
||||
String string;
|
||||
void useThis() {
|
||||
System.out.println(<selection>this.string</selection>);
|
||||
}
|
||||
}
|
||||
@@ -67,6 +67,10 @@ public class IntroduceFunctionalVariableTest extends LightRefactoringTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testChangeContextBeforePuttingIntoAnonymous() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testIgnoreMethodObjectSuggestion() throws Exception {
|
||||
try {
|
||||
doTest();
|
||||
|
||||
Reference in New Issue
Block a user