Skip to content

Commit

Permalink
Fix link to current "Evolving Java-based APIs"
Browse files Browse the repository at this point in the history
Wiki is read only with multiple warnings being what one sees before
figuring the redirects.
  • Loading branch information
akurtakov committed Jan 15, 2025
1 parent e62be0b commit 0e399fc
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2007, 2022 IBM Corporation and others.
* Copyright (c) 2007, 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand All @@ -13,7 +13,7 @@
*******************************************************************************/
package org.eclipse.pde.api.tools.ui.internal.preferences;

import java.net.URL;
import java.net.URI;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashMap;
Expand Down Expand Up @@ -861,13 +861,14 @@ private Composite createPage(int tabID, TabFolder folder, String name, String de
if (tabID == COMPATIBILITY_PAGE_ID) {
Link link = new Link(page, SWT.CENTER);
link.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 7));
String linkHttp = "<a href=\"https://wiki.eclipse.org/Evolving_Java-based_APIs_2\">" //$NON-NLS-1$
String linkHttp = "<a href=\"https://github.com/eclipse-platform/eclipse.platform/blob/master/docs/Evolving-Java-based-APIs-2.md\">" //$NON-NLS-1$
+ PreferenceMessages.ApiErrorsWarningsConfigurationBlock_4 + "</a>"; //$NON-NLS-1$
link.setText(NLS.bind(PreferenceMessages.ApiErrorsWarningsConfigurationBlock_5, linkHttp));
link.setSize(400, 100);
link.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> {
try {
PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser().openURL(new URL(e.text));
PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser()
.openURL(URI.create(e.text).toURL());
} catch (Exception ex) {
}
}));
Expand Down

0 comments on commit 0e399fc

Please sign in to comment.