Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2006 IBM Corporation and others.
* Copyright (c) 2000, 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 Down Expand Up @@ -54,7 +54,7 @@ public static void enableAutobuild(boolean enable) throws CoreException {
public File getFileInPlugin(IPath path) {
try {
Bundle bundle = getDefault().getBundle();
URL installURL = new URL(bundle.getEntry("/"), path.toString()); //$NON-NLS-1$
URL installURL = bundle.getEntry("/" + path.toString()); //$NON-NLS-1$
URL localURL = FileLocator.toFileURL(installURL);
return new File(localURL.getFile());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2008 IBM Corporation and others.
* Copyright (c) 2000, 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,6 @@
*******************************************************************************/
package org.eclipse.compare.examples.xml;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
Expand Down Expand Up @@ -114,12 +113,8 @@ protected ImageDescriptor getImageDescriptor(String relativePath) {

URL installURL= fgXMLPlugin.getBundle().getEntry("/"); //$NON-NLS-1$
if (installURL != null) {
try {
URL url= new URL(installURL, "icons/full/" + relativePath); //$NON-NLS-1$
return ImageDescriptor.createFromURL(url);
} catch (MalformedURLException e) {
Assert.isTrue(false);
}
URL url = fgXMLPlugin.getBundle().getEntry("/icons/full/" + relativePath); //$NON-NLS-1$
return ImageDescriptor.createFromURL(url);
}
return null;
}
Expand Down Expand Up @@ -252,8 +247,8 @@ public void setIdMaps(HashMap IdMap, HashMap IdExtensionToName, HashMap OrderedE

if (refresh) {
Object[] viewers = fViewers.getListeners();
for (int i = 0; i < viewers.length; ++i) {
XMLStructureViewer viewer = (XMLStructureViewer) viewers[i];
for (Object viewer2 : viewers) {
XMLStructureViewer viewer = (XMLStructureViewer) viewer2;
viewer.updateIdMaps();
viewer.contentChanged();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2009, 2018 IBM Corporation and others.
* Copyright (c) 2009, 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 Down Expand Up @@ -163,7 +163,7 @@ public static String asString(InputStream exptStream) throws IOException {
public static InputStream asInputStream(String name) {
IPath path = IPath.fromOSString(PATCHDATA).append(name);
try {
URL url = new URL(getBundle().getEntry("/"), path.toString());
URL url = getBundle().getEntry("/" + path.toString());
return url.openStream();
} catch (IOException e) {
throw new IllegalStateException("failed while reading " + name, e);
Expand Down
Loading