/**
* Creates an input stream for the platform resource path and returns it.
* <p>
* This implementation does one of two things, depending on the runtime environment.
* If there is an Eclipse workspace, it delegates to
* {@link WorkbenchHelper#createPlatformResourceInputStream WorkbenchHelper.createPlatformResourceInputStream},
* which gives the expected Eclipse behaviour.
* Otherwise, the {@link EcorePlugin#resolvePlatformResourcePath resolved} URI
* is delegated to {@link #createInputStream(URI, Map) createInputStream}
* for recursive processing.
* @return an open input stream.
* @exception IOException if there is a problem obtaining an open input stream or a valid interpretation of the path.
* @see EcorePlugin#resolvePlatformResourcePath(String)
*/
/**
* Creates an output stream for the platform resource path and returns it.
* <p>
* This implementation does one of two things, depending on the runtime environment.
* If there is an Eclipse workspace, it delegates to
* {@link WorkbenchHelper#createPlatformResourceOutputStream WorkbenchHelper.createPlatformResourceOutputStream},
* which gives the expected Eclipse behaviour.
* Otherwise, the {@link EcorePlugin#resolvePlatformResourcePath resolved} URI
* is delegated to {@link #createOutputStream(URI, Map) createOutputStream}
* for recursive processing.
* @return an open output stream.
* @exception IOException if there is a problem obtaining an open output stream or a valid interpretation of the path.
* @see EcorePlugin#resolvePlatformResourcePath(String)
*/
protected [[#variable1736f9e0]] [[#variable1736f940]](String platformResourcePath) throws IOException {
// ECLIPSE-DEPEND-BEGIN
if (workspaceRoot != null) {
return WorkbenchHelper. [[#variable1736f940]](platformResourcePath);
}
else
// ECLIPSE-DEPEND-END
{
URI resolvedLocation = EcorePlugin.resolvePlatformResourcePath(platformResourcePath);
if (resolvedLocation != null) {
return [[#variable1736f8a0]](resolvedLocation);
}
throw new IOException("The path \'" + platformResourcePath + "\' is unmapped");
}
}
|