Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How to force editor to foreground?
How to force editor to foreground? [message #499103] Thu, 19 November 2009 15:45 Go to next message
Eclipse UserFriend
Originally posted by: yoduderoo.netscape.net

Hi,
In my app, when a user clicks a resource in the common nav, the resource
is opened in an editor. Normal stuff. But if the resource clicked is
already open in an editor, I would like that editor to pop on top of the
editor stack. How can I do that programmatically?
Thanks, y
Re: How to force editor to foreground? [message #499110 is a reply to message #499103] Thu, 19 November 2009 16:44 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

do you mean that you want if the editor come open with the tab at the top left?

You can set an IPartListener2 to listen when editor opened or is broughttotop and you will need to set the tab of your editor where you want in one of these methods but I don't know how.

Hope that it will show you the way ^^

regards,

Aurelien Pupier
Re: How to force editor to foreground? [message #499147 is a reply to message #499110] Fri, 20 November 2009 01:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: yoduderoo.netscape.net

Thanks but not quite what I am looking for.
I would like to make an editor the active editor (ie, more than one
editor is currently open).
Thanks,y

Aurelien Pupier wrote:
> Hi,
>
> do you mean that you want if the editor come open with the tab at the
> top left?
>
> You can set an IPartListener2 to listen when editor opened or is
> broughttotop and you will need to set the tab of your editor where you
> want in one of these methods but I don't know how.
>
> Hope that it will show you the way ^^
>
> regards,
>
> Aurelien Pupier
Re: How to force editor to foreground? [message #499213 is a reply to message #499147] Fri, 20 November 2009 07:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: yoduderoo.netscape.net

Found it:

PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().bringToTop(part);

Yodude wrote:
> Thanks but not quite what I am looking for.
> I would like to make an editor the active editor (ie, more than one
> editor is currently open).
> Thanks,y
>
> Aurelien Pupier wrote:
>> Hi,
>>
>> do you mean that you want if the editor come open with the tab at the
>> top left?
>>
>> You can set an IPartListener2 to listen when editor opened or is
>> broughttotop and you will need to set the tab of your editor where you
>> want in one of these methods but I don't know how.
>>
>> Hope that it will show you the way ^^
>>
>> regards,
>>
>> Aurelien Pupier
Re: How to force editor to foreground? [message #499307 is a reply to message #499103] Fri, 20 November 2009 13:08 Go to previous message
Eclipse UserFriend
Double-clicking on an editor and having it activated (instead of opened) is default behaviour. Are you saying that's not working for you?

org.eclipse.ui.ide.IDE.openEditor(IWorkbenchPage, IFile, boolean) will open an editor against an IFile (and activate the existing editor if already open against that IFile).

PW
Previous Topic:Remove view name from Eclipse menu Window -> Show View
Next Topic:Unable to contribute to editor menus using org.eclipse.ui.menus
Goto Forum:
  


Current Time: Wed Jul 23 10:46:08 EDT 2025

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

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

Back to the top