mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Annotate PyReferenceOwner.getReference parameter as NotNull
This commit is contained in:
@@ -20,7 +20,7 @@ public class IpnbPyReferenceExpression extends PyReferenceExpressionImpl {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PsiPolyVariantReference getReference(PyResolveContext context) {
|
||||
public PsiPolyVariantReference getReference(@NotNull PyResolveContext context) {
|
||||
if (isQualified()) {
|
||||
return new PyQualifiedReference(this, context);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -24,5 +24,5 @@ import org.jetbrains.annotations.NotNull;
|
||||
*/
|
||||
public interface PyReferenceOwner extends PyElement {
|
||||
@NotNull
|
||||
PsiPolyVariantReference getReference(PyResolveContext context);
|
||||
PsiPolyVariantReference getReference(@NotNull PyResolveContext context);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -39,7 +39,7 @@ public class PyDocReferenceExpression extends PyReferenceExpressionImpl {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PsiPolyVariantReference getReference(PyResolveContext context) {
|
||||
public PsiPolyVariantReference getReference(@NotNull PyResolveContext context) {
|
||||
if (isQualified()) {
|
||||
return new PyQualifiedReference(this, context);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -31,7 +31,10 @@ import com.jetbrains.python.psi.types.*;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
@@ -119,7 +122,7 @@ public class PyBinaryExpressionImpl extends PyElementImpl implements PyBinaryExp
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PsiPolyVariantReference getReference(PyResolveContext context) {
|
||||
public PsiPolyVariantReference getReference(@NotNull PyResolveContext context) {
|
||||
return new PyOperatorReference(this, context);
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ public class PyPrefixExpressionImpl extends PyElementImpl implements PyPrefixExp
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PsiPolyVariantReference getReference(PyResolveContext context) {
|
||||
public PsiPolyVariantReference getReference(@NotNull PyResolveContext context) {
|
||||
return new PyOperatorReference(this, context);
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ public class PyReferenceExpressionImpl extends PyElementImpl implements PyRefere
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PsiPolyVariantReference getReference(PyResolveContext context) {
|
||||
public PsiPolyVariantReference getReference(@NotNull PyResolveContext context) {
|
||||
// Handle import reference
|
||||
final PsiElement importParent = PsiTreeUtil.getParentOfType(this, PyImportElement.class, PyFromImportStatement.class);
|
||||
if (importParent != null) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -111,7 +111,7 @@ public class PySubscriptionExpressionImpl extends PyElementImpl implements PySub
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PsiPolyVariantReference getReference(PyResolveContext context) {
|
||||
public PsiPolyVariantReference getReference(@NotNull PyResolveContext context) {
|
||||
return new PyOperatorReference(this, context);
|
||||
}
|
||||
|
||||
|
||||
@@ -563,7 +563,7 @@ public class PyTargetExpressionImpl extends PyBaseElementImpl<PyTargetExpression
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PsiPolyVariantReference getReference(final PyResolveContext resolveContext) {
|
||||
public PsiPolyVariantReference getReference(@NotNull final PyResolveContext resolveContext) {
|
||||
if (isQualified()) {
|
||||
return new PyQualifiedReference(this, resolveContext);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user