DZone Forums
Go Back   DZone Forums > Community > Tools & IDEs > Eclipse
Reload this Page How can i know the path of the file opened in editor???
Notices
Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Apr 2008
Default How can i know the path of the file opened in editor??? - 04-21-2008, 12:44 AM

Hi
A text/any file is opened in eclipse editor. I want to display the path and name of that file on the console in a action class written by me.
So how can i get the information of the file opened in editor currently ? ?
please help me....
Reply With Quote
  (#2 (permalink)) Old
Member
 
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Apr 2008
Default solution - 04-24-2008, 07:17 AM

PlatformUI.getWorkbench().getActiveWorkbenchWindow ().getActivePage() .getActiveEditor();

then cast the given object and then somthing like this: #getFile().getFullPath.toOSString()
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Integrating GMF editor with a custom Eclipse Forms editor llednicki Eclipse 0 12-21-2008 04:43 AM
List of the all opened editors nawa Eclipse 0 11-10-2008 05:17 AM
why aren't plugins in my build path? Greg.Dorval Eclipse 0 09-19-2008 03:54 PM
How do I specify a path for SWT ImageLoader? zaphod2003 Java 0 05-11-2008 06:21 PM
Can't remove j2ee.jar from build path joezaloom Eclipse 1 02-12-2008 08:46 PM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com