AutoRefactor icon indicating copy to clipboard operation
AutoRefactor copied to clipboard

Help Button: Add information

Open andrewclancy opened this issue 10 years ago • 10 comments

The help button located at the bottom of the "Choose refactorings" box does not work for me. I tested on two different machines and resulted in the same problem.

OS: Windows 7

Eclipse Version: Luna Service Release 1 (4.4.1)

andrewclancy avatar May 28 '15 14:05 andrewclancy

Hi Andrew,

Thanks for the bug report.

 

This help button is created by the Eclipse UI framework. I have two choices:

  1. hide it
  2. do something with it

What do you prefer? If you want to do something with it, what would be useful to you? As a user, what do you expect to see? What information would be useful to you after clicking that button?

 

If you do not have any preference I will simply hide it.

Note to self: add the following line after creating the dialog:

dialog.setHelpAvailable(false);

JnRouvignac avatar May 28 '15 15:05 JnRouvignac

Hi,

Ohh I see what you mean. No problem I thought I would just raise it just incase it became a problem in the future. Although I would recommend a little information about what each refactoring actually does in the help button? This would be nice for first time users but is not a big issue.

andrewclancy avatar May 28 '15 15:05 andrewclancy

Could you be more specific than "a little information", and come up with concrete examples? Apart from stating "Strings" refactors string usage, I currently do not have a good idea on what to do.

Do you expect to see code samples demonstrating the changes? Or would you want to see something like what currently is in the javadocs? For example: https://github.com/JnRouvignac/AutoRefactor/blob/master/plugin/src/main/java/org/autorefactor/refactoring/rules/StringRefactoring.java#L39

JnRouvignac avatar May 28 '15 15:05 JnRouvignac

Have you used Sonar before? I like the way each violation is explained. For Auto Refactor I dont think code examples would be needed but an explanation about each code refactor would be more user friendly. This is just my opinion though :)

andrewclancy avatar May 28 '15 15:05 andrewclancy

Yes I know very well Sonar :) I introduced it in your company :)

Sonar is developed professionally. I am developing AutoRefactor on my free time. Coming up with an excellent level of documentation takes up a lot of time. I don't have this time.

You did nit answer: what do you think of this Javadoc? Would it suit your needs?

JnRouvignac avatar May 28 '15 15:05 JnRouvignac

Good stuff :) yes that would be perfect, thanks for your response on this

andrewclancy avatar May 28 '15 15:05 andrewclancy

OK I will try to see if I can do it.

JnRouvignac avatar May 28 '15 15:05 JnRouvignac

Cool, if there is anything I can do to help let me know :-)

andrewclancy avatar May 28 '15 16:05 andrewclancy

Resolving this is definitely more involved than what I had imagined:

  • http://blog.lavablast.com/post/2009/06/22/Eclipse-Contextual-Help-in-WizardDialog.aspx
  • http://www.vogella.com/tutorials/EclipseRCPHelpSystem/article.html
  • http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/guide/ua_help.htm?cp=46_0_19_1

I was hoping I could have some Java code triggered by the help button, that would generate the help information on the fly. However it does not seem possible.

I am reluctant for now to spend time generating the XMLs and HTML required to make the help system work. Since such work could also be interesting to generate documentation for the web site, I might revisit this decision later.

JnRouvignac avatar May 28 '15 18:05 JnRouvignac

A first step would be to have a tooltip in the "Choose refactorings" dialog, as reported by @xpoinsard.

Implemented in #129.

JnRouvignac avatar Jun 05 '15 14:06 JnRouvignac