extend insert declaration/add cast intentions for the one line ref statement (IDEA-90448)

This commit is contained in:
Anna Kozlova
2012-08-24 12:39:03 +04:00
parent dacf72eac2
commit 899e8dccfa
8 changed files with 134 additions and 16 deletions
@@ -0,0 +1,9 @@
// "Cast to 'Runnable'" "true"
class C {
void f(Object o) {
if (o instanceof Runnable) {
((Runnable) o)<caret>
}
}
}
@@ -0,0 +1,9 @@
// "Cast to 'Runnable'" "false"
class C {
void f(Object o) {
if (!(o instanceof Runnable)) {
o<caret>
}
}
}
@@ -0,0 +1,9 @@
// "Cast to 'Runnable'" "true"
class C {
void f(Object o) {
if (o instanceof Runnable) {
o<caret>
}
}
}
@@ -0,0 +1,10 @@
// "Insert '(Runnable)o' declaration" "true"
class C {
void f(Object o) {
if (o instanceof Runnable) {
Runnable runnable = (Runnable) o;
<caret>
}
}
}
@@ -0,0 +1,9 @@
// "Insert '(Runnable)o' declaration" "false"
class C {
void f(Object o) {
if (!(o instanceof Runnable)) {
o<caret>
}
}
}
@@ -0,0 +1,9 @@
// "Insert '(Runnable)o' declaration" "true"
class C {
void f(Object o) {
if (o instanceof Runnable) {
o<caret>
}
}
}