mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
diagnostics for http://ea.jetbrains.com/browser/ea_problems/16883
This commit is contained in:
+6
-8
@@ -418,8 +418,12 @@ public class FileReference implements FileReferenceOwner, PsiPolyVariantReferenc
|
||||
break;
|
||||
}
|
||||
}
|
||||
checkNotNull(curItem, curVFile, dstVFile);
|
||||
assert curItem != null;
|
||||
if (curItem == null) {
|
||||
throw new IncorrectOperationException("Cannot find path between files; " +
|
||||
"src = " + curVFile.getPresentableUrl() + "; " +
|
||||
"dst = " + dstVFile.getPresentableUrl() + "; " +
|
||||
"Contexts: " + contexts);
|
||||
}
|
||||
if (curItem.equals(dstItem)) {
|
||||
if (getCanonicalText().equals(dstItem.getName())) {
|
||||
return getElement();
|
||||
@@ -453,12 +457,6 @@ public class FileReference implements FileReferenceOwner, PsiPolyVariantReferenc
|
||||
return manipulator.handleContentChange(getElement(), range, newName);
|
||||
}
|
||||
|
||||
private static void checkNotNull(final Object o, final VirtualFile curVFile, final VirtualFile dstVFile) throws IncorrectOperationException {
|
||||
if (o == null) {
|
||||
throw new IncorrectOperationException("Cannot find path between files; src = " + curVFile.getPresentableUrl() + "; dst = " + dstVFile.getPresentableUrl());
|
||||
}
|
||||
}
|
||||
|
||||
public void registerQuickfix(HighlightInfo info, FileReference reference) {
|
||||
for (final FileReferenceHelper helper : getHelpers()) {
|
||||
helper.registerFixes(info, reference);
|
||||
|
||||
Reference in New Issue
Block a user