Editor and path to opened file. [message #191998] |
Mon, 05 February 2007 16:55 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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.
>>
>>
>>
|
|
|
Powered by
FUDForum. Page generated in 0.08702 seconds