mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 07:40:42 +07:00
CreateLocalVarFromInstanceofAction: use VariableNameGenerator (produces better results)
GitOrigin-RevId: 10d07e83576c67df180c8652d1003cf3de6810d1
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5b813d826b
commit
b990c89c65
+1
-1
@@ -2,7 +2,7 @@
|
||||
class C {
|
||||
void f(Object o) {
|
||||
if (o instanceof String) {
|
||||
String o1 = (String) o;
|
||||
String s = (String) o;
|
||||
<caret>
|
||||
o = "";
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
class X {
|
||||
void foo(Object o) {
|
||||
if (o instanceof String) {
|
||||
String o1 = (String) o;
|
||||
String s = (String) o;
|
||||
<caret>
|
||||
String substring = o.();
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import java.io.IOException;
|
||||
class C {
|
||||
void f(Object o) {
|
||||
if (o instanceof IOException) {
|
||||
IOException o1 = (IOException) o;
|
||||
IOException ioException = (IOException) o;
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
public abstract class A {
|
||||
public void getNodeElements(Object parent) {
|
||||
if (!(parent instanceof NodeInfo)) return;
|
||||
NodeInfo parent1 = (NodeInfo) parent;
|
||||
NodeInfo nodeInfo = (NodeInfo) parent;
|
||||
<caret>
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ class X {
|
||||
if (o instanceof String) {
|
||||
String a;
|
||||
String b;
|
||||
String o1 = (String) o;
|
||||
String s = (String) o;
|
||||
<caret>
|
||||
|
||||
String c;
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
class C {
|
||||
void f(Object o, Object f) {
|
||||
if (o instanceof String && f == null) {
|
||||
String o1 = (String) o;
|
||||
String s = (String) o;
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
class C {
|
||||
void f(Object o, Object f) {
|
||||
if (o instanceof String) {//todo comment
|
||||
String o1 = (String) o;
|
||||
String s = (String) o;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
class C {
|
||||
void f(Object o) {
|
||||
if (o instanceof Runnable) {
|
||||
Runnable o1 = (Runnable) o;
|
||||
Runnable runnable = (Runnable) o;
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
// "Insert '(String)x' declaration" "true"
|
||||
|
||||
class C {
|
||||
Object x = new Object();
|
||||
Object s = new Object();
|
||||
|
||||
void x() {
|
||||
if (x instanceof String) {
|
||||
String x = (String) this.x;
|
||||
String s1 = (String) x;
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// "Insert '(String)x' declaration" "true"
|
||||
|
||||
class C {
|
||||
Object x = new Object();
|
||||
Object s = new Object();
|
||||
|
||||
void x() {
|
||||
if (x insta<caret>nceof String) {
|
||||
|
||||
Reference in New Issue
Block a user