Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » File history in File menu.
File history in File menu. [message #331159] Wed, 27 August 2008 05:39 Go to next message
wishwas is currently offline wishwasFriend
Messages: 7
Registered: July 2009
Junior Member
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 #331246 is a reply to message #331159] Thu, 28 August 2008 15:02 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Re: File history in File menu. [message #331317 is a reply to message #331246] Mon, 01 September 2008 06:44 Go to previous message
wishwas is currently offline wishwasFriend
Messages: 7
Registered: July 2009
Junior Member
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
Previous Topic:TextCellEditor with SWT.BORDER doesn't display well on Mac OSX
Next Topic:Checkstyle Template available for Eclipse (standard code formater)
Goto Forum:
  


Current Time: Fri Aug 16 11:27:48 GMT 2024

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

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

Back to the top