|Re: EFS and IProject [message #517570 is a reply to message #516664]
||Mon, 01 March 2010 11:19
| Ed Merks
Registered: July 2009
I only know a little about this, but normally when a new project is
created, even if an existing older, the .project file doesn't yet exist
and Eclipse will create one. So when Eclipse initially checks for the
..project file you should ensure that it reaches the conclusion that no
such file exists. Then when Eclipse tries to create the .project file,
you should ensure that you indeed create one and then store exactly what
Eclipse is trying to store there.
Matthew Flint wrote:
> My team would like to add the contents of a XML file into a workspace
> as if it were a project. In this way, certain portions of the XML can
> be treated as resources - with all the advantages that go with them.
> We have thus created our own file system that retrieves FileStore
> objects from the XML file. That part seems to work just fine.
> It's when we try to create the project in the workspace that we're
> stuck. To create the project, we use the code suggested by the EFS
> ( http://wiki.eclipse.org/EFS#Can_I_programmatically_create_a_ project_located_on_a_non-local_filesystem.3F)
> IProject project =
> IProjectDescription description =
> project.create(description, null);
> A project node is created in our common navigator but nothing else.
> There are errors in the .log file in the workspace and the problem
> seems to be that no .project file can be found. If I understand
> correctly, setting the location URI of the project description to a
> URI in our own scheme means that eclipse will ask for the .project
> file within our filesystem (which makes sense). My question is, what
> exactly do we have to do to create this file for Eclipse? Is there no
> way to use "default" behavior for this particular file, i.e., have
> Eclipse create it as if the project were on the "normal" file system?
> For example, test for the name ".project" in the getChild and other
> functions of that type and then execute some super great Eclipse code
> like workspace.getProjectDescFile().
Powered by FUDForum
. Page generated in 0.02547 seconds