mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 14:25:04 +07:00
Insert casted declaration in a nice place without exceptions (IDEA-176211)
This commit is contained in:
-1
@@ -5,7 +5,6 @@ class C {
|
||||
if (s instanceof String) {
|
||||
String s1 = (String) s;
|
||||
<caret>
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Insert '(String)o' declaration" "true"
|
||||
class X {
|
||||
void foo(Object o) {
|
||||
if (o instanceof String) {
|
||||
String o1 = (String) o;
|
||||
<caret>
|
||||
String substring = o.();
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-2
@@ -5,8 +5,7 @@ class C {
|
||||
void f(Object o) {
|
||||
if (o instanceof IOException) {
|
||||
IOException o1 = (IOException) o;
|
||||
|
||||
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Insert '(String)o' declaration" "true"
|
||||
class X {
|
||||
void foo(Object o) {
|
||||
if (o instanceof String) {
|
||||
String a;
|
||||
String b;
|
||||
String o1 = (String) o;
|
||||
<caret>
|
||||
|
||||
String c;
|
||||
}
|
||||
}
|
||||
}
|
||||
-1
@@ -4,7 +4,6 @@ class C {
|
||||
if (o instanceof String && f == null) {
|
||||
String o1 = (String) o;
|
||||
<caret>
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
-1
@@ -2,7 +2,6 @@
|
||||
class C {
|
||||
void f(Object o, Object f) {
|
||||
if (o instanceof String) {//todo comment
|
||||
|
||||
String o1 = (String) o;
|
||||
|
||||
}
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Insert '(String)o' declaration" "true"
|
||||
class X {
|
||||
void foo(Object o) {
|
||||
if (o insta<caret>nceof String) {
|
||||
String substring = o.();
|
||||
}
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Insert '(String)o' declaration" "true"
|
||||
class X {
|
||||
void foo(Object o) {
|
||||
if (o insta<caret>nceof String) {
|
||||
String a;
|
||||
String b;
|
||||
|
||||
|
||||
String c;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user