8191810: jjs should avoid hard coded javadoc base url for shift-tab documentation feature
Reviewed-by: hannesw
This commit is contained in:
parent
abef0ce5b3
commit
802a8bcaf3
@ -296,10 +296,10 @@ public final class Main extends Shell {
|
||||
}
|
||||
}
|
||||
|
||||
private static String JAVADOC_BASE = "https://docs.oracle.com/javase/9/docs/api/";
|
||||
private static String JAVADOC_BASE = "https://docs.oracle.com/javase/%d/docs/api/";
|
||||
private static void openBrowserForJavadoc(ScriptFunction browse, String relativeUrl) {
|
||||
try {
|
||||
final URI uri = new URI(JAVADOC_BASE + relativeUrl);
|
||||
final URI uri = new URI(String.format(JAVADOC_BASE, Runtime.version().major()) + relativeUrl);
|
||||
ScriptRuntime.apply(browse, null, uri);
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user