Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Wtp-wst-dev] Reading directory from a Plugin

Forgot to mention.

pluginPath = "platform:/plugin/org.eclipse.wst.tests.schemas/"
xsdRepository = "cache/"

The plugin is created and the appropriate directories setup.

David Carver wrote:
I'm working on a unit test, in where I have a set of schemas in a plugin specified in a directory like the following:

cache/OAGI/OAGIS8.0

Where the above is the root directory for the schemas. I'm trying to set this up for reading as a File, using the following code:

IEnvironment environment = EnvironmentService.getEclipseConsoleEnvironment();
     IURIFactory  factory     = environment.getURIFactory();
IURI uri1 = factory.newURI(pluginPath + xsdRepositoryPath + "OAGI/OAGIS8.0");
     Assert.assertTrue(uri1.isAvailableAsURL());
     Assert.assertTrue(uri1.isAvailableAsFile());

The assertion for isAvailableAsURL passes, the check for isAvailableAsFile fails. Is there anything special that needs to be done to make this so that it can work with the File object?

Dave


_______________________________________________
wtp-wst-dev mailing list
wtp-wst-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-wst-dev




Back to the top