mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
correct reference check
GitOrigin-RevId: a0be6d4d6d3d9c217ac1d3b477c29b951318273f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
bf512ba786
commit
a2b594c60d
@@ -7,9 +7,6 @@ import com.intellij.util.IncorrectOperationException;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* @author Eugene Zhuravlev
|
||||
*/
|
||||
public final class FieldFormReference extends ReferenceInForm {
|
||||
private final PsiReference myClassReference;
|
||||
private final String myComponentClassName;
|
||||
@@ -59,7 +56,8 @@ public final class FieldFormReference extends ReferenceInForm {
|
||||
}
|
||||
|
||||
final PsiField field = (PsiField)element;
|
||||
if (!myClassReference.equals(field.getContainingClass())) {
|
||||
PsiClass fieldClass = field.getContainingClass();
|
||||
if (fieldClass == null || !myClassReference.isReferenceTo(fieldClass)) {
|
||||
throw new IncorrectOperationException();
|
||||
}
|
||||
final String text = field.getName();
|
||||
|
||||
Reference in New Issue
Block a user