Skip to main content



      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 12:36 Go to next message
Eclipse UserFriend
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 12:43 Go to previous message
Eclipse UserFriend
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: Mon Apr 28 02:43:29 EDT 2025

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

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

Back to the top