RemoteResource
Dana Bergen <[email protected]> Mon, 29 Sep 2003 12:43:39 -0700
| Newsgroups | gmane.comp.java.netbeans.modules.projects.devel |
|---|---|
| Message-ID | <[email protected]> |
I'm having a problem with RemoteResource. To add a new remote resource
to my project, my code does the following:
1) Create a file in the project filesystem representing the resource,
and get the project member for the file I just created
--> At this point some other thread goes and resolves the mime
type of the new file, and the lookups get created for the resource,
including my ResourceDescriptor
2) Lookup the just-created ResourceDescriptor
3) Call RemoteResource.createRemoteResource(), passing in that
ResourceDescriptor and the remote build target
I'm having a variety of problems related to the fact that the lookup for
the resource is available before I have called
RemoteResource.createRemoteResource().
One way to solve all of them would be if I could put something in the
file created in step #1 which identifies the remote build target (and
configuration), so that in the environment provider which creates the
lookups, I could find the remote build target project member and call
RemoteResource.createRemoteResource() from there. It's not clear to me
what I could use as an identifier that would always be correct and would
allow me to find the build target.
(This also seems a bit convoluted since I'm essentially storing the same
information that RemoteResource is going to store, reading it back to
create/locate an object, passing that object to RemoteResource which
will store it again.)
Suggestions appreciated...
Dana