finding resource from GefEditPart [message #146646] |
Thu, 05 August 2004 15:18 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: ra.classys.net
Hello everyone,
I am trying to identify the Workspace Project in which the resource i am
editing with a GEF Editor resides.
Can i dig my way from an subset of GefEditPart class?
If not at least from the GraphicalEditorWithPalette subset class ...
thank you,
Ra
--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
|
|
|
Re: finding resource from GefEditPart [message #146652 is a reply to message #146646] |
Thu, 05 August 2004 15:37 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: mastr.arcor.de
Ra wrote:
> I am trying to identify the Workspace Project in which the resource i am
> editing with a GEF Editor resides.
> Can i dig my way from an subset of GefEditPart class?
> If not at least from the GraphicalEditorWithPalette subset class ...
One possible solution I work with:
Your Editor has an EditorInput which you can cast to an IFileEditorInput.
IFile file = ((IFileEditorInput)input).getFile();
The file instance has access to the workspace (getWorkspace()), it'
project and other Resources.
You can write a method in your Editor class for searching the required
resource.
Hope it helps,
Martin.
|
|
|
Re: finding resource from GefEditPart [message #146727 is a reply to message #146652] |
Fri, 06 August 2004 13:39 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: ra.classys.net
mastr wrote:
> Ra wrote:
>
>
>>I am trying to identify the Workspace Project in which the resource i am
>>editing with a GEF Editor resides.
>>Can i dig my way from an subset of GefEditPart class?
>>If not at least from the GraphicalEditorWithPalette subset class ...
>
>
> One possible solution I work with:
> Your Editor has an EditorInput which you can cast to an IFileEditorInput.
>
> IFile file = ((IFileEditorInput)input).getFile();
>
> The file instance has access to the workspace (getWorkspace()), it'
> project and other Resources.
> You can write a method in your Editor class for searching the required
> resource.
>
> Hope it helps,
> Martin.
>
Yes, that was it. Thanks.
|
|
|
Powered by
FUDForum. Page generated in 0.04257 seconds