|
|
|
|
Re: Deleting one way reference [message #901176 is a reply to message #901166] |
Fri, 10 August 2012 08:20 |
Ed Merks Messages: 33113 Registered: July 2009 |
Senior Member |
|
|
Martin,
Comments below.
On 10/08/2012 10:00 AM, Martin odloucký wrote:
> Ok, the problem is not solved yet. I realised that not all objects
> referencing the deleted one are contained in a resource. They might
> be, but there is a problem. If I open a project in the tool I am
> developing, the project cannot be contained in a resource until the
> user chooses to save the project on disk. Otherwise I don't know which
> URI should I pass to createResource method because the newly created
> project is not associated with any file on disk yet. Is there some way
> around this?
ResourceSet.createResource only creates the in-memory resource in the
resource set. Not until you call save, will it be saved to disk, or
wherever the URI specifies it should go. You can also change the
resource's URI later (i.e., much like Save As does in the generated
editor). Of course the URI you specify in createResource determine
which already resource implementation is created, so you can either use
a dummy URI with the right extension or, if you're using content types,
specify the content type of the new resource.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03097 seconds