mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
@NotNull
This commit is contained in:
+2
-2
@@ -45,7 +45,7 @@ public abstract class GroovyNamedArgumentProvider {
|
||||
@Nullable PsiElement resolve,
|
||||
@Nullable String argumentName,
|
||||
boolean forCompletion,
|
||||
Map<String, NamedArgumentDescriptor> result) {
|
||||
@NotNull Map<String, NamedArgumentDescriptor> result) {
|
||||
// no op
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public abstract class GroovyNamedArgumentProvider {
|
||||
@Nullable GroovyResolveResult resolveResult,
|
||||
@Nullable String argumentName,
|
||||
boolean forCompletion,
|
||||
Map<String, NamedArgumentDescriptor> result) {
|
||||
@NotNull Map<String, NamedArgumentDescriptor> result) {
|
||||
getNamedArguments(call, resolve, argumentName, forCompletion, result);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -56,7 +56,7 @@ public class GroovyConstructorNamedArgumentProvider extends GroovyNamedArgumentP
|
||||
@Nullable PsiElement resolve,
|
||||
@Nullable String argumentName,
|
||||
boolean forCompletion,
|
||||
Map<String, NamedArgumentDescriptor> result) {
|
||||
@NotNull Map<String, NamedArgumentDescriptor> result) {
|
||||
if (!(call instanceof GrNewExpression)) return;
|
||||
|
||||
if (resolve != null) {
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -37,7 +37,7 @@ public class GroovyMethodReturnNamedArgumentProvider extends GroovyNamedArgument
|
||||
@Nullable PsiElement resolve,
|
||||
@Nullable String argumentName,
|
||||
boolean forCompletion,
|
||||
Map<String, NamedArgumentDescriptor> result) {
|
||||
@NotNull Map<String, NamedArgumentDescriptor> result) {
|
||||
if (!forCompletion || !(resolve instanceof PsiMethod)) return;
|
||||
|
||||
PsiType returnType = ((PsiMethod)resolve).getReturnType();
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -37,7 +37,7 @@ public class GroovySourceCodeNamedArgumentProvider extends GroovyNamedArgumentPr
|
||||
@Nullable PsiElement resolve,
|
||||
@Nullable String argumentName,
|
||||
boolean forCompletion,
|
||||
Map<String, NamedArgumentDescriptor> result) {
|
||||
@NotNull Map<String, NamedArgumentDescriptor> result) {
|
||||
if (resolve instanceof GrMethod) {
|
||||
result.putAll(((GrMethod)resolve).getNamedParameters());
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -42,7 +42,7 @@ public class SwingBuilderNamedArgumentProvider extends GroovyNamedArgumentProvid
|
||||
@Nullable PsiElement resolve,
|
||||
@Nullable String argumentName,
|
||||
boolean forCompletion,
|
||||
Map<String, NamedArgumentDescriptor> result) {
|
||||
@NotNull Map<String, NamedArgumentDescriptor> result) {
|
||||
PsiType returnType = resolve == null ? null : ((PsiMethod)resolve).getReturnType();
|
||||
PsiClass aClass = PsiTypesUtil.getPsiClass(returnType);
|
||||
if (aClass == null) return;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -469,6 +469,7 @@ class Test {
|
||||
|
||||
private doTestCompletionWithinMap(String text, String text2 = null) {
|
||||
PlatformTestUtil.registerExtension GroovyNamedArgumentProvider.EP_NAME, new GroovyNamedArgumentProvider() {
|
||||
@NotNull
|
||||
@Override
|
||||
Map<String, NamedArgumentDescriptor> getNamedArguments(@NotNull GrListOrMap literal) {
|
||||
['foo': NamedArgumentDescriptor.SIMPLE_NORMAL, 'bar': NamedArgumentDescriptor.SIMPLE_NORMAL]
|
||||
|
||||
Reference in New Issue
Block a user