[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.technology.higgins] Re: Problem Running Demo App and Saving Context
|
Hi Paul,
thanks for the response. I still cannot save my context information, and I
think this is because I'm trying to run the demo app under Windows.
Bascially, in org.eclipse.higgins.context.store.ProjectFolder.java, the
following function always returns null:
private static Resource associateResource(Object root, IFile ifile,
ResourceSet rs) throws IOException {
if (root == null)
throw new IllegalArgumentException();
if (debug)
System.out.println("[debug]AssociateResource "
+ ifile.getFullPath().toString());
// Get the URI of the model file.
URI fileURI = URI.createPlatformResourceURI(ifile.getFullPath()
.toString());
// Create a resource for this file.
Resource resource = rs.createResource(fileURI);
// Add the initial model object to the contents.
resource.getContents().add(root);
return resource;
}
The line "Resource resource=rs.createResource(fileURI);" always returns
null, and fileURI has the value, for example, "/simon/Simon.context.xml". I
haven't tried on Linux, but I assume this fileURI works under Linux since
it's a valid file path. However, under Windows, how do I resolve the
fileURI to the proper format such as "C:\\simon\\Simon\\context.xml"?
What's the proper way of doing this conversion?
Thanks,
Simon