Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Editor and path to opened file.
Editor and path to opened file. [message #191998] Mon, 05 February 2007 16:55 Go to next message
Eclipse UserFriend
Originally posted by: jokke.hive.no

Iv written a editor plugin, my problem is that i want to show what project
the opened file belongs to and what path it has.
I have looked trough the FAQ and quite a loth of tutorials but cant seem to
find any info that help solve this for me.

If anyone knows how to do this or have a link to any good resources i would
be most grateful.

rgds
Joakim A. Neslow.
Re: Editor and path to opened file. [message #192043 is a reply to message #191998] Mon, 05 February 2007 20:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Joakim,

You'll probably want to use IEditorPart.getEditorInput() (or monitor the
call to the editor's init method) and check if it's an IFileEditorInput
to extract the IFile from that.


Joakim A. Neslow wrote:
> Iv written a editor plugin, my problem is that i want to show what project
> the opened file belongs to and what path it has.
> I have looked trough the FAQ and quite a loth of tutorials but cant seem to
> find any info that help solve this for me.
>
> If anyone knows how to do this or have a link to any good resources i would
> be most grateful.
>
> rgds
> Joakim A. Neslow.
>
>
>
Re: Editor and path to opened file. [message #194579 is a reply to message #192043] Fri, 16 February 2007 00:25 Go to previous message
Eclipse UserFriend
Originally posted by: fakeaddress.brainkandy.org

Similarly, how do I get the IFile associated with an ITextViewer? (it's
actually a wst StructuredTextViewer, if that helps.)

Thanks, Robert

Ed Merks wrote:
> Joakim,
>
> You'll probably want to use IEditorPart.getEditorInput() (or monitor the
> call to the editor's init method) and check if it's an IFileEditorInput
> to extract the IFile from that.
>
>
> Joakim A. Neslow wrote:
>> Iv written a editor plugin, my problem is that i want to show what
>> project the opened file belongs to and what path it has.
>> I have looked trough the FAQ and quite a loth of tutorials but cant
>> seem to find any info that help solve this for me.
>>
>> If anyone knows how to do this or have a link to any good resources i
>> would be most grateful.
>>
>> rgds
>> Joakim A. Neslow.
>>
>>
>>
Previous Topic:how to search in one java file
Next Topic:StringFieldEditor Help
Goto Forum:
  


Current Time: Thu Apr 25 20:56:17 GMT 2024

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

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

Back to the top