This is an Eclipse question, and you can assume the Java package for all these Eclipse classes is org.eclipse.core.resources.
I want to get an IFile corresponding to a location String I have:
'platform:/resource/Tracbility_All_Supported_lib/processes/gastuff/globalht/GlobalHTInterface.wsdl'
I have the enclosing IWorkspace and IWorkspaceRoot. If I had the IPath corresponding to the location above, I could simply call IWorkspaceRoot.getFileForLocation(IPath).
How do I get the corresponding IPath from the location String? Or is there some other way to get the corresponding IFile?
org.eclipse.core.runtime.Path implements IPath.
This would have worked had the location string not been a URL of type ‘platform:’
For this particular case, notes in org.eclipse.core.runtime.Platform javadoc indicate that the ‘correct’ solution is something like
@[Paul Reiners] your solution apparently assumes that the workspace root is going to be in the ‘resources’ folder