Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » New help icon in Eclipse 3.2 dialogs
New help icon in Eclipse 3.2 dialogs [message #305734] Tue, 11 July 2006 05:18 Go to next message
Eclipse UserFriend
Hi,
Eclipse 3.2 introduced cool help icons in almost
each dialogs in the application. When I click them
they open help content on the right side of the dialog.

Is it some API, so I can use the same function in my
RCP application? If yes, provide please which objects
to use or if there is some documentation give links
here please :-)

Thanks for answers.
Re: New help icon in Eclipse 3.2 dialogs [message #305745 is a reply to message #305734] Tue, 11 July 2006 09:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: markp.softlanding.com

Piotr Gorny wrote:

> Hi,
> Eclipse 3.2 introduced cool help icons in almost
> each dialogs in the application. When I click them
> they open help content on the right side of the dialog.
>
> Is it some API, so I can use the same function in my
> RCP application? If yes, provide please which objects
> to use or if there is some documentation give links
> here please :-)
>
> Thanks for answers.


I believe you just need to extend TrayDialog instead of Dialog. Of
course you also have to do the work to enable context sensitive help in
your dialog. But if you do, and you extend TrayDialog, then instead of
the help showing up in an "Infopop" you get the tray.

Mark
Re: New help icon in Eclipse 3.2 dialogs [message #305837 is a reply to message #305745] Thu, 13 July 2006 17:18 Go to previous messageGo to next message
Eclipse UserFriend
Mark Phippard wrote:
> I believe you just need to extend TrayDialog instead of Dialog. Of
> course you also have to do the work to enable context sensitive help in
> your dialog. But if you do, and you extend TrayDialog, then instead of
> the help showing up in an "Infopop" you get the tray.
>
> Mark

Thanks for answer.
I've checked your idea: created dialog which extends TrayDialog
used methods:
setHelpAvailable(true);
createHelpControl(composite);
setDialogHelpAvailable(true);

and opened new TrayDialog by invoking:
DialogTray tray = new DialogTray()
{
@Override
protected Control createContents(Composite parent)
{
Composite composite = new Composite(parent, SWT.NONE);
return composite;
}
};
openTray(tray);

Unfortunately I don't get any help in there :-( There is en empty
composite (which I've defined :-)) but no context help.

I have a Text field in this dialog which has context help assosiated
to it but it doesn't help.

I really don't know how to start using that cool help in the DialogTray.

Please give some advice...

--
Piotr Gorny
Re: New help icon in Eclipse 3.2 dialogs [message #305841 is a reply to message #305837] Thu, 13 July 2006 20:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: markp.softlanding.com

Piotr Gorny wrote:

> Mark Phippard wrote:
> > I believe you just need to extend TrayDialog instead of Dialog. Of
> > course you also have to do the work to enable context sensitive
> > help in your dialog. But if you do, and you extend TrayDialog,
> > then instead of the help showing up in an "Infopop" you get the
> > tray.
> >
> > Mark
>
> Thanks for answer.
> I've checked your idea: created dialog which extends TrayDialog
> used methods:
> setHelpAvailable(true);
> createHelpControl(composite);
> setDialogHelpAvailable(true);
>
> and opened new TrayDialog by invoking:
> DialogTray tray = new DialogTray()
> {
> @Override
> protected Control createContents(Composite parent)
> {
> Composite composite = new Composite(parent, SWT.NONE); return
> composite; }
> };
> openTray(tray);
>
> Unfortunately I don't get any help in there :-( There is en empty
> composite (which I've defined :-)) but no context help.
>
> I have a Text field in this dialog which has context help assosiated
> to it but it doesn't help.
>
> I really don't know how to start using that cool help in the
> DialogTray.
>
> Please give some advice...

All you need to do is extend TrayDialog. Nothing else.

Go back to extending Dialog for a bit. Bring up your dialog and press
F1. Do you get an InfoPop with context sensitive help? If not, then
you have not done the basic help coding to associate it with your
dialog. The help tells you how to do that. Once you get that working,
just change your class to extend TrayDialog and instead of getting the
InfoPop, you get it in the Tray.

Mark
Re: New help icon in Eclipse 3.2 dialogs [message #305843 is a reply to message #305841] Fri, 14 July 2006 03:53 Go to previous messageGo to next message
Eclipse UserFriend
Mark Phippard wrote:
> Go back to extending Dialog for a bit. Bring up your dialog and press
> F1. Do you get an InfoPop with context sensitive help? If not, then
> you have not done the basic help coding to associate it with your
> dialog. The help tells you how to do that. Once you get that working,
> just change your class to extend TrayDialog and instead of getting the
> InfoPop, you get it in the Tray.
>
> Mark

I still get the InfoPop in the extended TrayDialog class.
If I hit F1 then the InfoPop pops up the old way, not in the
right side tray. Do I have to set something to say the dialog
to put it in there?

--
Piotr Gorny
Re: New help icon in Eclipse 3.2 dialogs [message #305863 is a reply to message #305843] Fri, 14 July 2006 11:00 Go to previous message
Eclipse UserFriend
The javadoc for TrayDialog has the following:

Note: Trays are not supported on dialogs that use a custom layout on the
Shell by overriding Window#getLayout().

If you're doing anything like this, I would recommend wrapping your dialog
contents in a Composite and setting your layout on that instead of on the
Shell.

In addition, the help system places the restriction that at the time
context help is summoned, the dialog's Shell must be visible, and it must
either be resizable or satisfy a minimum height requirement (at the moment
it's 450 pixels but this is not API and should not be assumed as it can
change). That is, if your dialog is short and not resizable, help will
fall back to using an infopop.

Also, for sanity, make sure you specified in the help preference page that
you want dialog context help to show in the tray, not an infopop (tray is
the default).

Thanks,
Curt
Previous Topic:objectContribution vs retarget action
Next Topic:Disable text editor action on some event
Goto Forum:
  


Current Time: Fri May 09 22:44:46 EDT 2025

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

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

Back to the top