Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Getting underlying file location from IEditorPart
Getting underlying file location from IEditorPart [message #134732] Wed, 14 January 2004 11:53 Go to next message
Eclipse UserFriend
I'm writing a little changelog plug-in that basically implements
IEditorActionDelegate.

It's been going well, I capture the event, determine function under
cursor, but I'm having trouble identifying the file location that the
current IEditorPart represents.

I can get the filename by looking at getTitle() but I need to know the
location (ie /src/foo/barr/foobar.c) so I can write the changelog entry
to the right directory/changelog.

Is there anyway to determine the actual file location from IEditorPart?
I thought getEditorSite() looked promising, but no luck there.

Phil Muldoon
Re: Getting underlying file location from IEditorPart [message #134762 is a reply to message #134732] Wed, 14 January 2004 14:03 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

Use the IEditorInput. You will need to do an instance test to see if the
input is an IPathEditorInput (for Eclipse 3.0 only) and if it is then
use getPath() against it. The reason you have to test is because editor
don't necessarily have to work with files, so it was generalized up to
IEditorInput.


--
Thanks, Rich Kulp

Previous Topic:AST development documentation
Next Topic:classpathentry kind="src" means?
Goto Forum:
  


Current Time: Thu May 01 10:29:47 EDT 2025

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

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

Back to the top