finding resource from GefEditPart [message #146646] |
Thu, 05 August 2004 15:18 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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.03070 seconds