This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes converting java.io.File to org.eclipse.core.resources.IFile Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "converting java.io.File to org.eclipse.core.resources.IFile" Watch "converting java.io.File to org.eclipse.core.resources.IFile" New topic
Author

converting java.io.File to org.eclipse.core.resources.IFile

Bharath Raja
Ranch Hand

Joined: Jan 21, 2009
Posts: 111
Is there any possibility to convert java's File to eclipse's IFile. My requirement is opening a word document file within the eclipse editor(not outside of eclipse). I've the java.io.File but the openEditor() method receives its arguments as IFile only. Now I can open the word document on outside the eclipse through the code



I've tried to open a word document file within eclipse editor, but it give me an exception. Code as



Any suggestion?


Life is either daring something or nothing - Helen Keller
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: converting java.io.File to org.eclipse.core.resources.IFile