Is there a way to load Files outside the workspace?
This is what I found:
IFile fileToBeOpened = ...;
IEditorInput editorInput = new FileEditorInput(fileToBeOpened);
IWorkbenchWindow window=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
IWorkbenchPage page = window.getActivePage();
page.openEditor(editorInput, "org.eclipse.ui.DefaultTextEdtior");
The problem here is the first line. My files that I would like to edit are of the java.io.File type. But there is no way of converting this into an IFile instance. How can I pass my java.io.File as input for my Editor?
To open an external file follow the instructions here
http://wiki.eclipse.org/FAQ_How_do_I_open_an_editor_programmatically%3F