Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Re: Re-open file in existing editor
Re: Re-open file in existing editor [message #335358] Fri, 03 April 2009 16:36 Go to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Rucha wrote:
> Hello,
>
> I am using :
> IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchW indow().getActivePage(),
> editor, "id") ;
> to refresh a changed file, since thats the easiest way to do it in case
> of my editor. However, the problem is that it opens the file in a new
> tab, which then ends up in a different order. Is there a way to :
> - re-open the same file in an existing editor instance, so that it is
> effectively recreated ? - or remember the original tab order, and order
> them after re-opening the file ?
> any guidance will be greatly appreciated.
>
> thanks, rucha.
>

More appropriate for eclipse.platform, re-routing.

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: Re-open file in existing editor [message #335359 is a reply to message #335358] Fri, 03 April 2009 16:43 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Paul Webster wrote:
> Rucha wrote:
>> Hello,
>>
>> I am using :
>> IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchW indow().getActivePage(),
>> editor, "id") ;
>> to refresh a changed file, since thats the easiest way to do it in


Why aren't you listening for an
org.eclipse.core.resources.IResourceChangeEvent and then updating your
file? That's how resource based editors work.

The resource change event will let you know when it's time to refresh
your contents.

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


Previous Topic:Problem updating Ganymede
Next Topic:Custom Event
Goto Forum:
  


Current Time: Fri Apr 19 05:17:50 GMT 2024

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

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

Back to the top