mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
AddExceptionToExistingCatch: fix non replacement intention text
This commit is contained in:
@@ -17,7 +17,7 @@ add.exception.to.throws.family=Add exception to method signature
|
||||
add.exception.to.existing.catch.family=Add exception to existing catch clause
|
||||
add.exception.to.existing.catch.generic=Add exception to existing catch clause
|
||||
add.exception.to.existing.catch.replacement=Replace ''{0}'' with more generic ''{1}''
|
||||
add.exception.to.existing.catch.no.replacement=Replace ''{0}'' with ''{1}''
|
||||
add.exception.to.existing.catch.no.replacement=Add ''{1}'' to catch with ''{0}''
|
||||
add.exception.to.existing.catch.chooser.title=Select catch block
|
||||
|
||||
add.method.body.text=Add method body
|
||||
|
||||
+1
-1
@@ -197,7 +197,7 @@ public class AddExceptionToExistingCatchFix extends PsiElementBaseIntentionActio
|
||||
if (catchType instanceof PsiDisjunctionType) {
|
||||
PsiDisjunctionType disjunction = (PsiDisjunctionType)catchType;
|
||||
for (PsiType type : disjunction.getDisjunctions()) {
|
||||
if (type.isAssignableFrom(newException)) {
|
||||
if (newException.isAssignableFrom(type)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Replace 'C | D | B' with 'A'" "true"
|
||||
// "Replace 'C | D | B' with more generic 'A'" "true"
|
||||
import java.io.IOException;
|
||||
|
||||
class A extends Exception {}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Replace 'IndexOutOfBoundsException' with 'IOException'" "true"
|
||||
// "Add 'IOException' to catch with 'IndexOutOfBoundsException'" "true"
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Replace 'C | D | B' with 'A'" "true"
|
||||
// "Replace 'C | D | B' with more generic 'A'" "true"
|
||||
import java.io.IOException;
|
||||
|
||||
class A extends Exception {}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Replace 'IndexOutOfBoundsException' with 'IOException'" "true"
|
||||
// "Add 'IOException' to catch with 'IndexOutOfBoundsException'" "true"
|
||||
import java.io.File;
|
||||
|
||||
class Test {
|
||||
|
||||
Reference in New Issue
Block a user