Community
Participate
Working Groups
Created attachment 208789 [details] Patch I find the query help popup to be annoying. Sometimes, it takes away focus from the main popup. It may also be so large that it distracts or covers the popup. These are all probably fixable, but attached is a proposed patch which adds a Preference checkbox that allows the user to completely disable the help popup (which personally I would prefer even if the other issues were fixed). I also added an event listener to capture the F1 key to popup help if the user does need it. The default preference behavior would be the same as it is now (i.e. the popup will still be there).
Your patch works as described - thanks. I've formatted it a little to match the MAT template (e.g. no tabs). I got a couple of NullPointerExceptions on Windows - one by closing the help with Esc, then reopening with F1 (the help text wasn't being recreated) and the other with the help disabled, pressing F1 to bring up the help text and the help page to the right, then closing the whole wizard with the X button. I've fixed those.
Comment on attachment 208789 [details] Patch I set the iplog flag, as Andrew committed the changes.
Instead of testing for F1 we could define a performHelp() on the ArgumentWizardPage and do the resize(true) there to create the page. We would also need to change the PlatformUI.getWorkbench().getHelpSystem().setHelp() to PlatformUI.getWorkbench().getHelpSystem().displayHelp() inside the performHelp() method otherwise it swallows the F1 event. This has the advantage that clicking on the question mark button brings up the context help to the size and the query help in the yellow panel at the bottom. Clicking it again removes the context help. The annotation HelpUrl is used for help for the result of a query - would it be worthwhile adding to the query browser and how?
I've changed things so that the help icon button and F1 opens the context help to the side, the help text to the bottom (if not already there) and the helpURL if present as a separate window. It shouldn't make much difference - normally the help text is already there as that is the default, and if you press F1 you probably want all the help available. Please reopen this bug if it doesn't work as you like, together with a suggestion of what MAT should do and we'll try to come to an agreement.
Andrew, I think your changes are good, but I'm just running trunk right now and F1 doesn't do anything for me (Linux 64-bit). Looking in ArgumentsWizard, I don't see the SWT.KeyDown handler.
Do you see the question mark help icon? This is for the context help, which used to be defined as PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, "org.eclipse.mat.ui.help.query_arguments"); //$NON-NLS-1$ and would respond to a button push and to F1. There is also the performHelp() method, but this was not called for me on Eclipse 3.7 Windows 7 when the context help was enabled with setHelp() and the context help button or F1 was pressed. If I omitted the setHelp() call then it was called by pressing F1 or the button, and so I put the relocateHelp there and also the getHelpSystem().displayHelp() to replace the setHelp. WizardDialog.setHelp controls the question mark icon. The acquire heap dump wizard dialog doesn't have one as it isn't called. Wizard.setHelp controls the help text button. See bug 330206. Having the keyDown F1 and the performHelp makes the help window flash as though it is being called twice. I'll need to check this more.
(In reply to comment #6) > Do you see the question mark help icon? This is for the context help, which > used to be defined as > PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, > "org.eclipse.mat.ui.help.query_arguments"); //$NON-NLS-1$ > and would respond to a button push and to F1. > There is also the performHelp() method, but this was not called for me on > Eclipse 3.7 Windows 7 when the context help was enabled with setHelp() and the > context help button or F1 was pressed. If I omitted the setHelp() call then it > was called by pressing F1 or the button, and so I put the relocateHelp there > and also the getHelpSystem().displayHelp() to replace the setHelp. > WizardDialog.setHelp controls the question mark icon. The acquire heap dump > wizard dialog doesn't have one as it isn't called. > Wizard.setHelp controls the help text button. See bug 330206. > > Having the keyDown F1 and the performHelp makes the help window flash as though > it is being called twice. I'll need to check this more. I see, okay, I think that behavior is reasonable.