Skip to content

Commit b6355ca

Browse files
committed
Replace deprecated Platform.asLocalURL with FileLocator.toFileURL
Replaces the old URL handling system with FileLocator.toFileURL to eliminate dependency on deprecated API.
1 parent 73ea7e9 commit b6355ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/misc/ExternalEditor.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import java.io.IOException;
1818
import java.net.URL;
1919
import org.eclipse.core.runtime.CoreException;
20+
import org.eclipse.core.runtime.FileLocator;
2021
import org.eclipse.core.runtime.IConfigurationElement;
2122
import org.eclipse.core.runtime.IPath;
2223
import org.eclipse.core.runtime.IStatus;
@@ -90,7 +91,7 @@ public void openWithUserDefinedProgram() throws CoreException {
9091
URL entry = bundle.getEntry(descriptor.getFileName());
9192
if (entry != null) {
9293
// this will bring the file local if the plugin is on a server
93-
URL localName = Platform.asLocalURL(entry);
94+
URL localName = FileLocator.toFileURL(entry);
9495
File file = new File(localName.getFile());
9596
// Check that it exists before we assert it is valid
9697
if (file.exists()) {

0 commit comments

Comments
 (0)