From 0e399fc21f1a9a91843cabd0a4b69ae60b7c1a5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=8A?= =?UTF-8?q?=D1=80=20=D0=9A=D1=83=D1=80=D1=82=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Wed, 15 Jan 2025 21:47:28 +0200 Subject: [PATCH] Fix link to current "Evolving Java-based APIs" Wiki is read only with multiple warnings being what one sees before figuring the redirects. --- .../preferences/ApiErrorsWarningsConfigurationBlock.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiErrorsWarningsConfigurationBlock.java b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiErrorsWarningsConfigurationBlock.java index 9c47563997..da40b10cd7 100644 --- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiErrorsWarningsConfigurationBlock.java +++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiErrorsWarningsConfigurationBlock.java @@ -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 @@ -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; @@ -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 = "" //$NON-NLS-1$ + String linkHttp = "" //$NON-NLS-1$ + PreferenceMessages.ApiErrorsWarningsConfigurationBlock_4 + ""; //$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) { } }));