mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 08:06:56 +07:00
[java-refactoring] IntroduceVariableBase: use computeWithAlternativeResolveEnabled
GitOrigin-RevId: 82b6b1ab4bec9b12f65722d6b904ed1cd6ddc54b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0b7995dbd1
commit
2b639d4b80
@@ -341,8 +341,9 @@ public abstract class IntroduceVariableBase extends IntroduceHandlerBase {
|
||||
}
|
||||
|
||||
try {
|
||||
JavaPsiFacade.getElementFactory(project).createTypeElementFromText(
|
||||
GenericsUtil.getVariableTypeByExpressionType(originalType).getCanonicalText(), expr);
|
||||
PsiType type = DumbService.getInstance(project)
|
||||
.computeWithAlternativeResolveEnabled(() -> GenericsUtil.getVariableTypeByExpressionType(originalType));
|
||||
JavaPsiFacade.getElementFactory(project).createTypeElementFromText(type.getCanonicalText(), expr);
|
||||
}
|
||||
catch (IncorrectOperationException ignore) {
|
||||
String message = RefactoringBundle.getCannotRefactorMessage(JavaRefactoringBundle.message("unknown.expression.type"));
|
||||
|
||||
Reference in New Issue
Block a user