Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Context-sensitive help - menus and actions - bizarre behaviour
Context-sensitive help - menus and actions - bizarre behaviour [message #452890] Tue, 18 July 2006 15:21 Go to next message
Keith Harrison-Broninski is currently offline Keith Harrison-BroninskiFriend
Messages: 33
Registered: July 2009
Member
My RCP app has F1 help for menus and actions - well, I'd like it to!

But what happens is that:

- selecting a menu and pressing F1 has no effect, even if the menu has
been used previously

- hovering over an action that has F1 help brings up the help for the
menu of which it is an item, not the help for the action itself

My contexts.xml file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<?NLS TYPE="org.eclipse.help.contexts"?>
<contexts>
<context id="aMenu" title="A Menu">
<description>This is a menu.</description>
<topic href="../my_help_plugin/menu_href" label="A Menu Reference"/>
</context>

<!-- more menu contexts ... -->

<context id="anAction" title="AnAction">
<description>This is an action.</description>
<topic href="../my_help_plugin/action_href" label="An Action Reference"/>
</context>

<!-- more action contexts ... -->

</context>
</contexts>

Any ideas? I am on Eclipse 3.2M6.

Thanks!
Keith
Re: Context-sensitive help - menus and actions - bizarre behaviour [message #452894 is a reply to message #452890] Tue, 18 July 2006 16:36 Go to previous messageGo to next message
Keith Harrison-Broninski is currently offline Keith Harrison-BroninskiFriend
Messages: 33
Registered: July 2009
Member
Adding a HelpListener to each action gets its own help to show. So
that's something.

But neither adding a HelpListener to the menus nor simply registering
their context ids with the Help system gets their help to show.
Currently I'm doing both, and now that actions are showing their own
help rather than their menu's help, the F1 menu help that I was getting
seems to be gone for good!

Are menus actually able to provide F1 help?

Keith Harrison-Broninski wrote:
> My RCP app has F1 help for menus and actions - well, I'd like it to!
>
> But what happens is that:
>
> - selecting a menu and pressing F1 has no effect, even if the menu has
> been used previously
>
> - hovering over an action that has F1 help brings up the help for the
> menu of which it is an item, not the help for the action itself
>
> My contexts.xml file looks like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <?NLS TYPE="org.eclipse.help.contexts"?>
> <contexts>
> <context id="aMenu" title="A Menu">
> <description>This is a menu.</description>
> <topic href="../my_help_plugin/menu_href" label="A Menu
> Reference"/>
> </context>
>
> <!-- more menu contexts ... -->
>
> <context id="anAction" title="AnAction">
> <description>This is an action.</description>
> <topic href="../my_help_plugin/action_href" label="An Action
> Reference"/>
> </context>
>
> <!-- more action contexts ... -->
>
> </context>
> </contexts>
>
> Any ideas? I am on Eclipse 3.2M6.
>
> Thanks!
> Keith
Re: Context-sensitive help - menus and actions - bizarre behaviour [message #452938 is a reply to message #452894] Wed, 19 July 2006 09:20 Go to previous messageGo to next message
Phill Perryman is currently offline Phill PerrymanFriend
Messages: 214
Registered: July 2009
Senior Member
Yes they can and mine does, if I put the cursor over the exit command in
my app and press f1 a help window appears.

The following from my action bar advisor sets up the link to help.

protected void makeActions(IWorkbenchWindow window1) {

try {
this.window = window1;
IWorkbenchHelpSystem help =
PlatformUI.getWorkbench().getHelpSystem();

quitAction = ActionFactory.QUIT.create(window1);
help.setHelp(quitAction,
"com.mitel.swb.quitMenuItem"); //$NON-NLS-1$
register(quitAction);

My contexts file contains the enrty, note the id is not the fully
qualified name but sethelp is (why, who knows?)

<context id="quitMenuItem">
<description>File Menu Options.</description>
<topic href="html/menus/quit.html" label="Quit"/>
</context>
Re: Context-sensitive help - menus and actions - bizarre behaviour [message #452947 is a reply to message #452938] Wed, 19 July 2006 11:32 Go to previous messageGo to next message
Keith Harrison-Broninski is currently offline Keith Harrison-BroninskiFriend
Messages: 33
Registered: July 2009
Member
Thanks Phil. I can do this too - get help for menu items (actions).

My question is about help for the menus themselves - I would like the
user to be able to select the title of a menu and press F1 to see
information about that menu as a whole.

The API documentation suggests that this should be possible, since you
can call setHelp with a menu as first parameter ... but it doesn't seem
to work!

Phill_Perryman@Mitel.COM wrote:
> Yes they can and mine does, if I put the cursor over the exit command in
> my app and press f1 a help window appears.
>
> The following from my action bar advisor sets up the link to help.
>
> protected void makeActions(IWorkbenchWindow window1) {
>
> try {
> this.window = window1;
> IWorkbenchHelpSystem help =
> PlatformUI.getWorkbench().getHelpSystem();
>
> quitAction = ActionFactory.QUIT.create(window1);
> help.setHelp(quitAction,
> "com.mitel.swb.quitMenuItem"); //$NON-NLS-1$
> register(quitAction);
>
> My contexts file contains the enrty, note the id is not the fully
> qualified name but sethelp is (why, who knows?)
>
> <context id="quitMenuItem">
> <description>File Menu Options.</description>
> <topic href="html/menus/quit.html" label="Quit"/>
> </context>
Re: Context-sensitive help - menus and actions - bizarre behaviour [message #453058 is a reply to message #452938] Thu, 20 July 2006 18:07 Go to previous message
Paul E. Keyser is currently offline Paul E. KeyserFriend
Messages: 878
Registered: July 2009
Senior Member
Interesting -- I have created most of my app-specific actions using the plugin.xml, so I have no
object I can pass to the help-system. Fortunately, the plugin.xml does allow one to set the
(*fully-qualified*) "helpContextId" for an action; when I do so, I do indeed get the Help View to
show whatever HTML I write and connect to the id, if I float the mouse over the corresponding
menu-item and press F1.

However, the toolbar *button* remains stubbornly helpless. Any idea on how to get that to react?

thanks,
Paul
Previous Topic:substring Syntax Highlighting
Next Topic:trouble creating updates for plugin
Goto Forum:
  


Current Time: Mon Oct 07 05:52:16 GMT 2024

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

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

Back to the top