|
|
|
Re: How to get Project of Element or Model [message #622730 is a reply to message #473757] |
Thu, 05 July 2007 11:47 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
Francis,
Here's how to converter between a URI and an IResource:
URI uri =
URI.createPlatformResourceURI(iResource.getFullPath().toStri ng(), true);
IFile iFile = iWorkspaceRoot.getFile(new
Path(uri.toPlatformString(true)));
You can test uri.isPlatformResource() to be sure if the URI is
equivalent to an IFile. Given any EObject x, x.eResource().getURI()
will give you the URI and from that you can determine the IFile and
hance the IProject.
Francis wrote:
> Hi,
>
> Is there a way to dynamically get the eclipse project (IProject) given
> the UML Element or Model?
>
> Thanks,
> Francis
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03198 seconds