Context sensitive help: If only one topic, go straight to it. [message #622217] |
Thu, 20 November 2008 21:43 |
Ben Vitale Messages: 247 Registered: July 2009 |
Senior Member |
|
|
I've seen a few other posts on this, but the behavior in Eclipse 3.4.1
(M20080911-1700) still seems wrong.
Consider a context with a single topic. When the user presses F1, I
would expect the help page to show immediately. It should not show the
"Related Topics" part with only a single link. From what I've seen in
various bugs and newsgroup posts, everyone is in agreement that having a
single topic should go straight to the topic.
Unfortunately this isn't happening. I stepped through the code and
stumbled across this bit in DefaultHelpUI, around line 401:
if (tray instanceof HelpTray) {
ReusableHelpPart helpPart = ((HelpTray)tray).getHelpPart();
if (context != null) {
IHelpResource[] topics = context.getRelatedTopics();
if (context.getText() == null && topics.length == 1) {
helpPart.showURL(topics[0].getHref());
}
else {
helpPart.showPage(IHelpUIConstants.HV_CONTEXT_HELP_PAGE);
helpPart.update(null, context, null, controlInFocus, true);
}
}
else {
helpPart.showPage(IHelpUIConstants.HV_FSEARCH_PAGE, true);
}
}
The concerning snippet here is:
if (context.getText() == null)
As far as I can tell, this corresponds to the "description" element on
the context. Its not clear to me why this is part of the requirement
for only a single topic to go straight to its help URL.
Taking out the description on my context does produce the correct behavior.
Is this a bug?
Thanks
Ben
|
|
|
Powered by
FUDForum. Page generated in 0.03050 seconds