diff --git a/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/app/BootLanguageServerInitializer.java b/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/app/BootLanguageServerInitializer.java
index 9a78e82f2..51f03a005 100644
--- a/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/app/BootLanguageServerInitializer.java
+++ b/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/app/BootLanguageServerInitializer.java
@@ -22,7 +22,7 @@ import org.springframework.ide.vscode.boot.java.BootJavaLanguageServerComponents
import org.springframework.ide.vscode.boot.java.links.JavaElementLocationProvider;
import org.springframework.ide.vscode.boot.java.links.SourceLinks;
import org.springframework.ide.vscode.boot.java.livehover.v2.SpringProcessLiveDataProvider;
-import org.springframework.ide.vscode.boot.java.utils.CompilationUnitCache;
+import org.springframework.ide.vscode.boot.java.utils.ORCompilationUnitCache;
import org.springframework.ide.vscode.boot.java.utils.SymbolCache;
import org.springframework.ide.vscode.boot.metadata.ProjectBasedPropertyIndexProvider;
import org.springframework.ide.vscode.boot.properties.BootPropertiesLanguageServerComponents;
@@ -54,7 +54,7 @@ public class BootLanguageServerInitializer implements InitializingBean {
@Autowired SimpleLanguageServer server;
@Autowired BootLanguageServerParams params;
@Autowired SourceLinks sourceLinks;
- @Autowired CompilationUnitCache cuCache;
+ @Autowired ORCompilationUnitCache cuCache;
@Autowired JavaElementLocationProvider javaElementLocationProvider;
@Autowired YamlASTProvider parser;
@Autowired YamlStructureProvider yamlStructureProvider;
diff --git a/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/BootJavaLanguageServerComponents.java b/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/BootJavaLanguageServerComponents.java
index d55a05f1f..71f2135c9 100644
--- a/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/BootJavaLanguageServerComponents.java
+++ b/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/BootJavaLanguageServerComponents.java
@@ -18,7 +18,6 @@ import java.util.Map;
import java.util.Optional;
import java.util.Set;
-import org.eclipse.lsp4j.CompletionItemKind;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.ide.vscode.boot.app.BootJavaConfig;
@@ -27,9 +26,7 @@ import org.springframework.ide.vscode.boot.app.SpringSymbolIndex;
import org.springframework.ide.vscode.boot.java.annotations.AnnotationHierarchyAwareLookup;
import org.springframework.ide.vscode.boot.java.autowired.AutowiredHoverProvider;
import org.springframework.ide.vscode.boot.java.conditionals.ConditionalsLiveHoverProvider;
-import org.springframework.ide.vscode.boot.java.data.DataRepositoryCompletionProcessor;
import org.springframework.ide.vscode.boot.java.handlers.BootJavaCodeLensEngine;
-import org.springframework.ide.vscode.boot.java.handlers.BootJavaCompletionEngine;
import org.springframework.ide.vscode.boot.java.handlers.BootJavaDocumentHighlightEngine;
import org.springframework.ide.vscode.boot.java.handlers.BootJavaDocumentSymbolHandler;
import org.springframework.ide.vscode.boot.java.handlers.BootJavaHoverProvider;
@@ -37,7 +34,6 @@ import org.springframework.ide.vscode.boot.java.handlers.BootJavaReconcileEngine
import org.springframework.ide.vscode.boot.java.handlers.BootJavaReferencesHandler;
import org.springframework.ide.vscode.boot.java.handlers.BootJavaWorkspaceSymbolHandler;
import org.springframework.ide.vscode.boot.java.handlers.CodeLensProvider;
-import org.springframework.ide.vscode.boot.java.handlers.CompletionProvider;
import org.springframework.ide.vscode.boot.java.handlers.HighlightProvider;
import org.springframework.ide.vscode.boot.java.handlers.HoverProvider;
import org.springframework.ide.vscode.boot.java.handlers.ReferenceProvider;
@@ -56,19 +52,13 @@ import org.springframework.ide.vscode.boot.java.requestmapping.LiveAppURLSymbolP
import org.springframework.ide.vscode.boot.java.requestmapping.RequestMappingHoverProvider;
import org.springframework.ide.vscode.boot.java.requestmapping.WebfluxHandlerCodeLensProvider;
import org.springframework.ide.vscode.boot.java.requestmapping.WebfluxRouteHighlightProdivder;
-import org.springframework.ide.vscode.boot.java.scope.ScopeCompletionProcessor;
-import org.springframework.ide.vscode.boot.java.snippets.JavaSnippet;
-import org.springframework.ide.vscode.boot.java.snippets.JavaSnippetContext;
-import org.springframework.ide.vscode.boot.java.snippets.JavaSnippetManager;
-import org.springframework.ide.vscode.boot.java.utils.CompilationUnitCache;
+import org.springframework.ide.vscode.boot.java.utils.ORCompilationUnitCache;
import org.springframework.ide.vscode.boot.java.utils.SpringLiveChangeDetectionWatchdog;
import org.springframework.ide.vscode.boot.java.utils.SymbolCache;
-import org.springframework.ide.vscode.boot.java.value.ValueCompletionProcessor;
import org.springframework.ide.vscode.boot.java.value.ValueHoverProvider;
import org.springframework.ide.vscode.boot.java.value.ValuePropertyReferencesProvider;
import org.springframework.ide.vscode.boot.metadata.ProjectBasedPropertyIndexProvider;
import org.springframework.ide.vscode.boot.metadata.SpringPropertyIndexProvider;
-import org.springframework.ide.vscode.commons.languageserver.completion.ICompletionEngine;
import org.springframework.ide.vscode.commons.languageserver.composable.LanguageServerComponents;
import org.springframework.ide.vscode.commons.languageserver.java.JavaProjectFinder;
import org.springframework.ide.vscode.commons.languageserver.java.ProjectObserver;
@@ -76,14 +66,12 @@ import org.springframework.ide.vscode.commons.languageserver.reconcile.IReconcil
import org.springframework.ide.vscode.commons.languageserver.util.CodeLensHandler;
import org.springframework.ide.vscode.commons.languageserver.util.DocumentHighlightHandler;
import org.springframework.ide.vscode.commons.languageserver.util.HoverHandler;
-import org.springframework.ide.vscode.commons.languageserver.util.LspClient;
import org.springframework.ide.vscode.commons.languageserver.util.ReferencesHandler;
import org.springframework.ide.vscode.commons.languageserver.util.SimpleLanguageServer;
import org.springframework.ide.vscode.commons.languageserver.util.SimpleTextDocumentService;
import org.springframework.ide.vscode.commons.languageserver.util.SimpleWorkspaceService;
import org.springframework.ide.vscode.commons.util.text.LanguageId;
-import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
/**
@@ -113,7 +101,7 @@ public class BootJavaLanguageServerComponents implements LanguageServerComponent
private final SpringLiveChangeDetectionWatchdog liveChangeDetectionWatchdog;
private final ProjectObserver projectObserver;
- private final CompilationUnitCache cuCache;
+ private final ORCompilationUnitCache cuCache;
private JavaProjectFinder projectFinder;
private BootJavaHoverProvider hoverProvider;
@@ -127,7 +115,7 @@ public class BootJavaLanguageServerComponents implements LanguageServerComponent
SimpleLanguageServer server,
BootLanguageServerParams serverParams,
SourceLinks sourceLinks,
- CompilationUnitCache cuCache,
+ ORCompilationUnitCache cuCache,
ProjectBasedPropertyIndexProvider adHocIndexProvider,
SymbolCache symbolCache,
SpringProcessLiveDataProvider liveDataProvider,
@@ -343,7 +331,7 @@ public class BootJavaLanguageServerComponents implements LanguageServerComponent
return propertyIndexProvider;
}
- public CompilationUnitCache getCompilationUnitCache() {
+ public ORCompilationUnitCache getCompilationUnitCache() {
return cuCache;
}
diff --git a/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/annotations/AnnotationHierarchies.java b/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/annotations/AnnotationHierarchies.java
index 420343506..08956a01c 100644
--- a/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/annotations/AnnotationHierarchies.java
+++ b/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/annotations/AnnotationHierarchies.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2017, 2021 Pivotal, Inc.
+ * Copyright (c) 2017, 2022 Pivotal, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -12,15 +12,16 @@ package org.springframework.ide.vscode.boot.java.annotations;
import java.util.Collection;
import java.util.HashSet;
+import java.util.List;
import java.util.Set;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
-import org.eclipse.jdt.core.dom.Annotation;
-import org.eclipse.jdt.core.dom.IAnnotationBinding;
-import org.eclipse.jdt.core.dom.ITypeBinding;
import org.eclipse.jdt.internal.compiler.problem.AbortCompilation;
+import org.openrewrite.java.tree.J.Annotation;
+import org.openrewrite.java.tree.JavaType.FullyQualified;
+import org.openrewrite.java.tree.TypeUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.ide.vscode.commons.util.CollectorUtil;
@@ -28,99 +29,82 @@ import org.springframework.ide.vscode.commons.util.CollectorUtil;
import com.google.common.collect.ImmutableList;
/**
- * Utility class for working with annotation and discovering / understanding their
- * 'inheritance' structure.
+ * Utility class for working with annotation and discovering / understanding
+ * their 'inheritance' structure.
*
* Provides methods to ask questions about inheritance between annotations.
-
+ *
* @author Kris De Volder
*/
public abstract class AnnotationHierarchies {
-
+
private static final Logger log = LoggerFactory.getLogger(AnnotationHierarchies.class);
-
- // this lock is used to protect multi-threaded access to this helper class
- // due to https://bugs.eclipse.org/bugs/show_bug.cgi?id=571247
- private static final Object lock = new Object();
protected static boolean ignoreAnnotation(String fqname) {
- return fqname.startsWith("java."); //mostly intended to capture java.lang.annotation.* types. But really it should be
- //safe to ignore any type defined by the JRE since it can't possibly be inheriting from a spring annotation.
+ return fqname.startsWith("java."); // mostly intended to capture java.lang.annotation.* types. But really it
+ // should be
+ // safe to ignore any type defined by the JRE since it can't possibly be
+ // inheriting from a spring annotation.
};
- public static Collection getDirectSuperAnnotations(ITypeBinding typeBinding) {
- synchronized(lock) {
- try {
- IAnnotationBinding[] annotations = typeBinding.getAnnotations();
- if (annotations != null && annotations.length != 0) {
- ImmutableList.Builder superAnnotations = ImmutableList.builder();
- for (IAnnotationBinding ab : annotations) {
- ITypeBinding sa = ab.getAnnotationType();
- if (sa != null) {
- if (!ignoreAnnotation(sa.getQualifiedName())) {
- superAnnotations.add(sa);
- }
- }
+ public static Collection getDirectSuperAnnotations(FullyQualified type) {
+ try {
+ List annotations = type.getAnnotations();
+ if (annotations != null && !annotations.isEmpty()) {
+ ImmutableList.Builder superAnnotations = ImmutableList.builder();
+ for (FullyQualified ab : annotations) {
+ if (!ignoreAnnotation(ab.getFullyQualifiedName())) {
+ superAnnotations.add(ab);
}
- return superAnnotations.build();
}
+ return superAnnotations.build();
}
- catch (AbortCompilation e) {
- log.debug("compilation aborted ", e);
- // ignore this, it is most likely caused by broken source code, a broken classpath, or some optional dependencies not being on the classpath
- }
-
- return ImmutableList.of();
+ } catch (AbortCompilation e) {
+ log.debug("compilation aborted ", e);
+ // ignore this, it is most likely caused by broken source code, a broken
+ // classpath, or some optional dependencies not being on the classpath
}
+
+ return ImmutableList.of();
}
- public static Set getTransitiveSuperAnnotations(ITypeBinding typeBinding) {
- synchronized(lock) {
- Set seen = new HashSet<>();
- findTransitiveSupers(typeBinding, seen).collect(Collectors.toList());
- return seen;
- }
+ public static Set getTransitiveSuperAnnotations(FullyQualified type) {
+ Set seen = new HashSet<>();
+ findTransitiveSupers(type, seen).collect(Collectors.toList());
+ return seen;
}
- public static Stream findTransitiveSupers(ITypeBinding typeBinding, Set seen) {
- synchronized(lock) {
- String qname = typeBinding.getQualifiedName();
- if (seen.add(qname)) {
- return Stream.concat(
- Stream.of(typeBinding),
- getDirectSuperAnnotations(typeBinding).stream().flatMap(superBinding ->
- findTransitiveSupers(superBinding, seen)
- )
- );
- }
- return Stream.empty();
+ public static Stream findTransitiveSupers(FullyQualified type, Set seen) {
+ String qname = type.getFullyQualifiedName();
+ if (seen.add(qname)) {
+ return Stream.concat(Stream.of(type), getDirectSuperAnnotations(type).stream()
+ .flatMap(superAnnotation -> findTransitiveSupers(superAnnotation, seen)));
}
+ return Stream.empty();
}
public static boolean isSubtypeOf(Annotation annotation, String fqAnnotationTypeName) {
- synchronized(lock) {
- ITypeBinding annotationType = annotation.resolveTypeBinding();
- if (annotationType!=null) {
- return findTransitiveSupers(annotationType, new HashSet<>())
- .anyMatch(superType -> superType.getQualifiedName().equals(fqAnnotationTypeName));
- }
- return false;
+ FullyQualified annotationType = TypeUtils.asFullyQualified(annotation.getType());
+ if (annotationType != null) {
+ return findTransitiveSupers(annotationType, new HashSet<>())
+ .anyMatch(superType -> fqAnnotationTypeName.equals(superType.getFullyQualifiedName()));
}
+ return false;
}
- public static Collection getMetaAnnotations(ITypeBinding actualAnnotation, Predicate isKeyAnnotationName) {
- synchronized(lock) {
- Stream allSupers = findTransitiveSupers(actualAnnotation, new HashSet<>())
- .skip(1); //Don't include 'actualAnnotation' itself.
- return allSupers
- .filter(candidate -> isMetaAnnotation(candidate, isKeyAnnotationName))
- .collect(CollectorUtil.toImmutableList());
- }
+ public static Collection getMetaAnnotations(FullyQualified actualAnnotation,
+ Predicate isKeyAnnotationName) {
+ Stream allSupers = findTransitiveSupers(actualAnnotation, new HashSet<>()).skip(1); // Don't
+ // include
+ // 'actualAnnotation'
+ // itself.
+ return allSupers.filter(candidate -> isMetaAnnotation(candidate, isKeyAnnotationName))
+ .collect(CollectorUtil.toImmutableList());
}
- private static boolean isMetaAnnotation(ITypeBinding candidate, Predicate isKeyAnnotationName) {
+ private static boolean isMetaAnnotation(FullyQualified candidate, Predicate isKeyAnnotationName) {
return findTransitiveSupers(candidate, new HashSet<>())
- .anyMatch(sa -> isKeyAnnotationName.test(sa.getQualifiedName()));
+ .anyMatch(sa -> isKeyAnnotationName.test(sa.getFullyQualifiedName()));
}
}
diff --git a/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/annotations/AnnotationHierarchyAwareLookup.java b/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/annotations/AnnotationHierarchyAwareLookup.java
index e8516bc83..45fd105b0 100644
--- a/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/annotations/AnnotationHierarchyAwareLookup.java
+++ b/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/annotations/AnnotationHierarchyAwareLookup.java
@@ -17,7 +17,7 @@ import java.util.LinkedHashSet;
import java.util.Map;
import java.util.function.Consumer;
-import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.openrewrite.java.tree.JavaType.FullyQualified;
import org.springframework.ide.vscode.commons.util.Assert;
import com.google.common.collect.ImmutableList;
@@ -85,7 +85,7 @@ public class AnnotationHierarchyAwareLookup {
* a symbol provider for Components should be asked to produce symbols for Component, Controller and RestController,
* so should result in 3 separate calls to the symbols provider.
*/
- public Collection get(ITypeBinding annotationType) {
+ public Collection get(FullyQualified annotationType) {
ImmutableList.Builder found = ImmutableList.builder();
findElements(annotationType, new LinkedHashSet<>(), found::add);
return found.build();
@@ -98,8 +98,8 @@ public class AnnotationHierarchyAwareLookup {
return found.build();
}
- private void findElements(ITypeBinding typeBinding, HashSet seen, Consumer requestor) {
- String qname = typeBinding.getQualifiedName();
+ private void findElements(FullyQualified type, HashSet seen, Consumer requestor) {
+ String qname = type.getFullyQualifiedName();
if (seen.add(qname)) {
Binding binding = bindings.get(qname);
@@ -110,8 +110,8 @@ public class AnnotationHierarchyAwareLookup {
}
if (!isOverriding) {
- Collection directSuperAnnotations = AnnotationHierarchies.getDirectSuperAnnotations(typeBinding);
- for (ITypeBinding superAnnotation : directSuperAnnotations) {
+ Collection directSuperAnnotations = AnnotationHierarchies.getDirectSuperAnnotations(type);
+ for (FullyQualified superAnnotation : directSuperAnnotations) {
findElements(superAnnotation, seen, requestor);
}
}
diff --git a/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/autowired/AutowiredHoverProvider.java b/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/autowired/AutowiredHoverProvider.java
index 1db0eaecf..6ed82a53d 100644
--- a/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/autowired/AutowiredHoverProvider.java
+++ b/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/autowired/AutowiredHoverProvider.java
@@ -16,19 +16,21 @@ import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
-import org.eclipse.jdt.core.dom.ASTNode;
-import org.eclipse.jdt.core.dom.Annotation;
-import org.eclipse.jdt.core.dom.FieldDeclaration;
-import org.eclipse.jdt.core.dom.ITypeBinding;
-import org.eclipse.jdt.core.dom.MarkerAnnotation;
-import org.eclipse.jdt.core.dom.MethodDeclaration;
-import org.eclipse.jdt.core.dom.SimpleName;
-import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
-import org.eclipse.jdt.core.dom.TypeDeclaration;
import org.eclipse.lsp4j.CodeLens;
import org.eclipse.lsp4j.Hover;
import org.eclipse.lsp4j.Range;
import org.eclipse.lsp4j.jsonrpc.messages.Either;
+import org.openrewrite.java.tree.J;
+import org.openrewrite.java.tree.J.Annotation;
+import org.openrewrite.java.tree.J.ClassDeclaration;
+import org.openrewrite.java.tree.J.Identifier;
+import org.openrewrite.java.tree.J.MethodDeclaration;
+import org.openrewrite.java.tree.J.VariableDeclarations;
+import org.openrewrite.java.tree.JavaType;
+import org.openrewrite.java.tree.JavaType.Array;
+import org.openrewrite.java.tree.JavaType.FullyQualified;
+import org.openrewrite.java.tree.JavaType.Parameterized;
+import org.openrewrite.java.tree.TypeUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.ide.vscode.boot.java.Annotations;
@@ -40,7 +42,7 @@ import org.springframework.ide.vscode.boot.java.livehover.ComponentInjectionsHov
import org.springframework.ide.vscode.boot.java.livehover.LiveHoverUtils;
import org.springframework.ide.vscode.boot.java.livehover.v2.LiveBean;
import org.springframework.ide.vscode.boot.java.livehover.v2.SpringProcessLiveData;
-import org.springframework.ide.vscode.boot.java.utils.ASTUtils;
+import org.springframework.ide.vscode.boot.java.utils.ORAstUtils;
import org.springframework.ide.vscode.commons.java.IJavaProject;
import org.springframework.ide.vscode.commons.java.IType;
import org.springframework.ide.vscode.commons.util.BadLocationException;
@@ -76,12 +78,13 @@ public class AutowiredHoverProvider implements HoverProvider {
SpringProcessLiveData[] processLiveData) {
ImmutableList.Builder builder = ImmutableList.builder();
if (processLiveData.length > 0) {
- LiveBean definedBean = getDefinedBeanForTypeDeclaration(ASTUtils.findDeclaringType(annotation));
+ LiveBean definedBean = getDefinedBeanForTypeDeclaration(ORAstUtils.findDeclaringType(annotation));
// Annotation is MarkerNode, parent is some field, method, variable declaration
// node.
- ASTNode declarationNode = annotation.getParent();
+ J declarationNode = ORAstUtils.getParent(annotation);
try {
- Range hoverRange = doc.toRange(annotation.getStartPosition(), annotation.getLength());
+ org.openrewrite.marker.Range r = ORAstUtils.getRange(annotation);
+ Range hoverRange = doc.toRange(r.getStart().getOffset(), r.length());
for (SpringProcessLiveData liveData : processLiveData) {
List relevantBeans = getRelevantAutowiredBeans(project, declarationNode, liveData,
definedBean);
@@ -99,16 +102,17 @@ public class AutowiredHoverProvider implements HoverProvider {
}
@Override
- public Hover provideHover(ASTNode node, Annotation annotation, ITypeBinding type, int offset,
+ public Hover provideHover(J node, Annotation annotation, int offset,
TextDocument doc, IJavaProject project, SpringProcessLiveData[] processLiveData) {
if (processLiveData.length > 0) {
- LiveBean definedBean = getDefinedBeanForTypeDeclaration(ASTUtils.findDeclaringType(annotation));
+ LiveBean definedBean = getDefinedBeanForTypeDeclaration(ORAstUtils.findDeclaringType(annotation));
// Annotation is MarkerNode, parent is some field, method, variable declaration node.
- ASTNode declarationNode = annotation.getParent();
+ J declarationNode = ORAstUtils.getParent(annotation);
Hover hover = provideHover(definedBean, declarationNode, offset, doc, project, processLiveData);
if (hover != null) {
+ org.openrewrite.marker.Range r = ORAstUtils.getRange(annotation);
try {
- hover.setRange(doc.toRange(annotation.getStartPosition(), annotation.getLength()));
+ hover.setRange(doc.toRange(r.getStart().getOffset(), r.length()));
} catch (BadLocationException e) {
log.error("", e);
}
@@ -118,7 +122,7 @@ public class AutowiredHoverProvider implements HoverProvider {
return null;
}
- private Hover provideHover(LiveBean definedBean, ASTNode declarationNode, int offset, TextDocument doc,
+ private Hover provideHover(LiveBean definedBean, J declarationNode, int offset, TextDocument doc,
IJavaProject project, SpringProcessLiveData[] processLiveData) {
if (definedBean != null) {
@@ -158,12 +162,12 @@ public class AutowiredHoverProvider implements HoverProvider {
hover.append("\n \n");
}
- public static List getRelevantAutowiredBeans(IJavaProject project, ASTNode declarationNode, SpringProcessLiveData liveData, LiveBean definedBean) {
+ public static List getRelevantAutowiredBeans(IJavaProject project, J declarationNode, SpringProcessLiveData liveData, LiveBean definedBean) {
List relevantBeans = LiveHoverUtils.findRelevantBeans(liveData, definedBean);
return getRelevantAutowiredBeans(project, declarationNode, liveData, relevantBeans);
}
- public static List getRelevantAutowiredBeans(IJavaProject project, ASTNode declarationNode, SpringProcessLiveData liveData, List relevantBeans) {
+ public static List getRelevantAutowiredBeans(IJavaProject project, J declarationNode, SpringProcessLiveData liveData, List relevantBeans) {
if (!relevantBeans.isEmpty()) {
List allDependencyBeans = LiveHoverUtils.findAllDependencyBeans(liveData, relevantBeans);
@@ -184,32 +188,26 @@ public class AutowiredHoverProvider implements HoverProvider {
}
@SuppressWarnings("unchecked")
- public static List findAutowiredBeans(IJavaProject project, ASTNode declarationNode, Collection beans) {
+ public static List findAutowiredBeans(IJavaProject project, J declarationNode, Collection beans) {
if (declarationNode instanceof MethodDeclaration) {
MethodDeclaration methodDeclaration = (MethodDeclaration)declarationNode;
- return ((List