[java-intentions] IDEA-281930 Add intention preview to "Generate overloaded method with default parameter values"

GitOrigin-RevId: eeb962179b247dec1f55c452c1dcaeffad649227
This commit is contained in:
Tagir Valeev
2021-11-12 20:34:32 +07:00
committed by intellij-monorepo-bot
parent a259330771
commit d9160635a7
14 changed files with 54 additions and 20 deletions

View File

@@ -1,7 +1,7 @@
// "Generate overloaded method with default parameter values" "true"
class Test {
void foo() {
foo(<caret>);
foo(<selection>0<caret></selection>);
}
void foo(int ii){

View File

@@ -1,7 +1,7 @@
// "Generate overloaded method with default parameter values" "true"
abstract class Test {
int foo(boolean... args) {
return foo(<caret>, args);
return foo(<selection>0<caret></selection>, args);
}
abstract int foo(int ii, boolean... args);

View File

@@ -1,7 +1,7 @@
// "Generate overloaded method with default parameter values" "true"
class Test {
int foo() {
return foo();
return foo(0);
}
int foo(int ii){

View File

@@ -1,7 +1,7 @@
// "Generate overloaded constructor with default parameter values" "true"
class Test {
Test() {
this(<caret>);
this(<selection>0<caret></selection>);
}
Test(int ii){}

View File

@@ -1,7 +1,7 @@
// "Generate overloaded method with default parameter values" "true"
interface Test {
default void foo() {
foo();
foo(0);
}
void foo(int ii);

View File

@@ -3,7 +3,7 @@ class Test {
/**
*/
void foo() {
foo();
foo(0);
}
/**

View File

@@ -1,7 +1,7 @@
// "Generate overloaded constructor with default parameter values" "true"
record Test(int x) {
Test() {
this();
this(0);
}
public Test {

View File

@@ -1,7 +1,7 @@
// "Generate overloaded method with default parameter values" "true"
class Test {
int foo() {
return foo(<caret>);
return foo(<selection>0<caret></selection>);
}
int foo(int ii){

View File

@@ -1,7 +1,7 @@
// "Generate overloaded method with default parameter values" "true"
interface Test {
static void foo() {
foo();
foo(0);
}
static void foo(int ii) {}

View File

@@ -1,7 +1,7 @@
// "Generate overloaded method with default parameter values" "true"
class Test {
<T> int foo(boolean... args) {
return foo(<caret>, args);
return foo(<selection>null<caret></selection>, args);
}
<T> int foo(T ii, boolean... args){

View File

@@ -1,7 +1,7 @@
// "Generate overloaded method with default parameter values" "true"
class Test {
int foo(boolean... args) {
return foo(<caret>, args);
return foo(<selection>0<caret></selection>, args);
}
int foo(int ii, boolean... args){