Bug 87977 - [Help] Add a 'Dynamic Help' menu item
Summary: [Help] Add a 'Dynamic Help' menu item
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.1 M6   Edit
Assignee: Michael Van Meekeren CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2005-03-14 15:38 EST by Dejan Glozic CLA
Modified: 2005-03-30 12:22 EST (History)
1 user (show)

See Also:


Attachments
Eclipse UI patch (1.50 KB, patch)
2005-03-17 18:38 EST, Dejan Glozic CLA
no flags Details | Diff
Workbench patch (11.69 KB, patch)
2005-03-17 18:38 EST, Dejan Glozic CLA
no flags Details | Diff
Workbench IDE patch (1.58 KB, patch)
2005-03-17 18:39 EST, Dejan Glozic CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dejan Glozic CLA 2005-03-14 15:38:12 EST
We should add a 'Dynamic Help' menu item on the 'Help' menu to open the new 
Help view. Right now, the view opens when F1 is pressed. This should continue 
but F1 should be accelerator for 'Dynamic Help' menu item, not the command 
that can only be accessed via F1.
Comment 1 Dejan Glozic CLA 2005-03-17 11:44:43 EST
Patch forthcoming.
Comment 2 Nick Edgar CLA 2005-03-17 12:07:45 EST
F1 is handled specially by SWT.  Doug, can you recommend the best way to get an
action showing F1 as its accelerator, without blocking SWT's help callback?

Comment 3 Douglas Pollock CLA 2005-03-17 12:25:40 EST
First of all, the help key is a platform-dependent key.  On GTK+, for example,
it is "Ctrl+F1" not "F1".  On some systems it might be a key labelled "Help"
(SWT.HELP).  I am not aware of anyway of figuring out this key by using SWT. 
You might be able to do it by writing your own native code.  You must also be
able to handle the case where the user changes this key using the tools provided
by the desktop.

In general, we have no ability to override this key, so defining a command for
it would be wrong.  We simply want to display the native binding, if we can
figure it out.  The only good way I can think of is to define a custom
contribution item and have it call MenuItem.setText(String).
Comment 4 Dejan Glozic CLA 2005-03-17 12:28:55 EST
There are two requests here I would like to cover:

1) Provide a first-class alternative to the help key (F1 on Windows, Shift-F1 
on Linux, 'Help' key on Mac etc)
2) Show the help key in the menu item

Although 2) would be nice, 1) is my main focus because a surpising number of 
users does not know that F1 will open context/dynamic help. Apparently it was 
a common knowledge in the past but not any more. Therefore, we need a proper 
menu item to activate the equivalent command.
Comment 5 Douglas Pollock CLA 2005-03-17 13:26:14 EST
Do you want the context-sensitive help ("what's this?", as it's called on KDE)
or the help contents?

Either way, I think you run into the same problem.  Perhaps we should get SWT
comment on the feasibility of providing the help accelerator key.  I talked with
Billy Biggs on IRC, but he doesn't know of any way of determining the key.
Comment 6 Dejan Glozic CLA 2005-03-17 13:59:02 EST
In 3.1 F1 key has been mapped to opening the help view into the 'Related 
Topics' page. Therefore it is an advanced version of 'What's this' in a sense 
that it provides topics related to what is currently active in the window. In 
addition, help is dynamic in that it updates as you click around (in some 
cases like Java editor, it even shows dynamic help for Java elements as you 
click around in the editor).

As I said, I will attach a patch for the 'Dynamic Help' menu item. We can then 
treat displaying the help key as a 'nice to have'.
Comment 7 Nick Edgar CLA 2005-03-17 16:26:39 EST
I assume this needs to be done for M6, as it probably requires API on ActionFactory.
Comment 8 Dejan Glozic CLA 2005-03-17 18:38:37 EST
Created attachment 18946 [details]
Eclipse UI patch
Comment 9 Dejan Glozic CLA 2005-03-17 18:38:55 EST
Created attachment 18947 [details]
Workbench patch
Comment 10 Dejan Glozic CLA 2005-03-17 18:39:18 EST
Created attachment 18948 [details]
Workbench IDE patch
Comment 11 Dejan Glozic CLA 2005-03-17 18:40:39 EST
Nick, attached are patches that implement the addition. 

As I did this, I noticed that help view looks rather unrooly now i.e. it begs 
for separators to logically group items. We should probably toss in a couple 
to have some order.
Comment 12 Nick Edgar CLA 2005-03-18 10:01:52 EST
Thanks, I can't get to this today, but will check it out early next week.
Comment 13 Dejan Glozic CLA 2005-03-18 10:28:15 EST
(In reply to comment #11)
> Nick, attached are patches that implement the addition. 
> As I did this, I noticed that help view looks rather unrooly now i.e. it 
begs 
> for separators to logically group items. We should probably toss in a couple 
> to have some order.

I my comment above, I really meant 'help menu', not 'help view' :-).
Comment 14 Michael Van Meekeren CLA 2005-03-21 12:54:59 EST
Dejan, did you want F1 as an accelerator for this menu item.  This seems to be
the case for other apps.
Comment 15 Michael Van Meekeren CLA 2005-03-21 13:41:54 EST
oops.. I did not mean to suggest I knew more than comment #3 ignore my last comment
Comment 16 Michael Van Meekeren CLA 2005-03-21 13:43:23 EST
marking as fixed, dejan please try this out in the latest builds or from HEAD
Comment 17 Stefan Xenos CLA 2005-03-30 12:22:14 EST
Verified in I20050330-0500, windows XP dual-monitor