How to invoke the generate -> equals method option from code?
Is there any way I could invoke the IntelliJ intention action for generating equals/hashcode method from my plugin? I looked at the OpenAPI and couldnt find anything related.
A simple code example would be greatly appreciated.
Please sign in to leave a comment.
Hello Anay,
new GenerateEqualsAction().actionPerformedImpl(project, editor)
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Hi Dimitry,
Thanks for your reply, however I guess I am probably missing something really obvious. I could not find this class reference in the http://www.jetbrains.com/idea/openapi/5.1/ javadoc and IntelliJ cant seem to resolve the import for the class . Is there any particular jar/lib that I should associate with my project in order to have these classes get resolved?
Thanks again,
Anay
Hello Anay,
This class is not part of OpenAPI, so you need to add idea.jar to the classpath
of your IntelliJ IDEA SDK.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"