PT #164971098: Fix Inro URL constants. Properly create Location instance
This commit is contained in:
@@ -430,7 +430,9 @@ public class STS4LanguageClientImpl extends LanguageClientImpl implements STS4La
|
||||
if (element != null ) {
|
||||
IJavaProject project = element.getJavaProject() == null ? ResourceUtils.getJavaProject(projectUri) : element.getJavaProject();
|
||||
if (project != null) {
|
||||
return new Location(Utils.eclipseIntroUri(project.getElementName(), params.getBindingKey()).toString(), null);
|
||||
Location location = new Location();
|
||||
location.setUri(Utils.eclipseIntroUri(project.getElementName(), params.getBindingKey()).toString());
|
||||
return location;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.eclipse.ui.PlatformUI;
|
||||
@SuppressWarnings("restriction")
|
||||
public class Utils {
|
||||
|
||||
private static final String URL_PREFIX = "https://org.eclipse.ui.intro/execute?command=";
|
||||
private static final String URL_PREFIX = "http://org.eclipse.ui.intro/execute?command=";
|
||||
private static final String EQUALS = "=";
|
||||
private static final String PARAMETERS_SEPARATOR = ",";
|
||||
private static final String PARAMETERS_START = "(";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2018 Pivotal, Inc.
|
||||
* Copyright (c) 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
|
||||
@@ -21,7 +21,13 @@ public class EclipseJavaElementLocationProvider implements JavaElementLocationPr
|
||||
@Override
|
||||
public Location findLocation(IJavaProject project, IMember member) {
|
||||
URI uri = EclipseSourceLinks.eclipseIntroUri(project, member);
|
||||
return uri == null ? null : new Location(uri.toString(), null);
|
||||
if (uri == null) {
|
||||
return null;
|
||||
} else {
|
||||
Location location = new Location();
|
||||
location.setUri(uri.toString());
|
||||
return location;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.springframework.ide.vscode.commons.languageserver.java.JavaProjectFin
|
||||
*/
|
||||
public class EclipseSourceLinks implements SourceLinks {
|
||||
|
||||
private static final String URL_PREFIX = "https://org.eclipse.ui.intro/execute?command=";
|
||||
private static final String URL_PREFIX = "http://org.eclipse.ui.intro/execute?command=";
|
||||
private static final String EQUALS = "=";
|
||||
private static final String PARAMETERS_SEPARATOR = ",";
|
||||
private static final String PARAMETERS_START = "(";
|
||||
|
||||
Reference in New Issue
Block a user