mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
check for file read-only status in IntroduceEmptyVariableHandler (following IDEA-CR-21447)
This commit is contained in:
+1
@@ -45,6 +45,7 @@ public class IntroduceEmptyVariableHandler {
|
||||
|
||||
public void invoke(@NotNull Editor editor, @NotNull PsiFile file, @NotNull PsiType type) {
|
||||
Project project = file.getProject();
|
||||
if (!CommonRefactoringUtil.checkReadOnlyStatus(project, file)) return;
|
||||
int offset = editor.getCaretModel().getOffset();
|
||||
PsiElement at = file.findElementAt(offset);
|
||||
PsiElement anchorStatement = RefactoringUtil.getParentStatement(at, false);
|
||||
|
||||
Reference in New Issue
Block a user