mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 10:48:09 +07:00
[java-intentions] Implement quick-fix to create record from deconstruction pattern, if the identifier is unresolved
IDEA-303300 GitOrigin-RevId: f4cd752f81987885a72b5da8d898f875a5198dcb
This commit is contained in:
committed by
intellij-monorepo-bot
parent
82f6661d34
commit
375b7b102f
@@ -0,0 +1,12 @@
|
||||
// "Create record 'Point'" "true-preview"
|
||||
class Test {
|
||||
void foo(Object obj) {
|
||||
switch (obj) {
|
||||
case Point(double x, double y) -> {}
|
||||
default -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public record Point(double x, double y) {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Create record 'Point'" "true-preview"
|
||||
class Test {
|
||||
void foo(Object obj) {
|
||||
switch (obj) {
|
||||
case Point(double x, double y) -> {}
|
||||
default -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public record Point(double x, double y) {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Create record 'Rect'" "true-preview"
|
||||
class Test {
|
||||
void foo(Object obj) {
|
||||
switch (obj) {
|
||||
case Rect(Point point1, Point(double x, double y)) -> {}
|
||||
default -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public record Rect(Point point1, Point point) {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Create record 'Point'" "true-preview"
|
||||
class Test {
|
||||
void foo(Object obj) {
|
||||
switch (obj) {
|
||||
case Poi<caret>nt(double x, double y) -> {}
|
||||
default -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Create record 'Point'" "true-preview"
|
||||
class Test {
|
||||
void foo(Object obj) {
|
||||
switch (obj) {
|
||||
case Poi<caret>nt(double x, double y) -> {}
|
||||
default -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Create record 'Rect'" "true-preview"
|
||||
class Test {
|
||||
void foo(Object obj) {
|
||||
switch (obj) {
|
||||
case Re<caret>ct(Point point1, Point(double x, double y)) -> {}
|
||||
default -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public record Point(double x, double y) {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public record Point(double x, double y) {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public record Rect(Point point1, Point point) {
|
||||
}
|
||||
Reference in New Issue
Block a user