File history in File menu. [message #331159] |
Wed, 27 August 2008 05:39  |
Eclipse User |
|
|
|
Hello,
I had posted this on the rcp news group but got no reply.
Hoping to get a reply atleast here.
w.r.t the following post,
http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/m sg09266.html
I wanted some clarification on showing the recently opened files in the
File menu. The solution in the above mentioned post works only for a
session. Once you close the RCP and reopen it, the file history is lost.
Can someone please let me know how I can persist the list across sessions.
Looking forward for a reply,
Wishwas.
|
|
|
|
Re: File history in File menu. [message #331317 is a reply to message #331246] |
Mon, 01 September 2008 06:44  |
Eclipse User |
|
|
|
Hello Paul,
I am not using the saveAndRestore.I just need to remember the file list in
the file menu.btw, the files in my case are xml files.
I found one way of doing this. This is by adding the entry to the editor
history manually.
IFile file = ResourcesPlugin.getWorkspace().getRoot().getProject("External
Files").getFile(string);
IEditorRegistry reg = WorkbenchPlugin.getDefault().getEditorRegistry();
EditorDescriptor desc = (EditorDescriptor) reg.findEditor(editor
plugin-id);
wb.getEditorHistory().add(new FileEditorInput(file),desc );
Thanks,
Wishwas.
Paul Webster wrote:
> Are you saving and restoring your RCP state? If so, are your editors
> persistable?
> If I open text and java files in the IDE and then restart, my files are
> still in the history. If I use the PDE editor to open extension point
> descriptions, they show up in the list until the next restart (they are
> not persistable).
> PW
|
|
|
Powered by
FUDForum. Page generated in 0.02504 seconds