JDT LS based index for searches and refactorings to replace Jandex
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2018 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
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Pivotal, Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.springframework.tooling.ls.eclipse.commons;
|
||||
|
||||
public class ClasspathListenerParams {
|
||||
|
||||
private String callbackCommandId;
|
||||
|
||||
public ClasspathListenerParams(String callbackCommandId) {
|
||||
super();
|
||||
this.callbackCommandId = callbackCommandId;
|
||||
}
|
||||
|
||||
public String getCallbackCommandId() {
|
||||
return callbackCommandId;
|
||||
}
|
||||
|
||||
public void setCallbackCommandId(String callbackCommandId) {
|
||||
this.callbackCommandId = callbackCommandId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ClasspathListenerParams [callbackCommandId=" + callbackCommandId + "]";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2018 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
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Pivotal, Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.springframework.tooling.ls.eclipse.commons;
|
||||
|
||||
import org.eclipse.lsp4j.Position;
|
||||
|
||||
public class CursorMovement {
|
||||
private String uri;
|
||||
private Position position;
|
||||
|
||||
public CursorMovement() {
|
||||
}
|
||||
|
||||
public CursorMovement(String uri, Position position) {
|
||||
this.uri = uri;
|
||||
this.position = position;
|
||||
}
|
||||
|
||||
public String getUri() {
|
||||
return uri;
|
||||
}
|
||||
|
||||
public void setUri(String uri) {
|
||||
this.uri = uri;
|
||||
}
|
||||
|
||||
public Position getPosition() {
|
||||
return position;
|
||||
}
|
||||
|
||||
public void setPosition(Position position) {
|
||||
this.position = position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CursorMovement [uri=" + uri + ", position=" + position + "]";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2017, 2018 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
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Pivotal, Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.springframework.tooling.ls.eclipse.commons;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.lsp4j.CodeLens;
|
||||
import org.eclipse.lsp4j.VersionedTextDocumentIdentifier;
|
||||
|
||||
public class HighlightParams {
|
||||
|
||||
//TODO: Identical copy of this exists in org.springframework.ide.vscode.commons.languageserver.HighlightParams
|
||||
// But because that is only built in plain maven jar (not osgi) we can't use it. We should find a solution
|
||||
// for this somehow (i.e. build a version of some of our 'plain maven' jars as osgi bundles and publish on
|
||||
// a update site.
|
||||
|
||||
private VersionedTextDocumentIdentifier doc;
|
||||
private List<CodeLens> codeLenses;
|
||||
|
||||
public HighlightParams() {
|
||||
}
|
||||
|
||||
public HighlightParams(VersionedTextDocumentIdentifier doc, List<CodeLens> codeLenses) {
|
||||
super();
|
||||
this.doc = doc;
|
||||
this.codeLenses = codeLenses;
|
||||
}
|
||||
public VersionedTextDocumentIdentifier getDoc() {
|
||||
return doc;
|
||||
}
|
||||
public void setDoc(VersionedTextDocumentIdentifier doc) {
|
||||
this.doc = doc;
|
||||
}
|
||||
|
||||
public List<CodeLens> getCodeLenses() {
|
||||
return codeLenses;
|
||||
}
|
||||
|
||||
public void setCodeLenses(List<CodeLens> codeLenses) {
|
||||
this.codeLenses = codeLenses;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -36,6 +36,7 @@ import org.eclipse.lsp4j.Command;
|
||||
import org.eclipse.swt.events.MouseEvent;
|
||||
import org.eclipse.ui.IWorkbenchPage;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.springframework.ide.vscode.commons.protocol.HighlightParams;
|
||||
import org.springframework.tooling.ls.eclipse.commons.preferences.PreferenceConstants;
|
||||
|
||||
import com.google.gson.JsonPrimitive;
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2016-2017 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
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Pivotal, Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
|
||||
package org.springframework.tooling.ls.eclipse.commons;
|
||||
|
||||
public class ProgressParams {
|
||||
|
||||
/**
|
||||
* An id representing the enitity for which progress messages are to be shown.
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* Updates the current statusMsg associated with a given the id. If null, then the message
|
||||
* is cleared.
|
||||
*/
|
||||
private String statusMsg;
|
||||
|
||||
|
||||
public ProgressParams() {
|
||||
}
|
||||
|
||||
public ProgressParams(String id, String statusMsg) {
|
||||
super();
|
||||
this.id = id;
|
||||
this.statusMsg = statusMsg;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ProgressParams [id=" + id + ", statusMsg=" + statusMsg + "]";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((id == null) ? 0 : id.hashCode());
|
||||
result = prime * result + ((statusMsg == null) ? 0 : statusMsg.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
ProgressParams other = (ProgressParams) obj;
|
||||
if (id == null) {
|
||||
if (other.id != null)
|
||||
return false;
|
||||
} else if (!id.equals(other.id))
|
||||
return false;
|
||||
if (statusMsg == null) {
|
||||
if (other.statusMsg != null)
|
||||
return false;
|
||||
} else if (!statusMsg.equals(other.statusMsg))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getStatusMsg() {
|
||||
return statusMsg;
|
||||
}
|
||||
|
||||
public void setStatusMsg(String statusMsg) {
|
||||
this.statusMsg = statusMsg;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2017, 2019 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
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Pivotal, Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.springframework.tooling.ls.eclipse.commons;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import org.eclipse.lsp4j.Location;
|
||||
import org.eclipse.lsp4j.jsonrpc.services.JsonNotification;
|
||||
import org.eclipse.lsp4j.jsonrpc.services.JsonRequest;
|
||||
import org.eclipse.lsp4j.services.LanguageClient;
|
||||
import org.springframework.tooling.jdt.ls.commons.java.JavaDataParams;
|
||||
import org.springframework.tooling.jdt.ls.commons.java.JavaTypeResponse;
|
||||
import org.springframework.tooling.jdt.ls.commons.java.JavadocHoverLinkResponse;
|
||||
import org.springframework.tooling.jdt.ls.commons.javadoc.JavadocResponse;
|
||||
|
||||
/**
|
||||
* Some 'custom' extensions to standard LSP {@link LanguageClient}.
|
||||
*
|
||||
* @author Kris De Volder
|
||||
*/
|
||||
public interface STS4LanguageClient extends LanguageClient {
|
||||
|
||||
@JsonNotification("sts/highlight")
|
||||
void highlight(HighlightParams highlights);
|
||||
|
||||
@JsonNotification("sts/progress")
|
||||
void progress(ProgressParams progressEvent);
|
||||
|
||||
@JsonRequest("sts/moveCursor")
|
||||
CompletableFuture<Object> moveCursor(CursorMovement cursorMovement);
|
||||
|
||||
@JsonRequest("sts/addClasspathListener")
|
||||
CompletableFuture<Object> addClasspathListener(ClasspathListenerParams params);
|
||||
|
||||
@JsonRequest("sts/removeClasspathListener")
|
||||
CompletableFuture<Object> removeClasspathListener(ClasspathListenerParams classpathListenerParams);
|
||||
|
||||
@JsonRequest("sts/javadoc")
|
||||
CompletableFuture<JavadocResponse> javadoc(JavaDataParams params);
|
||||
|
||||
@JsonRequest("sts/javaType")
|
||||
CompletableFuture<JavaTypeResponse> javaType(JavaDataParams params);
|
||||
|
||||
@JsonRequest("sts/javadocHoverLink")
|
||||
CompletableFuture<JavadocHoverLinkResponse> javadocHoverLink(JavaDataParams params);
|
||||
|
||||
@JsonRequest("sts/javaLocation")
|
||||
CompletableFuture<Location> javaLocation(JavaDataParams params);
|
||||
|
||||
}
|
||||
@@ -14,18 +14,22 @@ import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.URI;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.jdt.core.IJavaElement;
|
||||
import org.eclipse.jdt.core.IJavaProject;
|
||||
import org.eclipse.jdt.core.ILocalVariable;
|
||||
import org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer;
|
||||
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLinks;
|
||||
import org.eclipse.jdt.ui.JavaElementLabels;
|
||||
import org.eclipse.jface.action.IStatusLineManager;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.text.BadLocationException;
|
||||
@@ -44,6 +48,8 @@ import org.eclipse.lsp4e.LSPEclipseUtils;
|
||||
import org.eclipse.lsp4e.LanguageClientImpl;
|
||||
import org.eclipse.lsp4j.CodeLens;
|
||||
import org.eclipse.lsp4j.Location;
|
||||
import org.eclipse.lsp4j.MarkupContent;
|
||||
import org.eclipse.lsp4j.MarkupKind;
|
||||
import org.eclipse.swt.custom.StyledText;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.Font;
|
||||
@@ -57,13 +63,20 @@ import org.eclipse.ui.progress.UIJob;
|
||||
import org.eclipse.ui.texteditor.AbstractDecoratedTextEditor;
|
||||
import org.eclipse.ui.texteditor.AbstractTextEditor;
|
||||
import org.eclipse.ui.texteditor.SourceViewerDecorationSupport;
|
||||
import org.springframework.ide.vscode.commons.protocol.CursorMovement;
|
||||
import org.springframework.ide.vscode.commons.protocol.HighlightParams;
|
||||
import org.springframework.ide.vscode.commons.protocol.ProgressParams;
|
||||
import org.springframework.ide.vscode.commons.protocol.STS4LanguageClient;
|
||||
import org.springframework.ide.vscode.commons.protocol.java.ClasspathListenerParams;
|
||||
import org.springframework.ide.vscode.commons.protocol.java.JavaDataParams;
|
||||
import org.springframework.ide.vscode.commons.protocol.java.JavaSearchParams;
|
||||
import org.springframework.ide.vscode.commons.protocol.java.JavaTypeHierarchyParams;
|
||||
import org.springframework.ide.vscode.commons.protocol.java.TypeData;
|
||||
import org.springframework.tooling.jdt.ls.commons.Logger;
|
||||
import org.springframework.tooling.jdt.ls.commons.classpath.ReusableClasspathListenerHandler;
|
||||
import org.springframework.tooling.jdt.ls.commons.java.JavaData;
|
||||
import org.springframework.tooling.jdt.ls.commons.java.JavaDataParams;
|
||||
import org.springframework.tooling.jdt.ls.commons.java.JavaTypeResponse;
|
||||
import org.springframework.tooling.jdt.ls.commons.java.JavadocHoverLinkResponse;
|
||||
import org.springframework.tooling.jdt.ls.commons.javadoc.JavadocResponse;
|
||||
import org.springframework.tooling.jdt.ls.commons.java.JavaSearch;
|
||||
import org.springframework.tooling.jdt.ls.commons.java.TypeHierarchy;
|
||||
import org.springframework.tooling.jdt.ls.commons.javadoc.JavadocUtils;
|
||||
import org.springframework.tooling.jdt.ls.commons.resources.ResourceUtils;
|
||||
import org.springframework.tooling.ls.eclipse.commons.javadoc.JavaDoc2MarkdownConverter;
|
||||
@@ -81,7 +94,41 @@ public class STS4LanguageClientImpl extends LanguageClientImpl implements STS4La
|
||||
() -> new ProjectSorter()
|
||||
);
|
||||
|
||||
private static JavaData JAVA_DATA = new JavaData(Logger.forEclipsePlugin(LanguageServerCommonsActivator::getInstance));
|
||||
private static final long LABEL_FLAGS=
|
||||
JavaElementLabels.ALL_FULLY_QUALIFIED
|
||||
| JavaElementLabels.M_PRE_RETURNTYPE
|
||||
| JavaElementLabels.M_PARAMETER_ANNOTATIONS
|
||||
| JavaElementLabels.M_PARAMETER_TYPES
|
||||
| JavaElementLabels.M_PARAMETER_NAMES
|
||||
| JavaElementLabels.M_EXCEPTIONS
|
||||
| JavaElementLabels.F_PRE_TYPE_SIGNATURE
|
||||
| JavaElementLabels.M_PRE_TYPE_PARAMETERS
|
||||
| JavaElementLabels.T_TYPE_PARAMETERS
|
||||
| JavaElementLabels.USE_RESOLVED;
|
||||
|
||||
private static final long LOCAL_VARIABLE_FLAGS= LABEL_FLAGS & ~JavaElementLabels.F_FULLY_QUALIFIED | JavaElementLabels.F_POST_QUALIFIED;
|
||||
|
||||
private static final long COMMON_SIGNATURE_FLAGS = LABEL_FLAGS & ~JavaElementLabels.ALL_FULLY_QUALIFIED
|
||||
| JavaElementLabels.T_FULLY_QUALIFIED | JavaElementLabels.M_FULLY_QUALIFIED;
|
||||
|
||||
|
||||
private static String label(IJavaElement element) {
|
||||
try {
|
||||
if (element instanceof ILocalVariable) {
|
||||
return JavaElementLabels.getElementLabel(element,LOCAL_VARIABLE_FLAGS);
|
||||
} else {
|
||||
return JavaElementLabels.getElementLabel(element,COMMON_SIGNATURE_FLAGS);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
final private JavaData javaData = new JavaData(STS4LanguageClientImpl::label , Logger.forEclipsePlugin(LanguageServerCommonsActivator::getInstance));
|
||||
|
||||
final private JavaSearch javaSearch = new JavaSearch(Logger.forEclipsePlugin(LanguageServerCommonsActivator::getInstance), javaData);
|
||||
|
||||
final private TypeHierarchy typeHierarchy = new TypeHierarchy(Logger.forEclipsePlugin(LanguageServerCommonsActivator::getInstance), javaData);
|
||||
|
||||
private static final String ANNOTION_TYPE_ID = "org.springframework.tooling.bootinfo";
|
||||
|
||||
@@ -312,16 +359,19 @@ public class STS4LanguageClientImpl extends LanguageClientImpl implements STS4La
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<JavadocResponse> javadoc(JavaDataParams params) {
|
||||
JavadocResponse response = new JavadocResponse();
|
||||
try {
|
||||
String content = JavadocUtils.javadoc(JavaDoc2MarkdownConverter::getMarkdownContentReader,
|
||||
URI.create(params.getProjectUri()), params.getBindingKey(), JavaDataParams.isLookInOtherProjects(params));
|
||||
response.setContent(content);
|
||||
} catch (Exception e) {
|
||||
LanguageServerCommonsActivator.logError(e, "Failed getting javadoc for " + params.toString());
|
||||
}
|
||||
return CompletableFuture.completedFuture(response);
|
||||
public CompletableFuture<MarkupContent> javadoc(JavaDataParams params) {
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
try {
|
||||
MarkupContent mc = new MarkupContent();
|
||||
mc.setKind(MarkupKind.MARKDOWN);
|
||||
mc.setValue(JavadocUtils.javadoc(JavaDoc2MarkdownConverter::getMarkdownContentReader,
|
||||
URI.create(params.getProjectUri()), params.getBindingKey(), JavaDataParams.isLookInOtherProjects(params)));
|
||||
return mc;
|
||||
} catch (Exception e) {
|
||||
LanguageServerCommonsActivator.logError(e, "Failed getting javadoc for " + params.toString());
|
||||
}
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -350,24 +400,24 @@ public class STS4LanguageClientImpl extends LanguageClientImpl implements STS4La
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<JavaTypeResponse> javaType(JavaDataParams params) {
|
||||
JavaTypeResponse response = new JavaTypeResponse(JAVA_DATA.typeData(params.getProjectUri(), params.getBindingKey(), JavaDataParams.isLookInOtherProjects(params)));
|
||||
return CompletableFuture.completedFuture(response);
|
||||
public CompletableFuture<TypeData> javaType(JavaDataParams params) {
|
||||
return CompletableFuture.supplyAsync(() -> javaData.typeData(params.getProjectUri(), params.getBindingKey(), JavaDataParams.isLookInOtherProjects(params)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<JavadocHoverLinkResponse> javadocHoverLink(JavaDataParams params) {
|
||||
JavadocHoverLinkResponse response = new JavadocHoverLinkResponse(null);
|
||||
try {
|
||||
URI projectUri = params.getProjectUri() == null ? null : URI.create(params.getProjectUri());
|
||||
IJavaElement element = JavaData.findElement(projectUri, params.getBindingKey(), JavaDataParams.isLookInOtherProjects(params));
|
||||
if (element != null) {
|
||||
response.setLink(JavaElementLinks.createURI(JavaElementLinks.OPEN_LINK_SCHEME, element));
|
||||
public CompletableFuture<String> javadocHoverLink(JavaDataParams params) {
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
try {
|
||||
URI projectUri = params.getProjectUri() == null ? null : URI.create(params.getProjectUri());
|
||||
IJavaElement element = JavaData.findElement(projectUri, params.getBindingKey(), JavaDataParams.isLookInOtherProjects(params));
|
||||
if (element != null) {
|
||||
return JavaElementLinks.createURI(JavaElementLinks.OPEN_LINK_SCHEME, element);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LanguageServerCommonsActivator.logError(e, "Failed to find java element for key " + params.getBindingKey());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LanguageServerCommonsActivator.logError(e, "Failed to find java element for key " + params.getBindingKey());
|
||||
}
|
||||
return CompletableFuture.completedFuture(response);
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -389,4 +439,45 @@ public class STS4LanguageClientImpl extends LanguageClientImpl implements STS4La
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<TypeData>> javaSearchTypes(JavaSearchParams params) {
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
try {
|
||||
return javaSearch.fuzzySearchTypes(URI.create(params.getProjectUri()), params.getTerm(),
|
||||
params.isIncludeBinaries(), params.isIncludeSystemLibs()).collect(Collectors.toList());
|
||||
} catch (Exception e) {
|
||||
LanguageServerCommonsActivator.logError(e,
|
||||
"Failed to search type with term '" + params.getTerm() + "' in project " + params.getProjectUri());
|
||||
return Collections.emptyList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<String>> javaSearchPackages(JavaSearchParams params) {
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
try {
|
||||
return javaSearch.fuzzySearchPackages(URI.create(params.getProjectUri()), params.getTerm(),
|
||||
params.isIncludeBinaries(), params.isIncludeSystemLibs()).collect(Collectors.toList());
|
||||
} catch (Exception e) {
|
||||
LanguageServerCommonsActivator.logError(e, "Failed to search package with term '" + params.getTerm() +"' in project " + params.getProjectUri());
|
||||
return Collections.emptyList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<TypeData>> javaSubTypes(JavaTypeHierarchyParams params) {
|
||||
return CompletableFuture.supplyAsync(() ->
|
||||
typeHierarchy.subTypes(params.getProjectUri() == null ? null : URI.create(params.getProjectUri()), params.getFqName()).collect(Collectors.toList())
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<TypeData>> javaSuperTypes(JavaTypeHierarchyParams params) {
|
||||
return CompletableFuture.supplyAsync(() ->
|
||||
typeHierarchy.superTypes(params.getProjectUri() == null ? null : URI.create(params.getProjectUri()), params.getFqName()).collect(Collectors.toList())
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user