Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » finding resource from GefEditPart
finding resource from GefEditPart [message #146646] Thu, 05 August 2004 15:18 Go to next message
Eclipse UserFriend
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 messageGo to next message
Eclipse UserFriend
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
Eclipse UserFriend
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.
Previous Topic:delete key binding?
Next Topic:ResourceSelectionDialog
Goto Forum:
  


Current Time: Sat Jul 27 13:25:17 GMT 2024

Powered by FUDForum. Page generated in 0.02976 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top