mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inplace renaming with injections
This commit is contained in:
+1
-1
@@ -190,7 +190,7 @@ public abstract class InplaceRefactoring {
|
||||
return buildTemplateAndStart(refs, stringUsages, scope, containingFile);
|
||||
}
|
||||
|
||||
protected boolean notSameFile(@Nullable VirtualFile file, PsiFile containingFile) {
|
||||
protected boolean notSameFile(@Nullable VirtualFile file, @NotNull PsiFile containingFile) {
|
||||
return !Comparing.equal(getTopLevelVirtualFile(containingFile.getViewProvider()), file);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -125,9 +125,9 @@ public class MemberInplaceRenamer extends VariableInplaceRenamer {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean notSameFile(@Nullable VirtualFile file, PsiFile containingFile) {
|
||||
protected boolean notSameFile(@Nullable VirtualFile file, @NotNull PsiFile containingFile) {
|
||||
final PsiFile currentFile = PsiDocumentManager.getInstance(myProject).getPsiFile(myEditor.getDocument());
|
||||
return currentFile == null || containingFile != currentFile;
|
||||
return currentFile == null || InjectedLanguageUtil.getTopLevelFile(containingFile) != InjectedLanguageUtil.getTopLevelFile(currentFile);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user