From 1ed8715009ae083685419c86a1721dea27b41d86 Mon Sep 17 00:00:00 2001 From: "Ilya.Kazakevich" Date: Thu, 24 Apr 2014 02:24:47 +0400 Subject: [PATCH] PY-1194 Provide completion and navigation for url tag in django template Inspection added. TODO: Cover it with tests --- .../DjangoUrlArgumentsInspection.html | 8 ++++++++ python/src/com/jetbrains/python/psi/PyUtil.java | 15 --------------- 2 files changed, 8 insertions(+), 15 deletions(-) create mode 100644 python/resources/inspectionDescriptions/DjangoUrlArgumentsInspection.html diff --git a/python/resources/inspectionDescriptions/DjangoUrlArgumentsInspection.html b/python/resources/inspectionDescriptions/DjangoUrlArgumentsInspection.html new file mode 100644 index 000000000000..fef07306b84a --- /dev/null +++ b/python/resources/inspectionDescriptions/DjangoUrlArgumentsInspection.html @@ -0,0 +1,8 @@ + + + +Django inspection that checks "{% url %}" tag for required arguments. +It ensures that all arguments are passed correctly. + + + \ No newline at end of file diff --git a/python/src/com/jetbrains/python/psi/PyUtil.java b/python/src/com/jetbrains/python/psi/PyUtil.java index 22eaea276e3d..49a024bcd2f7 100644 --- a/python/src/com/jetbrains/python/psi/PyUtil.java +++ b/python/src/com/jetbrains/python/psi/PyUtil.java @@ -831,21 +831,6 @@ public class PyUtil { } - /** - * Returns empty array if null is provided. Returns provided array otherwise. - * @param expression array expression - * @param array type - * @return provided array or empty array if parameter is null - */ - @SuppressWarnings("unchecked") - @NotNull - public static T[] notNullArray(@Nullable final T[] expression) { - if (expression != null) { - return expression; - } - return (T[]) EMPTY_OBJECTS; - } - public static class KnownDecoratorProviderHolder { public static PyKnownDecoratorProvider[] KNOWN_DECORATOR_PROVIDERS = Extensions.getExtensions(PyKnownDecoratorProvider.EP_NAME);