mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
disable inline reference for static import
EA-60471 - CCE: InlineMethodProcessor.doRefactoring
This commit is contained in:
@@ -23,6 +23,7 @@ import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.vfs.ReadonlyStatusHandler;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.refactoring.HelpID;
|
||||
import com.intellij.refactoring.RefactoringBundle;
|
||||
import com.intellij.refactoring.util.CommonRefactoringUtil;
|
||||
@@ -122,6 +123,10 @@ class InlineMethodHandler extends JavaInlineActionHandler {
|
||||
}
|
||||
}
|
||||
|
||||
if (reference != null && PsiTreeUtil.getParentOfType(reference.getElement(), PsiImportStaticStatement.class) != null) {
|
||||
reference = null;
|
||||
}
|
||||
|
||||
final boolean invokedOnReference = reference != null;
|
||||
if (!invokedOnReference) {
|
||||
final VirtualFile vFile = method.getContainingFile().getVirtualFile();
|
||||
|
||||
Reference in New Issue
Block a user