PT #171932358 Flag for detailed java type data for sub/super types

This commit is contained in:
BoykoAlex
2020-04-02 13:35:11 -04:00
parent 99a33547c4
commit 3bddccd57f
16 changed files with 140 additions and 70 deletions

View File

@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2017, 2019 Pivotal, Inc.
* Copyright (c) 2017, 2020 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
@@ -269,7 +269,7 @@ public class AutowiredHoverProvider implements HoverProvider {
// Trim the generic parameters part if it's present
String liveBeanTypeFQName = idx < 0 ? rawLiveBeanFqName : rawLiveBeanFqName.substring(0, idx);
if (liveBeanTypeFQName != null) {
return jp.getIndex().allSuperTypesOf(liveBeanTypeFQName, true).map(IType::getFullyQualifiedName)
return jp.getIndex().allSuperTypesOf(liveBeanTypeFQName, true, false).map(IType::getFullyQualifiedName)
.filter(fqn -> bindingQualifiedName.equals(fqn)).blockFirst() != null;
}
return false;

View File

@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2016, 2019 Pivotal, Inc.
* Copyright (c) 2016, 2020 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
@@ -141,7 +141,7 @@ public class ClassReferenceProvider extends CachingValueProvider {
if (target == null) {
typesWithScoresFlux = javaProject.getIndex().fuzzySearchTypes(query, true, false);
} else {
typesWithScoresFlux = javaProject.getIndex().allSubtypesOf(target, true)
typesWithScoresFlux = javaProject.getIndex().allSubtypesOf(target, true, false)
.filter(t -> Flags.isPublic(t.getFlags()) && !concrete || !isAbstract(t))
.map(type -> Tuples.of(type, FuzzyMatcher.matchScore(query, type.getFullyQualifiedName())));
}

View File

@@ -136,7 +136,7 @@ public class PropertyNameCompletionProposalProvider implements XMLCompletionProv
}
public static Stream<IMethod> propertyNameCandidateMethods(IJavaProject project, String beanClassFqName) {
return project.getIndex().allSuperTypesOf(beanClassFqName, true)
return project.getIndex().allSuperTypesOf(beanClassFqName, true, true)
.toStream()
.flatMap(type -> type.getMethods())
.filter(PropertyNameCompletionProposalProvider::isPropertyWriteMethod);